From 09d8a1e1252eba582fd8450ee31e784b54910f7d Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Tue, 30 May 2006 18:57:42 -0400 Subject: Add a very poor implementation of dealing with retries on timing requests. It is especially slow with tracing on since it ends up being O(N^2). But it's probably going to have to change for the real bus anyway, so it should be rewritten then Change recvRetry() to not accept a packet. Sendtiming should be called again (and can respond with false or true) Removed Port Blocked/Unblocked and replaced with sendRetry(). Remove possibility of packet mangling if packet is going to be refused anyway in bridge src/cpu/simple/atomic.cc: src/cpu/simple/atomic.hh: src/cpu/simple/timing.cc: src/cpu/simple/timing.hh: Change recvRetry() to not accept a packet. Sendtiming should be called again (and can respond with false or true) src/dev/io_device.cc: src/dev/io_device.hh: Make DMA Timing requests/responses work. Change recvRetry() to not accept a packet. Sendtiming should be called again (and can respond with false or true) src/mem/bridge.cc: src/mem/bridge.hh: Change recvRetry() to not accept a packet. Sendtiming should be called again (and can respond with false or true) Removed Port Blocked/Unblocked and replaced with sendRetry(). Remove posibility of packet mangling if packet is going to be refused anyway. src/mem/bus.cc: src/mem/bus.hh: Add a very poor implementation of dealing with retries on timing requests. It is especially slow with tracing on since it ends up being O(N^2). But it's probably going to have to change for the real bus anyway, so it should be rewritten then src/mem/port.hh: Change recvRetry() to not accept a packet. Sendtiming should be called again (and can respond with false or true) Removed Blocked/Unblocked port status, their functionality is really duplicated in the recvRetry() method --HG-- extra : convert_revision : fab613404be54bfa7a4c67572bae7b559169e573 --- src/dev/io_device.hh | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'src/dev/io_device.hh') diff --git a/src/dev/io_device.hh b/src/dev/io_device.hh index 74730ad92..5836da3c9 100644 --- a/src/dev/io_device.hh +++ b/src/dev/io_device.hh @@ -105,8 +105,9 @@ class PioPort : public Port void sendTiming(Packet *pkt, Tick time) { new PioPort::SendEvent(this, pkt, time); } - /** This function pops the last element off the transmit list and sends it.*/ - virtual Packet *recvRetry(); + /** This function is notification that the device should attempt to send a + * packet again. */ + virtual void recvRetry(); public: PioPort(PioDevice *dev, Platform *p); @@ -146,28 +147,11 @@ class DmaPort : public Port virtual void recvStatusChange(Status status) { ; } - virtual Packet *recvRetry() ; + virtual void recvRetry() ; virtual void getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop) { resp.clear(); snoop.clear(); } - class SendEvent : public Event - { - DmaPort *port; - Packet *packet; - - SendEvent(PioPort *p, Packet *pkt, Tick t) - : Event(&mainEventQueue), packet(pkt) - { schedule(curTick + t); } - - virtual void process(); - - virtual const char *description() - { return "Future scheduled sendTiming event"; } - - friend class DmaPort; - }; - void sendDma(Packet *pkt); public: @@ -178,8 +162,6 @@ class DmaPort : public Port bool dmaPending() { return pendingCount > 0; } - friend class DmaPort::SendEvent; - }; /** -- cgit v1.2.3