summaryrefslogtreecommitdiff
path: root/mem
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-01-31 14:20:48 -0500
committerAli Saidi <saidi@eecs.umich.edu>2006-01-31 14:20:48 -0500
commitfccd113e2f628e829e83dfab9288b8967a9bd539 (patch)
treeb449cbf174a771b064ca2067529b6cff89b8b4a5 /mem
parent95088d141fb3006a39c342af9501f0203772cf79 (diff)
parent4875b3346709d72e0be99fb6ccede65550b91f94 (diff)
downloadgem5-fccd113e2f628e829e83dfab9288b8967a9bd539.tar.xz
Merge zizzer:/bk/newmem
into zeep.eecs.umich.edu:/z/saidi/work/m5.newmem --HG-- extra : convert_revision : 3eb1a665cb813df974aa2815a794b459473c0a77
Diffstat (limited to 'mem')
-rw-r--r--mem/bus.hh12
-rw-r--r--mem/port.hh32
-rw-r--r--mem/request.hh37
3 files changed, 34 insertions, 47 deletions
diff --git a/mem/bus.hh b/mem/bus.hh
index 57d819304..0fd450c4f 100644
--- a/mem/bus.hh
+++ b/mem/bus.hh
@@ -47,15 +47,15 @@ class Bus : public MemObject
{
/** Function called by the port when the bus is recieving a Timing
transaction.*/
- SendResult recvTiming(Packet &pkt, int id);
+ bool recvTiming(Packet &pkt, int id);
/** Function called by the port when the bus is recieving a Atomic
transaction.*/
- SendResult recvAtomic(Packet &pkt, int id);
+ Tick recvAtomic(Packet &pkt, int id);
/** Function called by the port when the bus is recieving a Functional
transaction.*/
- SendResult recvFunctional(Packet &pkt, int id);
+ void recvFunctional(Packet &pkt, int id);
/** Function called by the port when the bus is recieving a status change.*/
void recvStatusChange(Port::Status status, int id);
@@ -81,17 +81,17 @@ class Bus : public MemObject
/** When reciving a timing request from the peer port (at id),
pass it to the bus. */
- virtual SendResult recvTiming(Packet &pkt)
+ virtual bool recvTiming(Packet &pkt)
{ return bus->recvTiming(pkt, id); }
/** When reciving a Atomic requestfrom the peer port (at id),
pass it to the bus. */
- virtual SendResult recvAtomic(Packet &pkt)
+ virtual Tick recvAtomic(Packet &pkt)
{ return bus->recvAtomic(pkt, id); }
/** When reciving a Functional requestfrom the peer port (at id),
pass it to the bus. */
- virtual SendResult recvFunctional(Packet &pkt)
+ virtual void recvFunctional(Packet &pkt)
{ return bus->recvFunctional(pkt, id); }
/** When reciving a status changefrom the peer port (at id),
diff --git a/mem/port.hh b/mem/port.hh
index 05a2c59ff..1cbb18f00 100644
--- a/mem/port.hh
+++ b/mem/port.hh
@@ -95,25 +95,13 @@ class Port
protected:
/** Called to recive a timing call from the peer port. */
- virtual SendResult recvTiming(Packet &pkt) = 0;
-
- /** Virtual function that can be used to handle scheduling an event
- to send the recvTiming at a given time. This is for direct
- connection without a interconnect. The bus will override
- this in it's port class because the bus does the timing.
- This is used to insert timing when an interconnect doesn't
- have it's own event queue.
- */
- virtual SendResult recvTiming(Packet &pkt, Tick t)
- {
- // schedule event to call recvTiming(pkt) @ tick t
- }
+ virtual bool recvTiming(Packet &pkt) = 0;
/** Called to recive a atomic call from the peer port. */
- virtual SendResult recvAtomic(Packet &pkt) = 0;
+ virtual Tick recvAtomic(Packet &pkt) = 0;
/** Called to recive a functional call from the peer port. */
- virtual SendResult recvFunctional(Packet &pkt) = 0;
+ virtual void recvFunctional(Packet &pkt) = 0;
/** Called to recieve a status change from the peer port. */
virtual void recvStatusChange(Status status) = 0;
@@ -154,21 +142,13 @@ class Port
case a cache has a higher priority request come in while waiting for
the bus to arbitrate.
*/
- SendResult sendTiming(Packet &pkt) { return peer->recvTiming(pkt); }
-
- /** This function is identical to the sendTiming function, accept it
- provides a time when the recvTiming should be called. The
- peer->recvTimimng will schedule the event, if it's device handles the
- timing (bus) it will be overloaded by the bus type port to handle it
- properly.
- */
- SendResult sendTiming(Packet &pkt, Tick t) { return peer->recvTiming(pkt, t); }
+ bool sendTiming(Packet &pkt) { return peer->recvTiming(pkt); }
/** Function called by the associated device to send an atomic access,
an access in which the data is moved and the state is updated in one
cycle, without interleaving with other memory accesses.
*/
- SendResult sendAtomic(Packet &pkt)
+ Tick sendAtomic(Packet &pkt)
{ return peer->recvAtomic(pkt); }
/** Function called by the associated device to send a functional access,
@@ -176,7 +156,7 @@ class Port
memory system, without affecting the current state of any block
or moving the block.
*/
- SendResult sendFunctional(Packet &pkt)
+ void sendFunctional(Packet &pkt)
{ return peer->recvFunctional(pkt); }
/** Called by the associated device to send a status change to the device
diff --git a/mem/request.hh b/mem/request.hh
index 331f76698..31f5b1921 100644
--- a/mem/request.hh
+++ b/mem/request.hh
@@ -37,34 +37,41 @@
class Request
{
- /** The virtual address of the request. */
- Addr vaddr;
/** The physical address of the request. */
Addr paddr;
- /** whether this req came from the CPU or not */
- bool nic_req;
-
- /** The address space ID. */
- int asid;
- /** The related execution context. */
- ExecContext *xc;
+ /** whether this req came from the CPU or not **DO we need this??***/
+ bool nicReq;
/** The size of the request. */
int size;
+ /** The time this request was started. Used to calculate latencies. */
+ Tick time;
+
+ /** Destination address if this is a block copy. */
+ Addr copyDest;
+};
+
+class CpuRequest : public Request
+{
+ /** The virtual address of the request. */
+ Addr vaddr;
+
+ /** The address space ID. */
+ int asid;
+
/** The return value of store conditional. */
- uint64_t result;
+ uint64_t scResult;
/** The cpu number for statistics. */
- int cpu_num;
+ int cpuNum;
+
/** The requesting thread id. */
- int thread_num;
- /** The time this request was started. Used to calculate latencies. */
- Tick time;
+ int threadNum;
/** program counter of initiating access; for tracing/debugging */
Addr pc;
-}
+};
#endif // __MEM_REQUEST_HH__