summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpu/simple/cpu.hh34
-rw-r--r--mem/bus.hh2
2 files changed, 35 insertions, 1 deletions
diff --git a/cpu/simple/cpu.hh b/cpu/simple/cpu.hh
index 0f7251237..30fea0f86 100644
--- a/cpu/simple/cpu.hh
+++ b/cpu/simple/cpu.hh
@@ -63,6 +63,40 @@ namespace Trace {
class SimpleCPU : public BaseCPU
{
+ class CpuPort : public Port
+ {
+
+ SimpleCPU *cpu;
+
+ public:
+
+ CpuPort(SimpleCPU *_cpu)
+ : cpu(_cpu)
+ { }
+
+ protected:
+
+ virtual bool recvTiming(Packet &pkt)
+ { return cpu->recvTiming(pkt); }
+
+ virtual Tick recvAtomic(Packet &pkt)
+ { return cpu->recvAtomic(pkt); }
+
+ virtual void recvFunctional(Packet &pkt)
+ { cpu->recvFunctional(pkt); }
+
+ virtual void recvStatusChange(Status status)
+ { cpu->recvStatusChange(status); }
+
+ };
+
+ CpuPort icache_port;
+ CpuPort dcache_port;
+
+ bool recvTiming(Packet &pkt);
+ Tick recvAtomic(Packet &pkt);
+ void recvFunctional(Packet &pkt);
+
public:
// main simulation loop (one cycle)
void tick();
diff --git a/mem/bus.hh b/mem/bus.hh
index 0fd450c4f..e1b29bac6 100644
--- a/mem/bus.hh
+++ b/mem/bus.hh
@@ -92,7 +92,7 @@ class Bus : public MemObject
/** When reciving a Functional requestfrom the peer port (at id),
pass it to the bus. */
virtual void recvFunctional(Packet &pkt)
- { return bus->recvFunctional(pkt, id); }
+ { bus->recvFunctional(pkt, id); }
/** When reciving a status changefrom the peer port (at id),
pass it to the bus. */