projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sort #includes
[gem5.git]
/
dev
/
baddev.cc
diff --git
a/dev/baddev.cc
b/dev/baddev.cc
index 8b552e9892d0aed5d3707b44bc79697a430505d8..73b082d4772a480600e72a32c154254c88a43eac 100644
(file)
--- a/
dev/baddev.cc
+++ b/
dev/baddev.cc
@@
-50,12
+50,12
@@
BadDevice::BadDevice(const string &name, Addr a, MemoryController *mmu,
HierParams *hier, Bus *bus, const string &devicename)
: PioDevice(name), addr(a), devname(devicename)
{
HierParams *hier, Bus *bus, const string &devicename)
: PioDevice(name), addr(a), devname(devicename)
{
- mmu->add_child(this, Range
<Addr>(addr, addr +
size));
+ mmu->add_child(this, Range
Size(addr,
size));
if (bus) {
pioInterface = newPioInterface(name, hier, bus, this,
&BadDevice::cacheAccess);
if (bus) {
pioInterface = newPioInterface(name, hier, bus, this,
&BadDevice::cacheAccess);
- pioInterface->addAddrRange(
addr, addr + size - 1
);
+ pioInterface->addAddrRange(
RangeSize(addr, size)
);
}
}
}
}
@@
-78,7
+78,7
@@
BadDevice::write(MemReqPtr &req, const uint8_t *data)
Tick
BadDevice::cacheAccess(MemReqPtr &req)
{
Tick
BadDevice::cacheAccess(MemReqPtr &req)
{
- return curTick
+ 1000
;
+ return curTick;
}
BEGIN_DECLARE_SIM_OBJECT_PARAMS(BadDevice)
}
BEGIN_DECLARE_SIM_OBJECT_PARAMS(BadDevice)
@@
-103,7
+103,8
@@
END_INIT_SIM_OBJECT_PARAMS(BadDevice)
CREATE_SIM_OBJECT(BadDevice)
{
CREATE_SIM_OBJECT(BadDevice)
{
- return new BadDevice(getInstanceName(), addr, mmu, hier, io_bus, devicename);
+ return new BadDevice(getInstanceName(), addr, mmu, hier, io_bus,
+ devicename);
}
REGISTER_SIM_OBJECT("BadDevice", BadDevice)
}
REGISTER_SIM_OBJECT("BadDevice", BadDevice)