summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-02-21 11:27:53 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2006-02-21 11:27:53 -0500
commit8a753f6ae23d9f2c00be2230344d81e031b62b4c (patch)
tree6b534d0ace3f32b8bcb65cd13d821cde01bc11cf /cpu
parent00be4e8510f587603cf358d615d19d8bbf8ec57e (diff)
downloadgem5-8a753f6ae23d9f2c00be2230344d81e031b62b4c.tar.xz
Move read/writeBlob functions to Port class;
clean up implementation a little. SConscript: Add mem/port.cc cpu/simple/cpu.cc: cpu/simple/cpu.hh: Move read/writeBlob functions to base Port class. mem/port.hh: Implement read/writeBlob functions. No need for them to be virtual since the proxy object (now called TranslatingPort) is not a subclass of Port. mem/port.cc: Implement read/writeBlob functions. --HG-- extra : convert_revision : a3660eaa43a7c286aca962f17fa32fbd42bf1fa6
Diffstat (limited to 'cpu')
-rw-r--r--cpu/simple/cpu.cc45
-rw-r--r--cpu/simple/cpu.hh4
2 files changed, 0 insertions, 49 deletions
diff --git a/cpu/simple/cpu.cc b/cpu/simple/cpu.cc
index b7c213edf..469fad270 100644
--- a/cpu/simple/cpu.cc
+++ b/cpu/simple/cpu.cc
@@ -36,7 +36,6 @@
#include <string>
#include "base/cprintf.hh"
-#include "base/chunk_generator.hh"
#include "base/inifile.hh"
#include "base/loader/symtab.hh"
#include "base/misc.hh"
@@ -128,50 +127,6 @@ SimpleCPU::CpuPort::recvRetry()
return cpu->processRetry();
}
-void
-SimpleCPU::CpuPort::writeBlobFunctional(Addr addr, uint8_t *p, int size)
-{
- int prevSize = 0;
- //Base Packet
- for (ChunkGenerator gen(addr, size, sendBlockSizeQuery()); !gen.done(); gen.next())
- {
- Packet *blobpkt = new Packet();
- CpuRequest *blobreq = new CpuRequest();
- blobpkt->addr = gen.addr();
- blobpkt->size = gen.size();
- blobpkt->cmd = Write;
- blobpkt->req = blobreq;
- blobpkt->req->paddr = blobpkt->addr;
- blobpkt->req->size = blobpkt->size;
- blobpkt->data = p + prevSize;
- prevSize += blobpkt->size;
-
- sendFunctional(*blobpkt);
- }
-}
-
-void
-SimpleCPU::CpuPort::readBlobFunctional(Addr addr, uint8_t *p, int size)
-{
- int prevSize = 0;
- //Base Packet
- for (ChunkGenerator gen(addr, size, sendBlockSizeQuery()); !gen.done(); gen.next())
- {
- Packet *blobpkt = new Packet();
- CpuRequest *blobreq = new CpuRequest();
- blobpkt->addr = gen.addr();
- blobpkt->size = gen.size();
- blobpkt->cmd = Write;
- blobpkt->req = blobreq;
- blobpkt->req->paddr = blobpkt->addr;
- blobpkt->req->size = blobpkt->size;
- blobpkt->data = p + prevSize;
- prevSize += blobpkt->size;
-
- sendFunctional(*blobpkt);
- }
-}
-
SimpleCPU::SimpleCPU(Params *p)
: BaseCPU(p), icachePort(this),
dcachePort(this), tickEvent(this, p->width), xc(NULL)
diff --git a/cpu/simple/cpu.hh b/cpu/simple/cpu.hh
index 94f6f190a..6df553fe2 100644
--- a/cpu/simple/cpu.hh
+++ b/cpu/simple/cpu.hh
@@ -88,10 +88,6 @@ class SimpleCPU : public BaseCPU
virtual void recvStatusChange(Status status);
virtual Packet *recvRetry();
-
- virtual void readBlobFunctional(Addr addr, uint8_t *p, int size);
-
- virtual void writeBlobFunctional(Addr addr, uint8_t *p, int size);
};
CpuPort icachePort;