inorder: add names and slot #s to res. dprints
This commit is contained in:
parent
64d31e75b9
commit
bc16bbc158
2 changed files with 14 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue