Rename Port address range functions... like the block size
authorSteve Reinhardt <stever@eecs.umich.edu>
Tue, 21 Feb 2006 17:32:45 +0000 (12:32 -0500)
committerSteve Reinhardt <stever@eecs.umich.edu>
Tue, 21 Feb 2006 17:32:45 +0000 (12:32 -0500)
functions, the send/recv*Query naming seems awkward.
Also create a typedef for AddrRangeList.

--HG--
extra : convert_revision : dd0ff3fad06ec329c82c199700d0a6264f1271d3

dev/io_device.hh
mem/bus.hh
mem/port.hh

index 88dd32733b4412ecb6744e937a38fd5f9925f6e9..a79c3f20ac049344a33b59fbbe9ee916aef790a7 100644 (file)
@@ -50,8 +50,7 @@ class PioPort : public Port
     virtual void recvFunctional(Packet &pkt)
     { device->recvAtomic(pkt) };
 
-    virtual void recvAddressRangeQuery(std::list<Range<Addr> > &range_list,
-                                                 bool &owner)
+    virtual void getDeviceAddressRanges(AddrRangeList &range_list, bool &owner)
     { device->addressRanges(range_list, owner); }
 
     void sendTiming(Packet &pkt, Tick time)
@@ -101,8 +100,7 @@ class DmaPort : public Port
     virtual Packet *recvRetry()
     { return transmitList.pop_front();  }
 
-    virtual void recvAddressRangeQuery(std::list<Range<Addr> > &range_list,
-                                                 bool &owner)
+    virtual void getDeviceAddressRanges(AddrRangeList &range_list, bool &owner)
     { range_list.clear(); owner = true; }
 
     void dmaAction(Memory::Command cmd, DmaPort port, Addr addr, int size,
@@ -146,8 +144,7 @@ class PioDevice : public SimObject
 
     PioPort *pioPort;
 
-    virtual void addressRanges(std::list<Range<Addr> > &range_list,
-                                   bool &owner) = 0;
+    virtual void addressRanges(AddrRangeList &range_list, bool &owner) = 0;
 
     virtual read(Packet &pkt) = 0;
 
index e1b29bac6899d4fbe18f58245b81cd37984b5108..e26065295df3af4fb11bf51e17cec06e80bc1e25 100644 (file)
@@ -103,8 +103,7 @@ class Bus : public MemObject
         // downstream from this bus, yes?  That is, the union of all
         // the 'owned' address ranges of all the other interfaces on
         // this bus...
-        virtual void addressRanges(std::list<Range<Addr> > &range_list,
-                                   bool &owner);
+        virtual void addressRanges(AddrRangeList &range_list, bool &owner);
     };
 
     /** A count of the number of interfaces connected to this bus. */
index 3098b663ccc6685c712ecd24fc7abe226748c93f..c6dcb5d811318ca33777686cf5860b4830fe757b 100644 (file)
 #include "mem/packet.hh"
 #include "mem/request.hh"
 
+/** This typedef is used to clean up the parameter list of
+ * getDeviceAddressRanges() and getPeerAddressRanges().  It's declared
+ * outside the Port object since it's also used by some mem objects.
+ * Eventually we should move this typedef to wherever Addr is
+ * defined.
+ */
+
+typedef std::list<Range<Addr> > AddrRangeList;
+
 /**
  * Ports are used to interface memory objects to
  * each other.  They will always come in pairs, and we refer to the other
@@ -123,8 +132,9 @@ class Port
         an object wants to own some ranges and snoop on others, it will
         need to use two different ports.
     */
-    virtual void recvAddressRangesQuery(std::list<Range<Addr> > &range_list,
-                                        bool &owner) { panic("??"); }
+    virtual void getDeviceAddressRanges(AddrRangeList &range_list,
+                                        bool &owner)
+    { panic("??"); }
 
   public:
 
@@ -172,9 +182,8 @@ class Port
     /** Called by the associated device if it wishes to find out the address
         ranges connected to the peer ports devices.
     */
-    void sendAddressRangesQuery(std::list<Range<Addr> > &range_list,
-                                bool &owner)
-    { peer->recvAddressRangesQuery(range_list, owner); }
+    void getPeerAddressRanges(AddrRangeList &range_list, bool &owner)
+    { peer->getDeviceAddressRanges(range_list, owner); }
 
     // Do we need similar wrappers for sendAtomic()?  If not, should
     // we drop the "Functional" from the names?