summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-02-18 14:31:31 -0500
committerKorey Sewell <ksewell@umich.edu>2011-02-18 14:31:31 -0500
commitbc16bbc158613b7eaebe7d2021a6a0503c4a0635 (patch)
tree804f5d9bb3de96bf292876dfbd28c28fac572008
parent64d31e75b960f08de57cf78f8bdc793d1135c5cd (diff)
downloadgem5-bc16bbc158613b7eaebe7d2021a6a0503c4a0635.tar.xz
inorder: add names and slot #s to res. dprints
-rw-r--r--src/cpu/inorder/resource.cc18
-rw-r--r--src/cpu/inorder/resource.hh6
2 files changed, 14 insertions, 10 deletions
diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc
index 701785658..24211532e 100644
--- a/src/cpu/inorder/resource.cc
+++ b/src/cpu/inorder/resource.cc
@@ -31,6 +31,8 @@
#include <vector>
#include <list>
+
+#include "base/str.hh"
#include "cpu/inorder/resource.hh"
#include "cpu/inorder/cpu.hh"
using namespace std;
@@ -376,7 +378,7 @@ int ResourceRequest::maxReqCount = 0;
ResourceRequest::ResourceRequest(Resource *_res)
: res(_res), inst(NULL), stagePasses(0), valid(false), doneInResource(false),
- complSlotNum(-1), completed(false), squashed(false), processing(false),
+ completed(false), squashed(false), processing(false),
memStall(false)
{
}
@@ -391,6 +393,12 @@ ResourceRequest::~ResourceRequest()
inst = NULL;
}
+std::string
+ResourceRequest::name()
+{
+ return res->name() + "." + to_string(slotNum);
+}
+
void
ResourceRequest::setRequest(DynInstPtr _inst, int stage_num,
int res_idx, int slot_num, unsigned _cmd)
@@ -433,11 +441,6 @@ ResourceRequest::done(bool completed)
setCompleted(completed);
- // Used for debugging purposes
- if (completed) {
- complSlotNum = slotNum;
- }
-
doneInResource = true;
}
@@ -466,7 +469,8 @@ ResourceEvent::process()
const char *
ResourceEvent::description()
{
- string desc = resource->name() + " event";
+ string desc = resource->name() + "-event:slot[" + to_string(slotIdx)
+ + "]";
return desc.c_str();
}
diff --git a/src/cpu/inorder/resource.hh b/src/cpu/inorder/resource.hh
index fc16df099..7899a215f 100644
--- a/src/cpu/inorder/resource.hh
+++ b/src/cpu/inorder/resource.hh
@@ -247,7 +247,7 @@ class Resource {
class ResourceEvent : public Event
{
public:
- /** Pointer to the CPU. */
+ /** Pointer to the Resource this is an event for */
Resource *resource;
@@ -305,6 +305,8 @@ class ResourceRequest
ResourceRequest(Resource *_res);
virtual ~ResourceRequest();
+
+ std::string name();
int reqID;
@@ -330,7 +332,6 @@ class ResourceRequest
/** Get Slot Number */
int getSlot() { return slotNum; }
- int getComplSlot() { return complSlotNum; }
bool hasSlot() { return slotNum >= 0; }
/** Get Stage Number */
@@ -393,7 +394,6 @@ class ResourceRequest
int stageNum;
int resIdx;
int slotNum;
- int complSlotNum;
/** Resource Request Status */
bool completed;