Low-latency bridge to support out-of-order execution
This document describes systems and techniques for a low-latency bridge to support out-of-order execution. The described systems and techniques can facilitate out-of-order execution by a memory controller of in-order transaction requests. When it receives transaction responses associated with in-order transaction requests, the bridge can send a first transaction response without storing it in a reorder buffer. Similarly, the bridge can determine whether a next transaction response is available to send to the respective client. The bridge introduces latency to a larger system (e.g., an SoC) only when a secondary response (e.g., not first) of in-order transaction responses is received first. In this way, the memory controller can process transaction requests from one or more clients with minimal latency introduced by the bridge and a smaller reorder buffer.
1 . An apparatus comprising:
a memory controller operatively connected to one or more memories, the memory controller configured to process transaction requests from one or more clients to access data in the one or more memories; and
a bridge operatively connected to the memory controller and the one or more clients, the bridge comprising a reorder buffer and configured to:
receive multiple transaction requests from a first client of the one or more clients;
receive multiple transaction responses from the memory controller, each transaction response of the multiple transaction responses being associated with a corresponding transaction request of the multiple transaction requests, the multiple transaction responses to be returned, by the bridge, in-order to the first client;
responsive to receiving each transaction response of the multiple transaction responses:
determine a response sequence number associated with the transaction response;
determine a response counter value, the response counter value having a value that incrementally increases and indicates a next transaction response to send to the first client; and
responsive to the response sequence number being equal to the response counter value, transmit data associated with the transaction response to the first client; or
responsive to the response sequence number not being equal to the response counter value, store data associated with the transaction response to the reorder buffer and set the response sequence number associated with the transaction response as available.
2 . The apparatus of claim 1 , wherein the transaction response comprises a first transaction response associated with the corresponding transaction request of the first client.
3 . The apparatus of claim 2 , wherein the bridge is further configured to:
determine whether a response sequence number of a second transaction response of the multiple transaction responses is next in an order in which the multiple transaction responses are to be returned; and
responsive to a determination that data of the second transaction response is available in the reorder buffer for sending to the first client:
read data associated with the second transaction response from the reorder buffer;
transmit the data associated with the second transaction response to the first client; and
increment a response counter value by one effective to indicate a next transaction response to send to the first client.
4 . The apparatus of claim 2 , wherein the bridge is further configured to:
determine whether a response sequence number of another transaction response of the multiple transaction responses is equal to the response counter value; and
responsive to a determination that the other transaction response with the response sequence number equal to the response counter value is available for sending to the first client:
read data associated with the other transaction response from the reorder buffer;
transmit the data associated with the other transaction response to the first client; and
increment the response counter value by one.
5 . The apparatus of claim 1 , wherein;
the response sequence numbers or the response counter value is associated with a request identifier for the multiple transaction responses that are to be returned by the bridge in-order.
6 . The apparatus of claim 1 , wherein:
the multiple transaction requests comprise a first transaction request; and
the bridge, responsive to receiving the first transaction request from the first client, is further configured to:
determine a first request identifier associated with the first transaction request;
determine whether the first request identifier matches a second request identifier associated with a second transaction request pending in the apparatus; and
responsive to a determination that the first request identifier matches the second request identifier associated with the second transaction request pending in the apparatus, append the first transaction request to a linked list that comprises the second transaction request; or
responsive to a determination that the first request identifier does not match the second request identifier associated with the second transaction request pending in the apparatus, assign a value to an identifier flag for the first request identifier associated with the first transaction request.
7 . The apparatus of claim 6 , wherein the bridge is further configured to:
determine that a response sequence number is available for the first transaction request; and
assign a first response sequence number to the first transaction request, the first response sequence number having a value that is larger than a value of a second response sequence number of the second transaction request.
8 . The apparatus of claim 6 , wherein the bridge is further configured to:
determine that a response sequence number is not available for the first transaction request; and
stall execution of the first transaction request until the response sequence number is available.
9 . The apparatus of claim 6 , wherein the identifier flag comprises a one-bit flag for the first request identifier associated with the first transaction request.
10 . A method comprising:
receiving, by a bridge, multiple transaction requests from a first client of one or more clients, the bridge operatively connected to the one or more clients and comprising a reorder buffer;
receiving, by the bridge, multiple transaction responses from a memory controller, each transaction response of the multiple transaction responses being associated with a corresponding transaction request of the multiple transaction requests, the multiple transaction responses to be returned, by the bridge, in-order to the first client, the memory controller operatively connected to one or more memories and configured to process transaction requests from the one or more clients to access data in the one or more memories;
in response to receiving each of the multiple transaction responses from the memory controller:
determining a response sequence number associated with the transaction response;
determining a response counter value, the response counter value having a value that incrementally increases and indicates a next transaction response to send to the first client; and
responsive to the response sequence number being equal to the response counter value, transmitting data associated with the transaction response to the first client; or
responsive to the response sequence number not being equal to the response counter value, storing data associated with the transaction response to the reorder buffer and set the response sequence number associated with the transaction response as available.
11 . The method of claim 10 , wherein: the transaction response comprises a first transaction response associated with the corresponding transaction request of the first client, and the method further comprises transmitting the data associated with first the transaction response to the first client.
12 . The method of claim 11 , further comprising:
determining whether a response sequence number of a second transaction response of the multiple transaction responses is next in an order in which the multiple transaction responses are to be returned; and
responsive to determining that data of the second transaction response is available in the reorder buffer for sending to the first client:
reading data associated with the second transaction response from the reorder buffer;
transmitting the data associated with the second transaction response to the first client; and
incrementing a response counter value by one effective to indicate a next transaction response to send to the first client.
13 . The method claim 12 , further comprising:
determining whether a response sequence number of another transaction response of the multiple transaction responses is equal to the response counter value; and
responsive to determining that the other transaction response with the response sequence number equal to the response counter value is available for sending to the first client:
reading data associated with the other transaction response from the reorder buffer;
transmit the data associated with the other transaction response to the first client; and
incrementing the response counter value by one.
14 . The method of claim 10 , wherein the response sequence numbers or the response counter value is associated with a request identifier of the multiple transaction responses that are to be returned by the bridge in-order.
15 . The method of claim 10 , wherein the multiple transaction requests received from the first client comprises a first transaction request and the method further comprises:
determining a first request identifier associated with the first transaction request;
determining whether the first request identifier matches a second request identifier associated with a second transaction request pending in the bridge; and
responsive to determining that the first request identifier matches the second request identifier associated with the second transaction request pending in the bridge, appending the first transaction request to a linked list associated with the second request identifier; or
responsive to determining that the first request identifier does not match the second request identifier associated with the second transaction request pending in the bridge, assigning a value to an identifier flag for the first request identifier associated with the first transaction request.
16 . The method of claim 15 , the method further comprising:
determining that a response sequence number is available for the first transaction request; and
assigning a first response sequence number to the first transaction request, the first response sequence number having a value that is larger than a value of a second response sequence number of the second transaction request.
17 . The method of claim 15 , further comprising:
determining that a response sequence number is not available for the first transaction request; and
stalling execution of the first transaction request until the response sequence number is available.
18 . The method of claim 15 , wherein the identifier flag comprises a one-bit flag for the first request identifier associated with the first transaction request.
19 . The method of claim 10 , further comprising:
determining whether the response sequence number associated with the transaction response is first in an order in which the multiple transaction responses are to be returned to the first client; and
responsive to the response sequence number of the transaction response being first in the order in which the multiple transaction responses are to be returned, transmitting the data associated with the transaction response directly to the first client without storing the data in the reorder buffer; or
responsive to the response sequence number of the transaction response not being first in the order in which the multiple transaction responses are to be returned, storing the data associated with the transaction response to the reorder buffer.
20 . The apparatus of claim 1 , wherein the bridge is further configured to:
determine whether the response sequence number associated with the transaction response is first in an order in which the multiple transaction responses are to be returned to the first client; and
responsive to the response sequence number of the transaction response being first in the order, transmit the data associated with the transaction response directly to the first client without storing the data in the reorder buffer; or
responsive to the response sequence number of the transaction response not being first in the order, store the data associated with the transaction response to the reorder buffer.