diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-05-16 14:09:04 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-05-16 14:09:04 -0400 |
commit | 52383ca7cc2b4698109b71a968cde16e9f7dc6e0 (patch) | |
tree | 354833a7b623d42870366f6176d662356ce62d19 /cpu/ozone/inorder_back_end.hh | |
parent | ef6e2eb3c4dbf337df7380ae93360c13140f11f6 (diff) | |
download | gem5-52383ca7cc2b4698109b71a968cde16e9f7dc6e0.tar.xz |
Sampler updates.
cpu/ozone/cpu.hh:
Updates for sampler.
cpu/ozone/cpu_impl.hh:
Updates for sampler, checker.
cpu/ozone/inorder_back_end.hh:
Sampler updates. Also support old memory system.
--HG--
extra : convert_revision : 33ebe38e4c08d49c6af84032b819533b784b4fe8
Diffstat (limited to 'cpu/ozone/inorder_back_end.hh')
-rw-r--r-- | cpu/ozone/inorder_back_end.hh | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/cpu/ozone/inorder_back_end.hh b/cpu/ozone/inorder_back_end.hh index 6519b79e5..4039d8384 100644 --- a/cpu/ozone/inorder_back_end.hh +++ b/cpu/ozone/inorder_back_end.hh @@ -97,6 +97,10 @@ class InorderBackEnd Addr commitPC; + void switchOut() { panic("Not implemented!"); } + void doSwitchOut() { panic("Not implemented!"); } + void takeOverFrom(ExecContext *old_xc = NULL) { panic("Not implemented!"); } + public: FullCPU *cpu; @@ -330,14 +334,17 @@ InorderBackEnd<Impl>::read(MemReqPtr &req, T &data, int load_idx) // translate to physical address // Fault fault = cpu->translateDataReadReq(req); + req->cmd = Read; + req->completionEvent = NULL; + req->time = curTick; + assert(!req->data); + req->data = new uint8_t[64]; + req->flags &= ~INST_READ; + Fault fault = cpu->read(req, data); + memcpy(req->data, &data, sizeof(T)); // if we have a cache, do cache access too if (dcacheInterface) { - req->cmd = Read; - req->completionEvent = NULL; - req->data = new uint8_t[64]; - req->time = curTick; - req->flags &= ~INST_READ; MemAccessResult result = dcacheInterface->access(req); // Ugly hack to get an event scheduled *only* if the access is @@ -372,6 +379,30 @@ InorderBackEnd<Impl>::write(MemReqPtr &req, T &data, int store_idx) // translate to physical address // Fault fault = cpu->translateDataWriteReq(req); + req->cmd = Write; + req->completionEvent = NULL; + req->time = curTick; + assert(!req->data); + req->data = new uint8_t[64]; + memcpy(req->data, (uint8_t *)&data, req->size); + + switch(req->size) { + case 1: + cpu->write(req, (uint8_t &)data); + break; + case 2: + cpu->write(req, (uint16_t &)data); + break; + case 4: + cpu->write(req, (uint32_t &)data); + break; + case 8: + cpu->write(req, (uint64_t &)data); + break; + default: + panic("Unexpected store size!\n"); + } + if (dcacheInterface) { req->cmd = Write; req->data = new uint8_t[64]; @@ -395,7 +426,7 @@ InorderBackEnd<Impl>::write(MemReqPtr &req, T &data, int store_idx) } } - +/* if (req->flags & LOCKED) { if (req->flags & UNCACHEABLE) { // Don't update result register (see stq_c in isa_desc) @@ -404,6 +435,7 @@ InorderBackEnd<Impl>::write(MemReqPtr &req, T &data, int store_idx) req->result = 1; } } +*/ /* if (res && (fault == NoFault)) *res = req->result; |