The present application is related to, and incorporates by reference, the following commonly owned, co-filed U.S. patent applications Ser. No. 12/043,918 filed by Chi-Lie Wang and Jason Z. Mo on Mar. 6, 2008, entitled “Method To Support Flexible Data Transport On Serial Protocols”; Ser. No. 12/043,929 also filed by Chi-Lie Wang and Jason Z. Mo on Mar. 6, 2008, entitled “Protocol Translation In A Serial Buffer”; Ser. No. 12/043,934 filed by Chi-Lie Wang and Jason Z. Mo on Mar. 6, 2008, entitled “Serial Buffer To Support Reliable Connection Between Rapid I/O End-Point And FPGA Lite-Weight Protocols”; Ser. No. 12/043,940 filed by Chi-Lie Wang on Mar. 6, 2008, entitled “Power Management On sRIO Endpoint”; and Ser. No. 12/043,944 filed by Chi-Lie Wang, Jason Z. Mo, Calvin Nguyen and Bertan Tezcan on Mar. 6, 2008, entitled “Method To Support Lossless Real Time Data Sampling And Processing On Rapid I/O End-Point”.
The present invention relates to a serial buffer designed to enable out of order responses and data re-transmission in a system that implements a serial rapid I/O (sRIO) protocol.
A conventional serial buffer is capable of generating a series of request packets which are transmitted to an sRIO end-point. In response, the sRIO endpoint returns a corresponding series of response packets to the serial buffer. However, a conventional serial buffer is only capable of processing the response packets in the same order that the corresponding request packets were sent. Thus, if a conventional serial buffer sequentially transmits first, second and third request packets to an sRIO end-point, the serial buffer is configured to sequentially process first, second and third response packets (which represent responses to the first, second and third request packets, respectively). If the second and/or third response packet is received by the serial buffer before the first response packet, the conventional serial buffer cannot process the second and/or third response packet until after the first response packet is received by the serial buffer. This is condition, which is referred to as a head of line blocking, can result in slow processing in the serial buffer.
It would therefore be desirable to have a serial buffer capable of efficiently and flexibly processing request packets and response packets.
Accordingly, the present invention provides a serial buffer configured to implement the sRIO protocol. The serial buffer includes logic to support split request/response transactions with out of order response. That is, the serial buffer enables response packets to be received and processed in a different order than the corresponding request packets are transmitted from the serial buffer. To support out of order responses, a buffer memory stores a copy of each request packet transmitted from the serial buffer. More specifically the buffer memory includes a plurality of memory blocks, each capable of storing a copy of a corresponding request packet. Each memory block holds the corresponding request packet until the corresponding response packet is returned to the serial buffer. Only then is the memory block made available to store a new request packet. Correspondence between the response packets and the request packets is established by assigning a unique transaction identifier (ID) value to each response packet and its corresponding request packet.
For each request packet issued, a corresponding request timeout counter is loaded with a programmed value, and enabled to start counting down. If a request timeout counter reaches zero before the corresponding response packet is returned, the serial buffer re-sends the original request packet from the buffer memory to guarantee packet delivery.
The present invention will be more fully understood in view of the following description and drawings.
In general, the present invention provides a serial buffer that transmits sRIO logic layer request packets to an sRIO endpoint, and allows the corresponding sRIO logic layer response packets to be received out of order. Note that response packets may be received out of order, for example, due to system topology or due to request packets being issued out of order. Thus, a subsequent request packet can be issued prior to a response packet being returned for an earlier issued request packet. As a result, head of line blocking conditions are eliminated.
A free buffer pointer list is used to allocate free memory blocks in a buffer memory, which is used to store SRIO logic layer request packets. Each memory block can store up to 256 bytes (which corresponds with the maximum length of an sRIO request packet). Note that each memory block does not need to include contiguous address locations within the buffer memory. That is, a request packet does not need to be stored in contiguous memory locations of the buffer memory.
Each free buffer pointer addresses a 256 byte memory block within the buffer memory. When a request packet is written to a memory block identified by a free buffer pointer, the free buffer pointer is removed from the free buffer pointer list, and is added to a used buffer pointer list (as a used buffer pointer). This free buffer pointer (or used buffer pointer) can be used to represent the transaction ID value of the corresponding request packet written to the memory block.
If there is a used buffer pointer in the used buffer pointer list, request control logic is activated to transfer the associated request packet out of the memory block addressed by the used buffer pointer. After the request packet is transferred out of the memory block, the used buffer pointer is removed from the used buffer pointer list, and is added to a request buffer pointer list (as a request buffer pointer).
When a response packet is returned to the serial buffer, the transaction ID value of the response packet is compared with the request buffer pointers in the request buffer pointer list. If a match is found, the matching request buffer pointer is removed from the request buffer pointer list, and is added to the free buffer pointer list, thereby effectively releasing the associated memory block to store a new request packet.
Each time a request packet is transmitted from the serial buffer, a corresponding response timeout timer is started. The transaction ID value of the request packet is used to establish the correspondence with the response timeout timer. If an associated response packet is not returned prior to expiration of the response timeout timer, a transit error is assumed to exist, and the request packet is resent. To re-send the request packet, the associated request buffer pointer is removed from the request buffer pointer list, and is added to the used buffer pointer list (as a used buffer pointer).
In this manner, the serial buffer of the present invention is able to support out of order response packets with request packet retransmission capability. The serial buffer of the present invention will now be described in more detail.
In the described embodiments, first port 1 of serial buffer 100 is configured to operate in accordance with an sRIO protocol, and provides an interface to an external sRIO end-point (not shown). Queues Q0-Q3 are configured to store sRIO request packets to be transmitted through the first port 1 to the external sRIO endpoint. As described in more detail below, each of these sRIO request packets (REQ_PKT) is assigned a transaction identification (ID) value. Upon receiving and processing the sRIO request packet, the external sRIO endpoint returns an sRIO response packet (RESP_PKT) that includes the same transaction ID value to sRIO port 1. The response packet enables the serial buffer 100 to confirm that the request packet was in fact received and processed by the sRIO endpoint.
Queues Q0-Q3 are operated in a FIFO (first in, first out) manner, such that the first request packet written into a queue will be the first request packet read out from the queue. However, the request packets read from queues Q0-Q3 may not arrive at their final destinations in the same order that these request packets are read out of queues Q0-Q3, due to system topology and packet priority. As a result, the response packets returned to sRIO port 1 may not be received in the same order that the corresponding request packets were read out of the queues Q0-Q3. However, as described in more detail below, serial buffer 100 operates to prevent head of line blocking on queues Q0-Q3 if the response packets are not returned in the same order that the corresponding request packets are read from queues Q0-Q3.
Note that activating the valid indicator bit of a used buffer pointer entry may be viewed as ‘adding’ the corresponding memory block to used buffer pointer list 112. Conversely, deactivating the valid indicator bit of a used buffer pointer entry may be viewed as ‘removing’ the corresponding memory block from used buffer pointer list 112.
Note that activating the valid indicator bit of a request buffer pointer entry may be viewed as ‘adding’ the corresponding memory block to request buffer pointer list 113. Conversely, deactivating the valid indicator bit of a request buffer pointer entry may be viewed as ‘removing’ the corresponding memory block from request buffer pointer list 113.
After a sRIO packet has been read from the selected queue, processing continues to Step 402, wherein write control logic 101 determines whether any of the free buffer pointer entries FBP0-FBP255 in free buffer pointer list 111 is valid (i.e., includes an activated valid bit). As described above in connection with
Note that if none of the free buffer pointer entries FBP0-FBP225 is valid (Step 402, NO branch), processing returns to the IDLE state 401, as there is no capacity remaining in buffer memory 120 to store the sRIO request packet read from the selected queue.
Within WRITE_PACKET state 403, write control logic 101 retrieves the next valid free buffer pointer value from free buffer pointer list 111. In the described embodiment, free buffer pointer list 111 is operated as a circular buffer, wherein free buffer pointer entry FBP0 is initially accessed, followed sequentially by free buffer pointer entries FBP1-FBP255. During the first cycle through free buffer pointer list 111, all of the free buffer pointer entries FBP0-FBP255 will be valid. However, during subsequent cycles through free buffer pointer list 111, some of the free buffer pointer entries FBP0-FBP255 may be invalid (indicating that the corresponding memory blocks currently store active request packets). During these subsequent cycles through free buffer pointer list 111, write control logic 101 ignores (skips) these invalid free buffer pointer entries, effectively ‘removing’ these invalid free pointer entries (and the associated memory blocks) from free buffer pointer list 111.
Write control logic 101 uses the retrieved valid free buffer pointer value as a write address to access the corresponding memory block in buffer memory 120. Write control logic then causes the sRIO request packet read from the selected queue to be written to this memory block in buffer memory 120. For example, write control logic 101 initially retrieves the free buffer pointer value of ‘0000 0000’ from the first valid free buffer pointer entry FBP0, and uses this free buffer pointer value to address the first memory block MB0 of buffer memory 120. Write control logic 101 then causes the first sRIO request packet read from queues Q0-Q3 to be written to this addressed memory block MB0.
Write control logic 101 monitors the sRIO request packet being written to buffer memory 120 to determine when an end-of-packet (EOP) indicator associated with the sRIO request packet has been activated (EOP=1). Upon detecting the activated end-of-packet indicator, write control logic 101 completes the writing of the sRIO request packet to the associated memory block, and processing proceeds to WRITE_DONE state 404.
Within WRITE_DONE state 404, write control logic 101 causes the water level of the selected queue to be decremented by one, to reflect the fact that a sRIO request packet has been read out of the selected queue (and stored in buffer memory 120). In addition, write control logic 101 invalidates the free buffer pointer entry previously used to write the sRIO request packet to buffer memory 120 during WRITE_PACKET state 403. For example, in the present example, write control logic 101 resets the valid bit of free buffer pointer entry FBP0 to a logic ‘0’ (invalid) state. This prevents free buffer pointer entry FBP0 (and thereby the corresponding memory block MB0) from being reused until after this free buffer pointer entry FBP0 is validated. The manner in which free buffer pointer entries are re-validated is described in more detail below.
Also within WRITE_DONE state 404, write control logic 101 validates the used buffer pointer entry associated with the memory block to which the sRIO request packet was written during WRITE_PACKET state 403. Thus, in the present example, write control logic 101 sets the valid bit of used buffer pointer entry UBP0 to a logic ‘1’ (valid) state. As described below, this valid used buffer pointer entry UBP0 causes the sRIO request packet stored in the corresponding memory block MB0 to be read out to sRIO port 1. Note that setting the valid bit of a used buffer pointer entry may be viewed as ‘adding’ the associated used buffer pointer value to used buffer pointer list 112. When the above-described steps of WRITE_DONE state 404 have been completed, processing returns to IDLE state 401.
Within READ_PACKET state 503, request control logic 102 retrieves a valid used buffer pointer value from used buffer pointer list 112. In the described embodiment, request control logic 102 retrieves each validated used buffer pointer value in a first in (i.e., first validated), first out (i.e., first retrieved) order. Request control logic 102 uses the retrieved used buffer pointer value as a read address to retrieve the sRIO request packet stored in the corresponding memory block of buffer memory 120. Request control logic 102 also appends the retrieved used buffer pointer value to the retrieved sRIO request packet, such that this used buffer pointer value forms the transaction ID value of the retrieved sRIO request packet. The retrieved sRIO request packet and the associated transaction ID value are routed through sRIO port 1 to an sRIO end-point.
Thus, in the present example, request control logic 102 initially retrieves the used buffer pointer value of ‘0000 0000’ from the valid used buffer pointer entry UBP0, and uses this valid used buffer pointer value to read the sRIO request packet previously written to the first memory block MB0 of buffer memory 120. Request control logic 102 also appends the used buffer pointer value of ‘0000 0000’ to the retrieved sRIO request packet, such that the retrieved sRIO request packet is effectively assigned a transaction ID value of “0000 0000’.
Request control logic 102 monitors the sRIO request packet being read from buffer memory 120 to determine when the end-of-packet (EOP) indicator associated with the sRIO request packet has been activated (EOP=1). Upon detecting the activated end-of-packet indicator, request control logic 101 completes the reading of the sRIO request packet, and processing proceeds to READ_DONE state 504.
Within READ_DONE state 504, request control logic 102 loads and then starts a response timeout timer in timeout timer block 103. More specifically, request control logic 102 loads and starts a response timeout timer that is associated with the transaction ID value assigned to the sRIO request packet transmitted to sRIO port 1 during READ_PACKET state 503. Thus, in the present example, request control logic 102 loads and starts a response timeout timer associated with the transaction ID value ‘0000 0000’. The response timeout timer is initially loaded with a request timeout count, which is selected to correspond with a time period during which a response to the transmitted request packet should be received.
In addition, request control logic 102 invalidates the used buffer pointer entry previously used to read the sRIO request packet from buffer memory 120 during READ_PACKET state 503. Thus, in the present example, request control logic 102 resets the valid bit of used buffer pointer entry UBP0 to a logic ‘0’ (invalid) state. While the used buffer pointer entry UBP0 has an invalid state, request control logic 102 will not read the corresponding request packet from buffer memory 120 (although this request packet temporarily remains in buffer memory 120, in case this request packet needs to be re-sent). The manner in which a request packet may be re-sent is described in more detail below.
Also within READ_DONE state 504, request control logic 102 validates the request buffer pointer entry associated with the memory block from which the sRIO request packet was read during READ_PACKET state 503. Thus, in the present example, request control logic 102 sets the valid bit of request buffer pointer entry RBP0 to a logic ‘1’ (valid) state. As described below, this valid request buffer pointer entry RBP0 indicates that a sRIO response packet having a transaction ID value equal to the corresponding request buffer pointer value (i.e., ‘0000 0000’), should be received on sRIO port 1. Note that setting the valid bit of a request buffer pointer entry may be viewed as ‘adding’ the associated request buffer pointer value (or the corresponding memory block) to request buffer pointer list 113. When the above-described steps of READ_DONE state 504 have been completed, processing returns to IDLE state 501.
Returning now to Step 502, it is possible that there are no valid used buffer pointer entries (Step 502, NO branch). In this case, request control logic 102 will determine whether any of the previously started request timeout timers have expired (i.e., counted down to a zero value). If not (Step 505, NO branch), processing returns to IDLE state 501. However, if a request timeout timer has expired (Step 505, YES branch), processing proceeds to RESEND_PACKET state 506. In RESEND_PACKET state 506, request control logic 102 re-sends a sRIO request packet that did not receive a response within the expected request period. More specifically, request control logic 102 identifies the request timeout timer that expired, and then validates the associated used buffer pointer entry. In the present example, if the request timeout timer associated with transaction ID value ‘0000 0000’ has expired, this indicates that the sRIO request packet previously read from address ‘0000 0000’ of buffer memory 120 did not result in receipt of a corresponding sRIO response packet within the timeout period. In this case, request control logic 102 sets the valid bit of the corresponding used buffer pointer entry UBP0 to a logic ‘1’ state. In one embodiment, this valid bit is only set to a logic ‘1’ state if the valid bit of the corresponding request buffer pointer entry RBP0 also has a logic ‘1’ state. Processing then returns to IDLE state 501. The valid used buffer pointer entry UBP0 is detected in Step 502, and processing proceeds through READ_PACKET state 503 and READ_DONE state 504 in the manner described above, thereby causing the associated sRIO request packet to be re-sent. In one embodiment, if the sRIO request packet is re-sent a predetermined number of times (e.g., 16 times), and the request timeout timer expires each of these times, then the sRIO request packet may stop being re-sent, and an error logged.
Within RESPONSE_CHECK state 603, response handler logic 104 extracts the transaction ID value from the received sRIO response packet, and compares this response transaction ID value with any valid request buffer pointer values stored in request buffer pointer list 113. If response handler logic 104 detects a match, this indicates that the received sRIO response packet represents a response to a previously transmitted sRIO request packet. Under these conditions (Step 604, YES branch), processing proceeds to RESPONSE_DONE state 605. In the present example, an sRIO response packet having a transaction ID value of ‘0000 0000’ would result in match with the valid request buffer pointer value of request buffer pointer entry RBP0. If response handler logic 104 does not detect a match (Step 604, NO branch), the received sRIO response packet does not represent a response to a previously transmitted sRIO request packet, and processing returns to IDLE state 601.
Within RESPONSE_DONE state 605, response handler logic 104 stops and clears the request timeout timer associated with the response transaction ID value. In the present example, response handler logic 104 stops and clears the request timeout timer associated with the transaction ID value ‘0000 0000’.
Response handler logic 104 also invalidates the request buffer pointer entry associated with the response packet transaction ID value. In the present example, response handler logic 104 resets the valid bit of request buffer pointer entry RBP0 to a logic ‘0’ state to invalidate this entry. Note that invalidating the request buffer pointer entry RBP0 in this manner effectively ‘removes’ this request buffer pointer entry (and the corresponding memory block) from the request buffer pointer list 113.
Response handler logic 104 also validates the free buffer pointer value associated with the response packet transaction ID value. In the present example, response handler logic 104 sets the valid bit of free buffer pointer entry FBP0 to a logic ‘1’ state to re-validate this entry. Note that re-validating the free buffer pointer entry FBP0 in this manner effectively ‘adds’ this free buffer pointer entry (and the corresponding memory block MB0) to the free buffer pointer list 111, such that the associated memory buffer MB0 can be re-used to store another sRIO request packet provided by queues Q0-Q3. Processing then proceeds from RESPONSE_DONE state 605 to IDLE state 601.
In the above-described manner, serial buffer 100 operates to allow sRIO response packets to be received in a different order than the corresponding sRIO request packets were transmitted, without experiencing head of line blocking conditions.
Although the present invention has been described in connection with various embodiments, it is understood that variations of these embodiments would be obvious to one of ordinary skill in the art. For example, although the described embodiments use valid indicator bits to effectively ‘move’ the memory blocks between free buffer pointer list 111, used buffer pointer list 112 and request buffer pointer list 113, it is understood that other means can be used to ‘move’ the memory blocks between these buffer pointer lists 111-113 in the manner required by the present invention. Thus, the present invention is limited only by the following claims.
Number | Name | Date | Kind |
---|---|---|---|
4214305 | Tokita | Jul 1980 | A |
4335277 | Puri | Jun 1982 | A |
4782485 | Gollub | Nov 1988 | A |
4866704 | Bergman | Sep 1989 | A |
5018136 | Gollub | May 1991 | A |
5107489 | Brown et al. | Apr 1992 | A |
5245704 | Weber et al. | Sep 1993 | A |
5257384 | Farrand et al. | Oct 1993 | A |
5313454 | Bustini et al. | May 1994 | A |
5426643 | Smolinske et al. | Jun 1995 | A |
5530902 | McRoberts et al. | Jun 1996 | A |
5572697 | Chevalier et al. | Nov 1996 | A |
5655140 | Haddock | Aug 1997 | A |
5717883 | Sager | Feb 1998 | A |
5777547 | Waldrop | Jul 1998 | A |
5916309 | Brown et al. | Jun 1999 | A |
5924112 | Barber et al. | Jul 1999 | A |
5951706 | Benner | Sep 1999 | A |
5983301 | Baker et al. | Nov 1999 | A |
6046817 | Brown et al. | Apr 2000 | A |
6047319 | Olson | Apr 2000 | A |
6061089 | Tonkin et al. | May 2000 | A |
6084631 | Tonkin et al. | Jul 2000 | A |
6157621 | Brown et al. | Dec 2000 | A |
6233629 | Castellano | May 2001 | B1 |
6271866 | Hancock et al. | Aug 2001 | B1 |
6333938 | Baker | Dec 2001 | B1 |
6347344 | Baker et al. | Feb 2002 | B1 |
6425021 | Ghodrat et al. | Jul 2002 | B1 |
6442687 | Savage | Aug 2002 | B1 |
6510138 | Pannell | Jan 2003 | B1 |
6546496 | Wang et al. | Apr 2003 | B1 |
6564271 | Micalizzi et al. | May 2003 | B2 |
6581175 | Crump et al. | Jun 2003 | B1 |
6631429 | Cota-Robles et al. | Oct 2003 | B2 |
6636483 | Pannell | Oct 2003 | B1 |
6658477 | Lisitsa et al. | Dec 2003 | B1 |
6748020 | Eifrig et al. | Jun 2004 | B1 |
6862298 | Smith et al. | Mar 2005 | B1 |
6907479 | Karnstedt et al. | Jun 2005 | B2 |
6944186 | Zaun et al. | Sep 2005 | B2 |
6985969 | Cheng | Jan 2006 | B1 |
6993602 | Merrill et al. | Jan 2006 | B2 |
7013354 | Beck et al. | Mar 2006 | B1 |
7088735 | Reohr, Jr. et al. | Aug 2006 | B1 |
7212962 | Masushige et al. | May 2007 | B2 |
7213094 | Edirisooriya et al. | May 2007 | B2 |
7436858 | Goren et al. | Oct 2008 | B2 |
7594002 | Thorpe et al. | Sep 2009 | B1 |
7617346 | Wang et al. | Nov 2009 | B2 |
7631128 | Sgrosso et al. | Dec 2009 | B1 |
7680944 | Taghizadeh et al. | Mar 2010 | B1 |
7707335 | Lidji et al. | Apr 2010 | B2 |
7710969 | Szczepanek et al. | May 2010 | B2 |
7764608 | Breynaert et al. | Jul 2010 | B2 |
20010054116 | Cheng | Dec 2001 | A1 |
20020080791 | Sylvain | Jun 2002 | A1 |
20020171741 | Tonkin et al. | Nov 2002 | A1 |
20020181481 | Iny | Dec 2002 | A1 |
20040103333 | Martwick et al. | May 2004 | A1 |
20040225779 | Zhao et al. | Nov 2004 | A1 |
20040240478 | Goren et al. | Dec 2004 | A1 |
20050100049 | Siminoff | May 2005 | A1 |
20050100114 | Satagopan et al. | May 2005 | A1 |
20050105556 | Joung et al. | May 2005 | A1 |
20050135390 | Anderson et al. | Jun 2005 | A1 |
20050144341 | Schmidt et al. | Jun 2005 | A1 |
20050246424 | Panec et al. | Nov 2005 | A1 |
20050254518 | Fujimori | Nov 2005 | A1 |
20050283598 | Gaskins et al. | Dec 2005 | A1 |
20060018329 | Nielsen et al. | Jan 2006 | A1 |
20060056435 | Biran et al. | Mar 2006 | A1 |
20060153238 | Bar-On et al. | Jul 2006 | A1 |
20060224812 | Kapoor et al. | Oct 2006 | A1 |
20060251088 | Thubert et al. | Nov 2006 | A1 |
20070050564 | Gunna et al. | Mar 2007 | A1 |
20070110046 | Farrell et al. | May 2007 | A1 |
20070130410 | Keller et al. | Jun 2007 | A1 |
20070230403 | Douglas et al. | Oct 2007 | A1 |
20080008211 | Zilbershtein et al. | Jan 2008 | A1 |
20080082840 | Kendall et al. | Apr 2008 | A1 |
20080096433 | Bixler et al. | Apr 2008 | A1 |
20080205422 | Wang et al. | Aug 2008 | A1 |
20080205438 | Juan et al. | Aug 2008 | A1 |
20080209084 | Wang et al. | Aug 2008 | A1 |
20080209089 | Mo et al. | Aug 2008 | A1 |
20080301327 | Archer et al. | Dec 2008 | A1 |
20090052323 | Breynaert et al. | Feb 2009 | A1 |
20090086751 | Wang | Apr 2009 | A1 |
20090181663 | Hu et al. | Jul 2009 | A1 |
20090225770 | Wang et al. | Sep 2009 | A1 |
20090292935 | Hallnor et al. | Nov 2009 | A1 |
20100111526 | Bader | May 2010 | A1 |
Number | Date | Country | |
---|---|---|---|
20090228630 A1 | Sep 2009 | US |