summaryrefslogtreecommitdiff
path: root/src/mem/bridge.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-05-09 18:20:24 -0400
committerAli Saidi <saidi@eecs.umich.edu>2007-05-09 18:20:24 -0400
commit3c608bf76535dc1f08a9563b417b5c6fadeab3ff (patch)
treec262a231f9858a75eeac4f863ab1c288b5100a8d /src/mem/bridge.hh
parent37b45e3c8cb2aef57e1d5dd8efd46705b8d46c16 (diff)
downloadgem5-3c608bf76535dc1f08a9563b417b5c6fadeab3ff.tar.xz
add a backoff algorithm when nacks are received by devices
add seperate response buffers and request queue sizes in bus bridge add delay to respond to a nack in the bus bridge src/dev/i8254xGBe.cc: src/dev/ide_ctrl.cc: src/dev/ns_gige.cc: src/dev/pcidev.hh: src/dev/sinic.cc: add backoff delay parameters src/dev/io_device.cc: src/dev/io_device.hh: add a backoff algorithm when nacks are received. src/mem/bridge.cc: src/mem/bridge.hh: add seperate response buffers and request queue sizes add a new parameters to specify how long before a nack in ready to go after a packet that needs to be nacked is received src/mem/cache/cache_impl.hh: assert on the src/mem/tport.cc: add a friendly assert to make sure the packet was inserted into the list --HG-- extra : convert_revision : 3595ad932015a4ce2bb72772da7850ad91bd09b1
Diffstat (limited to 'src/mem/bridge.hh')
-rw-r--r--src/mem/bridge.hh43
1 files changed, 35 insertions, 8 deletions
diff --git a/src/mem/bridge.hh b/src/mem/bridge.hh
index 1fa9cdffc..cb5a6baed 100644
--- a/src/mem/bridge.hh
+++ b/src/mem/bridge.hh
@@ -66,6 +66,9 @@ class Bridge : public MemObject
/** Minimum delay though this bridge. */
Tick delay;
+ /** Min delay to respond to a nack. */
+ Tick nackDelay;
+
bool fixPartialWrite;
class PacketBuffer : public Packet::SenderState {
@@ -149,13 +152,20 @@ class Bridge : public MemObject
int outstandingResponses;
int queuedRequests;
+ /** If we're waiting for a retry to happen.*/
+ bool inRetry;
+
/** Max queue size for outbound packets */
- int queueLimit;
+ int reqQueueLimit;
+
+ /** Max queue size for reserved responses. */
+ int respQueueLimit;
/**
* Is this side blocked from accepting outbound packets?
*/
- bool queueFull();
+ bool respQueueFull();
+ bool reqQueueFull();
void queueForSendTiming(PacketPtr pkt);
@@ -186,11 +196,10 @@ class Bridge : public MemObject
SendEvent sendEvent;
public:
-
/** Constructor for the BusPort.*/
- BridgePort(const std::string &_name,
- Bridge *_bridge, BridgePort *_otherPort,
- int _delay, int _queueLimit, bool fix_partial_write);
+ BridgePort(const std::string &_name, Bridge *_bridge,
+ BridgePort *_otherPort, int _delay, int _nack_delay,
+ int _req_limit, int _resp_limit, bool fix_partial_write);
protected:
@@ -226,14 +235,32 @@ class Bridge : public MemObject
bool ackWrites;
public:
+ struct Params
+ {
+ std::string name;
+ int req_size_a;
+ int req_size_b;
+ int resp_size_a;
+ int resp_size_b;
+ Tick delay;
+ Tick nack_delay;
+ bool write_ack;
+ bool fix_partial_write_a;
+ bool fix_partial_write_b;
+ };
+
+ protected:
+ Params *_params;
+
+ public:
+ const Params *params() const { return _params; }
/** A function used to return the port associated with this bus object. */
virtual Port *getPort(const std::string &if_name, int idx = -1);
virtual void init();
- Bridge(const std::string &n, int qsa, int qsb, Tick _delay, int write_ack,
- bool fix_partial_write_a, bool fix_partial_write_b);
+ Bridge(Params *p);
};
#endif //__MEM_BUS_HH__