mem-ruby: Add a ruby namespace
Encapsulate all ruby-related files in a ruby namespace. Change-Id: If642c9751ecefc35b45c5dd69d85e67813cc5224 Issued-on: https://gem5.atlassian.net/browse/GEM5-984 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47307 Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
eeedf63c86
commit
60e4ad955d
@@ -43,7 +43,7 @@ InvalidateGenerator::InvalidateGenerator(const Params &p)
|
||||
//
|
||||
// First, issue loads to bring the block into S state
|
||||
//
|
||||
m_status = InvalidateGeneratorStatus_Load_Waiting;
|
||||
m_status = ruby::InvalidateGeneratorStatus_Load_Waiting;
|
||||
m_active_read_node = 0;
|
||||
m_active_inv_node = 0;
|
||||
m_address = 0x0;
|
||||
@@ -69,12 +69,12 @@ InvalidateGenerator::initiate()
|
||||
//
|
||||
// Based on the current state, issue a load or a store
|
||||
//
|
||||
if (m_status == InvalidateGeneratorStatus_Load_Waiting) {
|
||||
if (m_status == ruby::InvalidateGeneratorStatus_Load_Waiting) {
|
||||
DPRINTF(DirectedTest, "initiating read\n");
|
||||
cmd = MemCmd::ReadReq;
|
||||
port = m_directed_tester->getCpuPort(m_active_read_node);
|
||||
pkt = new Packet(req, cmd);
|
||||
} else if (m_status == InvalidateGeneratorStatus_Inv_Waiting) {
|
||||
} else if (m_status == ruby::InvalidateGeneratorStatus_Inv_Waiting) {
|
||||
DPRINTF(DirectedTest, "initiating invalidating write\n");
|
||||
cmd = MemCmd::WriteReq;
|
||||
port = m_directed_tester->getCpuPort(m_active_inv_node);
|
||||
@@ -86,10 +86,10 @@ InvalidateGenerator::initiate()
|
||||
|
||||
if (port->sendTimingReq(pkt)) {
|
||||
DPRINTF(DirectedTest, "initiating request - successful\n");
|
||||
if (m_status == InvalidateGeneratorStatus_Load_Waiting) {
|
||||
m_status = InvalidateGeneratorStatus_Load_Pending;
|
||||
if (m_status == ruby::InvalidateGeneratorStatus_Load_Waiting) {
|
||||
m_status = ruby::InvalidateGeneratorStatus_Load_Pending;
|
||||
} else {
|
||||
m_status = InvalidateGeneratorStatus_Inv_Pending;
|
||||
m_status = ruby::InvalidateGeneratorStatus_Inv_Pending;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -108,19 +108,19 @@ InvalidateGenerator::performCallback(uint32_t proc, Addr address)
|
||||
{
|
||||
assert(m_address == address);
|
||||
|
||||
if (m_status == InvalidateGeneratorStatus_Load_Pending) {
|
||||
if (m_status == ruby::InvalidateGeneratorStatus_Load_Pending) {
|
||||
assert(m_active_read_node == proc);
|
||||
m_active_read_node++;
|
||||
//
|
||||
// Once all cpus have the block in S state, issue the invalidate
|
||||
//
|
||||
if (m_active_read_node == m_num_cpus) {
|
||||
m_status = InvalidateGeneratorStatus_Inv_Waiting;
|
||||
m_status = ruby::InvalidateGeneratorStatus_Inv_Waiting;
|
||||
m_active_read_node = 0;
|
||||
} else {
|
||||
m_status = InvalidateGeneratorStatus_Load_Waiting;
|
||||
m_status = ruby::InvalidateGeneratorStatus_Load_Waiting;
|
||||
}
|
||||
} else if (m_status == InvalidateGeneratorStatus_Inv_Pending) {
|
||||
} else if (m_status == ruby::InvalidateGeneratorStatus_Inv_Pending) {
|
||||
assert(m_active_inv_node == proc);
|
||||
m_active_inv_node++;
|
||||
if (m_active_inv_node == m_num_cpus) {
|
||||
@@ -132,7 +132,7 @@ InvalidateGenerator::performCallback(uint32_t proc, Addr address)
|
||||
// the cycle
|
||||
//
|
||||
m_directed_tester->incrementCycleCompletions();
|
||||
m_status = InvalidateGeneratorStatus_Load_Waiting;
|
||||
m_status = ruby::InvalidateGeneratorStatus_Load_Waiting;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class InvalidateGenerator : public DirectedGenerator
|
||||
void performCallback(uint32_t proc, Addr address);
|
||||
|
||||
private:
|
||||
InvalidateGeneratorStatus m_status;
|
||||
ruby::InvalidateGeneratorStatus m_status;
|
||||
Addr m_address;
|
||||
uint32_t m_active_read_node;
|
||||
uint32_t m_active_inv_node;
|
||||
|
||||
@@ -117,7 +117,7 @@ RubyDirectedTester::getCpuPort(int idx)
|
||||
}
|
||||
|
||||
void
|
||||
RubyDirectedTester::hitCallback(NodeID proc, Addr addr)
|
||||
RubyDirectedTester::hitCallback(ruby::NodeID proc, Addr addr)
|
||||
{
|
||||
DPRINTF(DirectedTest,
|
||||
"completed request for proc: %d addr: 0x%x\n",
|
||||
|
||||
@@ -92,7 +92,7 @@ class RubyDirectedTester : public ClockedObject
|
||||
EventFunctionWrapper directedStartEvent;
|
||||
|
||||
private:
|
||||
void hitCallback(NodeID proc, Addr addr);
|
||||
void hitCallback(ruby::NodeID proc, Addr addr);
|
||||
|
||||
void checkForDeadlock();
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ SeriesRequestGenerator::SeriesRequestGenerator(const Params &p)
|
||||
m_addr_increment_size(p.addr_increment_size),
|
||||
m_percent_writes(p.percent_writes)
|
||||
{
|
||||
m_status = SeriesRequestGeneratorStatus_Thinking;
|
||||
m_status = ruby::SeriesRequestGeneratorStatus_Thinking;
|
||||
m_active_node = 0;
|
||||
m_address = 0x0;
|
||||
}
|
||||
@@ -56,7 +56,7 @@ bool
|
||||
SeriesRequestGenerator::initiate()
|
||||
{
|
||||
DPRINTF(DirectedTest, "initiating request\n");
|
||||
assert(m_status == SeriesRequestGeneratorStatus_Thinking);
|
||||
assert(m_status == ruby::SeriesRequestGeneratorStatus_Thinking);
|
||||
|
||||
RequestPort* port = m_directed_tester->getCpuPort(m_active_node);
|
||||
|
||||
@@ -79,7 +79,7 @@ SeriesRequestGenerator::initiate()
|
||||
|
||||
if (port->sendTimingReq(pkt)) {
|
||||
DPRINTF(DirectedTest, "initiating request - successful\n");
|
||||
m_status = SeriesRequestGeneratorStatus_Request_Pending;
|
||||
m_status = ruby::SeriesRequestGeneratorStatus_Request_Pending;
|
||||
return true;
|
||||
} else {
|
||||
// If the packet did not issue, must delete
|
||||
@@ -97,9 +97,9 @@ SeriesRequestGenerator::performCallback(uint32_t proc, Addr address)
|
||||
{
|
||||
assert(m_active_node == proc);
|
||||
assert(m_address == address);
|
||||
assert(m_status == SeriesRequestGeneratorStatus_Request_Pending);
|
||||
assert(m_status == ruby::SeriesRequestGeneratorStatus_Request_Pending);
|
||||
|
||||
m_status = SeriesRequestGeneratorStatus_Thinking;
|
||||
m_status = ruby::SeriesRequestGeneratorStatus_Thinking;
|
||||
m_active_node++;
|
||||
if (m_active_node == m_num_cpus) {
|
||||
//
|
||||
|
||||
@@ -55,7 +55,7 @@ class SeriesRequestGenerator : public DirectedGenerator
|
||||
void performCallback(uint32_t proc, Addr address);
|
||||
|
||||
private:
|
||||
SeriesRequestGeneratorStatus m_status;
|
||||
ruby::SeriesRequestGeneratorStatus m_status;
|
||||
Addr m_address;
|
||||
uint32_t m_active_node;
|
||||
uint32_t m_addr_increment_size;
|
||||
|
||||
@@ -72,7 +72,7 @@ DmaThread::issueLoadOps()
|
||||
Addr address = addrManager->getAddress(location);
|
||||
DPRINTF(ProtocolTest, "%s Episode %d: Issuing Load - Addr %s\n",
|
||||
this->getName(), curEpisode->getEpisodeId(),
|
||||
printAddress(address));
|
||||
ruby::printAddress(address));
|
||||
|
||||
int load_size = sizeof(Value);
|
||||
|
||||
@@ -129,7 +129,7 @@ DmaThread::issueStoreOps()
|
||||
|
||||
DPRINTF(ProtocolTest, "%s Episode %d: Issuing Store - Addr %s - "
|
||||
"Value %d\n", this->getName(),
|
||||
curEpisode->getEpisodeId(), printAddress(address),
|
||||
curEpisode->getEpisodeId(), ruby::printAddress(address),
|
||||
new_value);
|
||||
|
||||
auto req = std::make_shared<Request>(address, sizeof(Value),
|
||||
@@ -213,7 +213,7 @@ DmaThread::hitCallback(PacketPtr pkt)
|
||||
|
||||
DPRINTF(ProtocolTest, "%s Episode %d: hitCallback - Command %s -"
|
||||
" Addr %s\n", this->getName(), curEpisode->getEpisodeId(),
|
||||
resp_cmd.toString(), printAddress(addr));
|
||||
resp_cmd.toString(), ruby::printAddress(addr));
|
||||
|
||||
if (resp_cmd == MemCmd::SwapResp) {
|
||||
// response to a pending atomic
|
||||
|
||||
@@ -69,7 +69,7 @@ GpuWavefront::issueLoadOps()
|
||||
Addr address = addrManager->getAddress(location);
|
||||
DPRINTF(ProtocolTest, "%s Episode %d: Issuing Load - Addr %s\n",
|
||||
this->getName(), curEpisode->getEpisodeId(),
|
||||
printAddress(address));
|
||||
ruby::printAddress(address));
|
||||
|
||||
int load_size = sizeof(Value);
|
||||
|
||||
@@ -126,7 +126,7 @@ GpuWavefront::issueStoreOps()
|
||||
|
||||
DPRINTF(ProtocolTest, "%s Episode %d: Issuing Store - Addr %s - "
|
||||
"Value %d\n", this->getName(),
|
||||
curEpisode->getEpisodeId(), printAddress(address),
|
||||
curEpisode->getEpisodeId(), ruby::printAddress(address),
|
||||
new_value);
|
||||
|
||||
auto req = std::make_shared<Request>(address, sizeof(Value),
|
||||
@@ -180,7 +180,7 @@ GpuWavefront::issueAtomicOps()
|
||||
|
||||
DPRINTF(ProtocolTest, "%s Episode %d: Issuing Atomic_Inc - Addr %s\n",
|
||||
this->getName(), curEpisode->getEpisodeId(),
|
||||
printAddress(address));
|
||||
ruby::printAddress(address));
|
||||
|
||||
// must be aligned with store size
|
||||
assert(address % sizeof(Value) == 0);
|
||||
@@ -270,7 +270,7 @@ GpuWavefront::hitCallback(PacketPtr pkt)
|
||||
DPRINTF(ProtocolTest, "%s Episode %d: hitCallback - Command %s - "
|
||||
"Addr %s\n", this->getName(),
|
||||
curEpisode->getEpisodeId(), resp_cmd.toString(),
|
||||
printAddress(addr));
|
||||
ruby::printAddress(addr));
|
||||
|
||||
// whether the transaction is done after this hitCallback
|
||||
bool isTransactionDone = true;
|
||||
|
||||
@@ -343,7 +343,7 @@ TesterThread::validateAtomicResp(Location loc, int lane, Value ret_val)
|
||||
ss << threadName << ": Atomic Op returned unexpected value\n"
|
||||
<< "\tEpisode " << curEpisode->getEpisodeId() << "\n"
|
||||
<< "\tLane ID " << lane << "\n"
|
||||
<< "\tAddress " << printAddress(addr) << "\n"
|
||||
<< "\tAddress " << ruby::printAddress(addr) << "\n"
|
||||
<< "\tAtomic Op's return value " << ret_val << "\n";
|
||||
|
||||
// print out basic info
|
||||
@@ -369,7 +369,7 @@ TesterThread::validateLoadResp(Location loc, int lane, Value ret_val)
|
||||
<< "\tTesterThread " << threadId << "\n"
|
||||
<< "\tEpisode " << curEpisode->getEpisodeId() << "\n"
|
||||
<< "\tLane ID " << lane << "\n"
|
||||
<< "\tAddress " << printAddress(addr) << "\n"
|
||||
<< "\tAddress " << ruby::printAddress(addr) << "\n"
|
||||
<< "\tLoaded value " << ret_val << "\n"
|
||||
<< "\tLast writer " << addrManager->printLastWriter(loc) << "\n";
|
||||
|
||||
@@ -427,7 +427,7 @@ TesterThread::printOutstandingReqs(const OutstandingReqTable& table,
|
||||
|
||||
for (const auto& m : table) {
|
||||
for (const auto& req : m.second) {
|
||||
ss << "\t\t\tAddr " << printAddress(m.first)
|
||||
ss << "\t\t\tAddr " << ruby::printAddress(m.first)
|
||||
<< ": delta (curCycle - issueCycle) = "
|
||||
<< (cur_cycle - req.issueCycle) << std::endl;
|
||||
}
|
||||
|
||||
@@ -44,14 +44,14 @@ Check::Check(Addr address, Addr pc, int _num_writers, int _num_readers,
|
||||
: m_num_writers(_num_writers), m_num_readers(_num_readers),
|
||||
m_tester_ptr(_tester)
|
||||
{
|
||||
m_status = TesterStatus_Idle;
|
||||
m_status = ruby::TesterStatus_Idle;
|
||||
|
||||
pickValue();
|
||||
pickInitiatingNode();
|
||||
changeAddress(address);
|
||||
m_pc = pc;
|
||||
m_access_mode = RubyAccessMode(random_mt.random(0,
|
||||
RubyAccessMode_NUM - 1));
|
||||
m_access_mode = ruby::RubyAccessMode(
|
||||
random_mt.random(0, ruby::RubyAccessMode_NUM - 1));
|
||||
m_store_count = 0;
|
||||
}
|
||||
|
||||
@@ -66,13 +66,13 @@ Check::initiate()
|
||||
initiatePrefetch(); // Prefetch from random processor
|
||||
}
|
||||
|
||||
if (m_tester_ptr->getCheckFlush() && (random_mt.random(0, 0xff) == 0)) {
|
||||
if (m_tester_ptr->getCheckFlush() && (random_mt.random(0, 0xff) == 0)) {
|
||||
initiateFlush(); // issue a Flush request from random processor
|
||||
}
|
||||
|
||||
if (m_status == TesterStatus_Idle) {
|
||||
if (m_status == ruby::TesterStatus_Idle) {
|
||||
initiateAction();
|
||||
} else if (m_status == TesterStatus_Ready) {
|
||||
} else if (m_status == ruby::TesterStatus_Ready) {
|
||||
initiateCheck();
|
||||
} else {
|
||||
// Pending - do nothing
|
||||
@@ -172,7 +172,7 @@ void
|
||||
Check::initiateAction()
|
||||
{
|
||||
DPRINTF(RubyTest, "initiating Action\n");
|
||||
assert(m_status == TesterStatus_Idle);
|
||||
assert(m_status == ruby::TesterStatus_Idle);
|
||||
|
||||
int index = random_mt.random(0, m_num_writers - 1);
|
||||
RequestPort* port = m_tester_ptr->getWritableCpuPort(index);
|
||||
@@ -212,8 +212,8 @@ Check::initiateAction()
|
||||
if (port->sendTimingReq(pkt)) {
|
||||
DPRINTF(RubyTest, "initiating action - successful\n");
|
||||
DPRINTF(RubyTest, "status before action update: %s\n",
|
||||
(TesterStatus_to_string(m_status)).c_str());
|
||||
m_status = TesterStatus_Action_Pending;
|
||||
(ruby::TesterStatus_to_string(m_status)).c_str());
|
||||
m_status = ruby::TesterStatus_Action_Pending;
|
||||
DPRINTF(RubyTest, "Check %#x, State=Action_Pending\n", m_address);
|
||||
} else {
|
||||
// If the packet did not issue, must delete
|
||||
@@ -226,14 +226,14 @@ Check::initiateAction()
|
||||
}
|
||||
|
||||
DPRINTF(RubyTest, "status after action update: %s\n",
|
||||
(TesterStatus_to_string(m_status)).c_str());
|
||||
(ruby::TesterStatus_to_string(m_status)).c_str());
|
||||
}
|
||||
|
||||
void
|
||||
Check::initiateCheck()
|
||||
{
|
||||
DPRINTF(RubyTest, "Initiating Check\n");
|
||||
assert(m_status == TesterStatus_Ready);
|
||||
assert(m_status == ruby::TesterStatus_Ready);
|
||||
|
||||
int index = random_mt.random(0, m_num_readers - 1);
|
||||
RequestPort* port = m_tester_ptr->getReadableCpuPort(index);
|
||||
@@ -266,8 +266,8 @@ Check::initiateCheck()
|
||||
if (port->sendTimingReq(pkt)) {
|
||||
DPRINTF(RubyTest, "initiating check - successful\n");
|
||||
DPRINTF(RubyTest, "status before check update: %s\n",
|
||||
TesterStatus_to_string(m_status).c_str());
|
||||
m_status = TesterStatus_Check_Pending;
|
||||
ruby::TesterStatus_to_string(m_status).c_str());
|
||||
m_status = ruby::TesterStatus_Check_Pending;
|
||||
DPRINTF(RubyTest, "Check %#x, State=Check_Pending\n", m_address);
|
||||
} else {
|
||||
// If the packet did not issue, must delete
|
||||
@@ -280,40 +280,40 @@ Check::initiateCheck()
|
||||
}
|
||||
|
||||
DPRINTF(RubyTest, "status after check update: %s\n",
|
||||
TesterStatus_to_string(m_status).c_str());
|
||||
ruby::TesterStatus_to_string(m_status).c_str());
|
||||
}
|
||||
|
||||
void
|
||||
Check::performCallback(NodeID proc, SubBlock* data, Cycles curTime)
|
||||
Check::performCallback(ruby::NodeID proc, ruby::SubBlock* data, Cycles curTime)
|
||||
{
|
||||
Addr address = data->getAddress();
|
||||
|
||||
// This isn't exactly right since we now have multi-byte checks
|
||||
// assert(getAddress() == address);
|
||||
|
||||
assert(makeLineAddress(m_address) == makeLineAddress(address));
|
||||
assert(ruby::makeLineAddress(m_address) == ruby::makeLineAddress(address));
|
||||
assert(data != NULL);
|
||||
|
||||
DPRINTF(RubyTest, "RubyTester Callback\n");
|
||||
debugPrint();
|
||||
|
||||
if (m_status == TesterStatus_Action_Pending) {
|
||||
if (m_status == ruby::TesterStatus_Action_Pending) {
|
||||
DPRINTF(RubyTest, "Action callback write value: %d, currently %d\n",
|
||||
(m_value + m_store_count), data->getByte(0));
|
||||
// Perform store one byte at a time
|
||||
data->setByte(0, (m_value + m_store_count));
|
||||
m_store_count++;
|
||||
if (m_store_count == CHECK_SIZE) {
|
||||
m_status = TesterStatus_Ready;
|
||||
m_status = ruby::TesterStatus_Ready;
|
||||
DPRINTF(RubyTest, "Check %#x, State=Ready\n", m_address);
|
||||
} else {
|
||||
m_status = TesterStatus_Idle;
|
||||
m_status = ruby::TesterStatus_Idle;
|
||||
DPRINTF(RubyTest, "Check %#x, State=Idle store_count: %d\n",
|
||||
m_address, m_store_count);
|
||||
}
|
||||
DPRINTF(RubyTest, "Action callback return data now %d\n",
|
||||
data->getByte(0));
|
||||
} else if (m_status == TesterStatus_Check_Pending) {
|
||||
} else if (m_status == ruby::TesterStatus_Check_Pending) {
|
||||
DPRINTF(RubyTest, "Check callback\n");
|
||||
// Perform load/check
|
||||
for (int byte_number=0; byte_number<CHECK_SIZE; byte_number++) {
|
||||
@@ -332,7 +332,7 @@ Check::performCallback(NodeID proc, SubBlock* data, Cycles curTime)
|
||||
// successful check complete, increment complete
|
||||
m_tester_ptr->incrementCheckCompletions();
|
||||
|
||||
m_status = TesterStatus_Idle;
|
||||
m_status = ruby::TesterStatus_Idle;
|
||||
DPRINTF(RubyTest, "Check %#x, State=Idle\n", m_address);
|
||||
pickValue();
|
||||
|
||||
@@ -342,7 +342,7 @@ Check::performCallback(NodeID proc, SubBlock* data, Cycles curTime)
|
||||
}
|
||||
|
||||
DPRINTF(RubyTest, "proc: %d, Address: 0x%x\n", proc,
|
||||
makeLineAddress(m_address));
|
||||
ruby::makeLineAddress(m_address));
|
||||
DPRINTF(RubyTest, "Callback done\n");
|
||||
debugPrint();
|
||||
}
|
||||
@@ -350,8 +350,9 @@ Check::performCallback(NodeID proc, SubBlock* data, Cycles curTime)
|
||||
void
|
||||
Check::changeAddress(Addr address)
|
||||
{
|
||||
assert(m_status == TesterStatus_Idle || m_status == TesterStatus_Ready);
|
||||
m_status = TesterStatus_Idle;
|
||||
assert(m_status == ruby::TesterStatus_Idle ||
|
||||
m_status == ruby::TesterStatus_Ready);
|
||||
m_status = ruby::TesterStatus_Idle;
|
||||
m_address = address;
|
||||
DPRINTF(RubyTest, "Check %#x, State=Idle\n", m_address);
|
||||
m_store_count = 0;
|
||||
@@ -360,7 +361,7 @@ Check::changeAddress(Addr address)
|
||||
void
|
||||
Check::pickValue()
|
||||
{
|
||||
assert(m_status == TesterStatus_Idle);
|
||||
assert(m_status == ruby::TesterStatus_Idle);
|
||||
m_value = random_mt.random(0, 0xff); // One byte
|
||||
m_store_count = 0;
|
||||
}
|
||||
@@ -368,8 +369,9 @@ Check::pickValue()
|
||||
void
|
||||
Check::pickInitiatingNode()
|
||||
{
|
||||
assert(m_status == TesterStatus_Idle || m_status == TesterStatus_Ready);
|
||||
m_status = TesterStatus_Idle;
|
||||
assert(m_status == ruby::TesterStatus_Idle ||
|
||||
m_status == ruby::TesterStatus_Ready);
|
||||
m_status = ruby::TesterStatus_Idle;
|
||||
m_initiatingNode = (random_mt.random(0, m_num_writers - 1));
|
||||
DPRINTF(RubyTest, "Check %#x, State=Idle, picked initiating node %d\n",
|
||||
m_address, m_initiatingNode);
|
||||
@@ -393,7 +395,8 @@ Check::debugPrint()
|
||||
{
|
||||
DPRINTF(RubyTest,
|
||||
"[%#x, value: %d, status: %s, initiating node: %d, store_count: %d]\n",
|
||||
m_address, (int)m_value, TesterStatus_to_string(m_status).c_str(),
|
||||
m_address, (int)m_value,
|
||||
ruby::TesterStatus_to_string(m_status).c_str(),
|
||||
m_initiatingNode, m_store_count);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,10 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
class SubBlock;
|
||||
} // namespace ruby
|
||||
|
||||
const int CHECK_SIZE_BITS = 2;
|
||||
const int CHECK_SIZE = (1 << CHECK_SIZE_BITS);
|
||||
@@ -52,7 +55,8 @@ class Check
|
||||
int _num_readers, RubyTester* _tester);
|
||||
|
||||
void initiate(); // Does Action or Check or nether
|
||||
void performCallback(NodeID proc, SubBlock* data, Cycles curTime);
|
||||
void performCallback(ruby::NodeID proc, ruby::SubBlock* data,
|
||||
Cycles curTime);
|
||||
Addr getAddress() const { return m_address; }
|
||||
void changeAddress(Addr address);
|
||||
|
||||
@@ -69,13 +73,13 @@ class Check
|
||||
|
||||
void debugPrint();
|
||||
|
||||
TesterStatus m_status;
|
||||
ruby::TesterStatus m_status;
|
||||
uint8_t m_value;
|
||||
int m_store_count;
|
||||
NodeID m_initiatingNode;
|
||||
ruby::NodeID m_initiatingNode;
|
||||
Addr m_address;
|
||||
Addr m_pc;
|
||||
RubyAccessMode m_access_mode;
|
||||
ruby::RubyAccessMode m_access_mode;
|
||||
int m_num_writers;
|
||||
int m_num_readers;
|
||||
RubyTester* m_tester_ptr;
|
||||
|
||||
@@ -86,7 +86,7 @@ void
|
||||
CheckTable::addCheck(Addr address)
|
||||
{
|
||||
if (floorLog2(CHECK_SIZE) != 0) {
|
||||
if (bitSelect(address, 0, CHECK_SIZE_BITS - 1) != 0) {
|
||||
if (ruby::bitSelect(address, 0, CHECK_SIZE_BITS - 1) != 0) {
|
||||
panic("Check not aligned");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ RubyTester::CpuPort::recvTimingResp(PacketPtr pkt)
|
||||
// retrieve the subblock and call hitCallback
|
||||
RubyTester::SenderState* senderState =
|
||||
safe_cast<RubyTester::SenderState*>(pkt->senderState);
|
||||
SubBlock& subblock = senderState->subBlock;
|
||||
ruby::SubBlock& subblock = senderState->subBlock;
|
||||
|
||||
tester->hitCallback(globalIdx, &subblock);
|
||||
|
||||
@@ -223,7 +223,7 @@ RubyTester::getWritableCpuPort(int idx)
|
||||
}
|
||||
|
||||
void
|
||||
RubyTester::hitCallback(NodeID proc, SubBlock* data)
|
||||
RubyTester::hitCallback(ruby::NodeID proc, ruby::SubBlock* data)
|
||||
{
|
||||
// Mark that we made progress
|
||||
m_last_progress_vector[proc] = curCycle();
|
||||
|
||||
@@ -88,7 +88,7 @@ class RubyTester : public ClockedObject
|
||||
|
||||
struct SenderState : public Packet::SenderState
|
||||
{
|
||||
SubBlock subBlock;
|
||||
ruby::SubBlock subBlock;
|
||||
|
||||
SenderState(Addr addr, int size) : subBlock(addr, size) {}
|
||||
|
||||
@@ -127,7 +127,7 @@ class RubyTester : public ClockedObject
|
||||
RequestorID _requestorId;
|
||||
|
||||
private:
|
||||
void hitCallback(NodeID proc, SubBlock* data);
|
||||
void hitCallback(ruby::NodeID proc, ruby::SubBlock* data);
|
||||
|
||||
void checkForDeadlock();
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ FetchUnit::initiateFetch(Wavefront *wavefront)
|
||||
Addr vaddr = fetchBuf.at(wavefront->wfSlotId).nextFetchAddr();
|
||||
|
||||
// this should already be aligned to a cache line
|
||||
assert(vaddr == makeLineAddress(vaddr,
|
||||
assert(vaddr == ruby::makeLineAddress(vaddr,
|
||||
computeUnit.getCacheLineBits()));
|
||||
|
||||
// shouldn't be fetching a line that is already buffered
|
||||
@@ -400,7 +400,7 @@ FetchUnit::FetchBufDesc::nextFetchAddr()
|
||||
* beginning of a cache line, so we adjust the readPtr by
|
||||
* the current PC's offset from the start of the line.
|
||||
*/
|
||||
next_line = makeLineAddress(wavefront->pc(), cacheLineBits);
|
||||
next_line = ruby::makeLineAddress(wavefront->pc(), cacheLineBits);
|
||||
readPtr = bufStart;
|
||||
|
||||
/**
|
||||
@@ -412,7 +412,7 @@ FetchUnit::FetchBufDesc::nextFetchAddr()
|
||||
if (restartFromBranch) {
|
||||
restartFromBranch = false;
|
||||
int byte_offset
|
||||
= wavefront->pc() - makeLineAddress(wavefront->pc(),
|
||||
= wavefront->pc() - ruby::makeLineAddress(wavefront->pc(),
|
||||
cacheLineBits);
|
||||
readPtr += byte_offset;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
Addr
|
||||
bitSelect(Addr addr, unsigned int small, unsigned int big)
|
||||
{
|
||||
@@ -82,4 +85,5 @@ printAddress(Addr addr)
|
||||
return out.str();
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
// selects bits inclusive
|
||||
Addr bitSelect(Addr addr, unsigned int small, unsigned int big);
|
||||
Addr maskLowOrderBits(Addr addr, unsigned int number);
|
||||
@@ -47,6 +50,7 @@ Addr makeLineAddress(Addr addr, int cacheLineBits);
|
||||
Addr makeNextStrideAddress(Addr addr, int stride);
|
||||
std::string printAddress(Addr addr);
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_ADDRESS_HH__
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const BoolVec& myvector) {
|
||||
for (const bool e: myvector) {
|
||||
os << " " << e;
|
||||
@@ -50,4 +53,5 @@ std::ostream& operator<<(std::ostream& os, const BoolVec& myvector) {
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -44,10 +44,14 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
typedef std::vector<bool> BoolVec;
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const std::vector<bool>& myvector);
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_COMMON_BOOLVEC_HH__
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
Consumer::Consumer(ClockedObject *_em)
|
||||
: m_wakeup_event([this]{ processCurrentEvent(); },
|
||||
"Consumer Event", false),
|
||||
@@ -92,4 +95,5 @@ Consumer::processCurrentEvent()
|
||||
scheduleNextWakeup();
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class Consumer
|
||||
{
|
||||
public:
|
||||
@@ -101,6 +104,7 @@ operator<<(std::ostream& out, const Consumer& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_CONSUMER_HH__
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
DataBlock::DataBlock(const DataBlock &cp)
|
||||
{
|
||||
m_data = new uint8_t[RubySystem::getBlockSizeBytes()];
|
||||
@@ -138,4 +141,5 @@ DataBlock::operator=(const DataBlock & obj)
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class WriteMask;
|
||||
|
||||
class DataBlock
|
||||
@@ -136,6 +139,7 @@ operator==(const DataBlock& obj1,const DataBlock& obj2)
|
||||
return obj1.equal(obj2);
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_DATABLOCK_HH__
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
// ExpectedMap helper class is used to facilitate tracking of pending
|
||||
// response and data messages in the CHI protocol. It offers additional
|
||||
// functionality when compared to plain counters:
|
||||
@@ -231,6 +234,7 @@ operator<<(std::ostream& out, const ExpectedMap<RespType,DataType>& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_EXPECTEDMAP_HH__
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
Histogram::Histogram(int binsize, uint32_t bins)
|
||||
{
|
||||
m_binsize = binsize;
|
||||
@@ -238,4 +241,5 @@ node_less_then_eq(const Histogram* n1, const Histogram* n2)
|
||||
return (n1->size() > n2->size());
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class Histogram
|
||||
{
|
||||
public:
|
||||
@@ -86,6 +89,7 @@ operator<<(std::ostream& out, const Histogram& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_HISTOGRAM_HH__
|
||||
|
||||
@@ -39,10 +39,14 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const IntVec& myvector) {
|
||||
for (auto& it : myvector)
|
||||
os << " " << it;
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -40,10 +40,14 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
typedef std::vector<int> IntVec;
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const std::vector<int>& myvector);
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_COMMON_INTVEC_HH__
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
struct MachineID
|
||||
{
|
||||
MachineID() : type(MachineType_NUM), num(0) { }
|
||||
@@ -101,16 +104,18 @@ operator<<(::std::ostream& out, const MachineID& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
struct hash<gem5::MachineID>
|
||||
struct hash<gem5::ruby::MachineID>
|
||||
{
|
||||
inline size_t operator()(const gem5::MachineID& id) const
|
||||
inline size_t operator()(const gem5::ruby::MachineID& id) const
|
||||
{
|
||||
size_t hval = gem5::MachineType_base_level(id.type) << 16 | id.num;
|
||||
size_t hval = gem5::ruby::MachineType_base_level(
|
||||
id.type) << 16 | id.num;
|
||||
return hval;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
NetDest::NetDest()
|
||||
{
|
||||
resize();
|
||||
@@ -282,4 +285,5 @@ NetDest::isEqual(const NetDest& n) const
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
// NetDest specifies the network destination of a Message
|
||||
class NetDest
|
||||
{
|
||||
@@ -119,6 +122,7 @@ operator<<(std::ostream& out, const NetDest& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_NETDEST_HH__
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class Set
|
||||
{
|
||||
private:
|
||||
@@ -229,6 +232,7 @@ operator<<(std::ostream& out, const Set& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_SET_HH__
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
using stl_helpers::operator<<;
|
||||
|
||||
SubBlock::SubBlock(Addr addr, int size)
|
||||
@@ -73,4 +76,5 @@ SubBlock::print(std::ostream& out) const
|
||||
out << "[" << m_address << ", " << getSize() << ", " << m_data << "]";
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class SubBlock
|
||||
{
|
||||
public:
|
||||
@@ -81,6 +84,7 @@ operator<<(std::ostream& out, const SubBlock& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_SUBBLOCK_HH__
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
// TriggerQueue helper class is used keep a list of events that trigger the
|
||||
// actions that need to be executed before an ouststanding transaction
|
||||
// completes in the CHI protocol. When a transaction no longer has pending
|
||||
@@ -126,6 +129,7 @@ TriggerQueue<T>::print(std::ostream& out) const
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_QUEUE_HH__
|
||||
|
||||
@@ -33,10 +33,14 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
typedef unsigned int LinkID;
|
||||
typedef unsigned int NodeID;
|
||||
typedef unsigned int SwitchID;
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_COMMON_TYPEDEFINES_HH__
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
WriteMask::WriteMask()
|
||||
: mSize(RubySystem::getBlockSizeBytes()), mMask(mSize, false),
|
||||
mAtomic(false)
|
||||
@@ -52,4 +55,5 @@ WriteMask::print(std::ostream& out) const
|
||||
<< std::flush;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class WriteMask
|
||||
{
|
||||
public:
|
||||
@@ -268,6 +271,7 @@ operator<<(std::ostream& out, const WriteMask& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_COMMON_WRITEMASK_HH__
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
BasicLink::BasicLink(const Params &p)
|
||||
: SimObject(p)
|
||||
{
|
||||
@@ -61,4 +64,5 @@ BasicIntLink::BasicIntLink(const Params &p)
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class Topology;
|
||||
|
||||
class BasicLink : public SimObject
|
||||
@@ -87,6 +90,7 @@ class BasicIntLink : public BasicLink
|
||||
friend class Topology;
|
||||
};
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_BASICLINK_HH__
|
||||
|
||||
@@ -30,7 +30,7 @@ from m5.SimObject import SimObject
|
||||
class BasicLink(SimObject):
|
||||
type = 'BasicLink'
|
||||
cxx_header = "mem/ruby/network/BasicLink.hh"
|
||||
cxx_class = 'gem5::BasicLink'
|
||||
cxx_class = 'gem5::ruby::BasicLink'
|
||||
|
||||
link_id = Param.Int("ID in relation to other links")
|
||||
latency = Param.Cycles(1, "latency")
|
||||
@@ -44,7 +44,7 @@ class BasicLink(SimObject):
|
||||
class BasicExtLink(BasicLink):
|
||||
type = 'BasicExtLink'
|
||||
cxx_header = "mem/ruby/network/BasicLink.hh"
|
||||
cxx_class = 'gem5::BasicExtLink'
|
||||
cxx_class = 'gem5::ruby::BasicExtLink'
|
||||
|
||||
ext_node = Param.RubyController("External node")
|
||||
int_node = Param.BasicRouter("ID of internal node")
|
||||
@@ -53,7 +53,7 @@ class BasicExtLink(BasicLink):
|
||||
class BasicIntLink(BasicLink):
|
||||
type = 'BasicIntLink'
|
||||
cxx_header = "mem/ruby/network/BasicLink.hh"
|
||||
cxx_class = 'gem5::BasicIntLink'
|
||||
cxx_class = 'gem5::ruby::BasicIntLink'
|
||||
|
||||
src_node = Param.BasicRouter("Router on src end")
|
||||
dst_node = Param.BasicRouter("Router on dst end")
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
BasicRouter::BasicRouter(const Params &p)
|
||||
: ClockedObject(p)
|
||||
{
|
||||
@@ -49,4 +52,5 @@ BasicRouter::print(std::ostream& out) const
|
||||
out << name();
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class BasicRouter : public ClockedObject
|
||||
{
|
||||
public:
|
||||
@@ -64,6 +67,7 @@ operator<<(std::ostream& out, const BasicRouter& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_BASICROUTER_HH__
|
||||
|
||||
@@ -31,7 +31,7 @@ from m5.objects.ClockedObject import ClockedObject
|
||||
class BasicRouter(ClockedObject):
|
||||
type = 'BasicRouter'
|
||||
cxx_header = "mem/ruby/network/BasicRouter.hh"
|
||||
cxx_class = 'gem5::BasicRouter'
|
||||
cxx_class = 'gem5::ruby::BasicRouter'
|
||||
|
||||
router_id = Param.Int("ID in relation to other routers")
|
||||
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
using stl_helpers::operator<<;
|
||||
|
||||
MessageBuffer::MessageBuffer(const Params &p)
|
||||
@@ -530,4 +533,5 @@ MessageBuffer::functionalAccess(Packet *pkt, bool is_read, WriteMask *mask)
|
||||
return num_functional_accesses;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class MessageBuffer : public SimObject
|
||||
{
|
||||
public:
|
||||
@@ -277,6 +280,7 @@ operator<<(std::ostream& out, const MessageBuffer& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_MESSAGEBUFFER_HH__
|
||||
|
||||
@@ -49,7 +49,7 @@ class MessageRandomization(ScopedEnum):
|
||||
|
||||
class MessageBuffer(SimObject):
|
||||
type = 'MessageBuffer'
|
||||
cxx_class = 'gem5::MessageBuffer'
|
||||
cxx_class = 'gem5::ruby::MessageBuffer'
|
||||
cxx_header = "mem/ruby/network/MessageBuffer.hh"
|
||||
|
||||
ordered = Param.Bool(False, "Whether the buffer is ordered")
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
uint32_t Network::m_virtual_networks;
|
||||
uint32_t Network::m_control_msg_size;
|
||||
uint32_t Network::m_data_msg_size;
|
||||
@@ -253,4 +256,5 @@ Network::getLocalNodeID(NodeID global_id) const
|
||||
return globalToLocalMap.at(global_id);
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class NetDest;
|
||||
class MessageBuffer;
|
||||
|
||||
@@ -183,6 +186,7 @@ operator<<(std::ostream& out, const Network& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_NETWORK_HH__
|
||||
|
||||
@@ -31,7 +31,7 @@ from m5.objects.BasicLink import BasicLink
|
||||
|
||||
class RubyNetwork(ClockedObject):
|
||||
type = 'RubyNetwork'
|
||||
cxx_class = 'gem5::Network'
|
||||
cxx_class = 'gem5::ruby::Network'
|
||||
cxx_header = "mem/ruby/network/Network.hh"
|
||||
abstract = True
|
||||
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
const int INFINITE_LATENCY = 10000; // Yes, this is a big hack
|
||||
|
||||
// Note: In this file, we use the first 2*m_nodes SwitchIDs to
|
||||
@@ -443,4 +446,5 @@ Topology::shortest_path_to_node(SwitchID src, SwitchID next,
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class NetDest;
|
||||
class Network;
|
||||
|
||||
@@ -125,6 +128,7 @@ operator<<(std::ostream& out, const Topology& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_TOPOLOGY_HH__
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class RubyDummyPort : public Port
|
||||
{
|
||||
public:
|
||||
@@ -57,6 +60,7 @@ class RubyDummyPort : public Port
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_DUMMY_PORT_HH__
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
FaultModel::FaultModel(const Params &p) : SimObject(p)
|
||||
{
|
||||
// read configurations into "configurations" vector
|
||||
@@ -269,4 +272,5 @@ FaultModel::print(void)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class FaultModel : public SimObject
|
||||
{
|
||||
public:
|
||||
@@ -138,6 +141,7 @@ class FaultModel : public SimObject
|
||||
std::vector <int> temperature_weights;
|
||||
};
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_FAULT_MODEL_FAULTMODEL_HH__
|
||||
|
||||
@@ -36,7 +36,7 @@ from m5.SimObject import SimObject
|
||||
|
||||
class FaultModel(SimObject):
|
||||
type = 'FaultModel'
|
||||
cxx_class = 'gem5::FaultModel'
|
||||
cxx_class = 'gem5::ruby::FaultModel'
|
||||
cxx_header = "mem/ruby/network/fault_model/FaultModel.hh"
|
||||
|
||||
baseline_fault_vector_database = VectorParam.Float([
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -72,6 +75,7 @@ struct RouteInfo
|
||||
#define INFINITE_ 10000
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_GARNET_0_COMMONTYPES_HH__
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -87,4 +90,5 @@ Credit::print(std::ostream& out) const
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -68,6 +71,7 @@ class Credit : public flit
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_CREDIT_HH__
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -48,6 +51,7 @@ class CreditLink : public NetworkLink
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_CREDITLINK_HH__
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -107,4 +110,5 @@ CrossbarSwitch::resetStats()
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -75,6 +78,7 @@ class CrossbarSwitch : public Consumer
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_CROSSBARSWITCH_HH__
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -161,4 +164,5 @@ GarnetExtLink::print(std::ostream& out) const
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -130,6 +133,7 @@ operator<<(std::ostream& out, const GarnetExtLink& obj)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_GARNET_0_GARNETLINK_HH__
|
||||
|
||||
@@ -38,7 +38,7 @@ class CDCType(Enum): vals = [
|
||||
class NetworkLink(ClockedObject):
|
||||
type = 'NetworkLink'
|
||||
cxx_header = "mem/ruby/network/garnet/NetworkLink.hh"
|
||||
cxx_class = 'gem5::garnet::NetworkLink'
|
||||
cxx_class = 'gem5::ruby::garnet::NetworkLink'
|
||||
|
||||
link_id = Param.Int(Parent.link_id, "link id")
|
||||
link_latency = Param.Cycles(Parent.latency, "link latency")
|
||||
@@ -53,12 +53,12 @@ class NetworkLink(ClockedObject):
|
||||
class CreditLink(NetworkLink):
|
||||
type = 'CreditLink'
|
||||
cxx_header = "mem/ruby/network/garnet/CreditLink.hh"
|
||||
cxx_class = 'gem5::garnet::CreditLink'
|
||||
cxx_class = 'gem5::ruby::garnet::CreditLink'
|
||||
|
||||
class NetworkBridge(CreditLink):
|
||||
type = 'NetworkBridge'
|
||||
cxx_header = "mem/ruby/network/garnet/NetworkBridge.hh"
|
||||
cxx_class = 'gem5::garnet::NetworkBridge'
|
||||
cxx_class = 'gem5::ruby::garnet::NetworkBridge'
|
||||
|
||||
link = Param.NetworkLink("Associated Network Link")
|
||||
vtype = Param.CDCType('LINK_OBJECT',
|
||||
@@ -70,7 +70,7 @@ class NetworkBridge(CreditLink):
|
||||
class GarnetIntLink(BasicIntLink):
|
||||
type = 'GarnetIntLink'
|
||||
cxx_header = "mem/ruby/network/garnet/GarnetLink.hh"
|
||||
cxx_class = 'gem5::garnet::GarnetIntLink'
|
||||
cxx_class = 'gem5::ruby::garnet::GarnetIntLink'
|
||||
|
||||
# The internal link includes one forward link (for flit)
|
||||
# and one backward flow-control link (for credit)
|
||||
@@ -109,7 +109,7 @@ class GarnetIntLink(BasicIntLink):
|
||||
class GarnetExtLink(BasicExtLink):
|
||||
type = 'GarnetExtLink'
|
||||
cxx_header = "mem/ruby/network/garnet/GarnetLink.hh"
|
||||
cxx_class = 'gem5::garnet::GarnetExtLink'
|
||||
cxx_class = 'gem5::ruby::garnet::GarnetExtLink'
|
||||
|
||||
# The external link is bi-directional.
|
||||
# It includes two forward links (for flits)
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -621,4 +624,5 @@ GarnetNetwork::functionalWrite(Packet *pkt)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class FaultModel;
|
||||
class NetDest;
|
||||
|
||||
@@ -217,6 +220,7 @@ operator<<(std::ostream& out, const GarnetNetwork& obj)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_GARNET_0_GARNETNETWORK_HH__
|
||||
|
||||
@@ -37,7 +37,7 @@ from m5.objects.ClockedObject import ClockedObject
|
||||
class GarnetNetwork(RubyNetwork):
|
||||
type = 'GarnetNetwork'
|
||||
cxx_header = "mem/ruby/network/garnet/GarnetNetwork.hh"
|
||||
cxx_class = 'gem5::garnet::GarnetNetwork'
|
||||
cxx_class = 'gem5::ruby::garnet::GarnetNetwork'
|
||||
|
||||
num_rows = Param.Int(0, "number of rows if 2D (mesh/torus/..) topology");
|
||||
ni_flit_size = Param.UInt32(16, "network interface flit size in bytes")
|
||||
@@ -53,7 +53,7 @@ class GarnetNetwork(RubyNetwork):
|
||||
|
||||
class GarnetNetworkInterface(ClockedObject):
|
||||
type = 'GarnetNetworkInterface'
|
||||
cxx_class = 'gem5::garnet::NetworkInterface'
|
||||
cxx_class = 'gem5::ruby::garnet::NetworkInterface'
|
||||
cxx_header = "mem/ruby/network/garnet/NetworkInterface.hh"
|
||||
|
||||
id = Param.UInt32("ID in relation to other network interfaces")
|
||||
@@ -66,7 +66,7 @@ class GarnetNetworkInterface(ClockedObject):
|
||||
|
||||
class GarnetRouter(BasicRouter):
|
||||
type = 'GarnetRouter'
|
||||
cxx_class = 'gem5::garnet::Router'
|
||||
cxx_class = 'gem5::ruby::garnet::Router'
|
||||
cxx_header = "mem/ruby/network/garnet/Router.hh"
|
||||
vcs_per_vnet = Param.UInt32(Parent.vcs_per_vnet,
|
||||
"virtual channels per virtual network")
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -170,4 +173,5 @@ InputUnit::resetStats()
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -170,6 +173,7 @@ class InputUnit : public Consumer
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_INPUTUNIT_HH__
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -272,4 +275,5 @@ NetworkBridge::wakeup()
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -102,6 +105,7 @@ class NetworkBridge: public CreditLink
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_NETWORK_BRIDGE_HH__
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -678,4 +681,5 @@ NetworkInterface::functionalWrite(Packet *pkt)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class MessageBuffer;
|
||||
|
||||
namespace garnet
|
||||
@@ -305,6 +308,7 @@ class NetworkInterface : public ClockedObject, public Consumer
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_NETWORKINTERFACE_HH__
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -123,4 +126,5 @@ NetworkLink::functionalWrite(Packet *pkt)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -104,6 +107,7 @@ class NetworkLink : public ClockedObject, public Consumer
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_NETWORKLINK_HH__
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -75,4 +78,5 @@ OutVcState::decrement_credit()
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -71,6 +74,7 @@ class OutVcState
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_GARNET_0_OUTVCSTATE_HH__
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -176,4 +179,5 @@ OutputUnit::functionalWrite(Packet *pkt)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -118,6 +121,7 @@ class OutputUnit : public Consumer
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_OUTPUTUNIT_HH__
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -289,4 +292,5 @@ Router::functionalWrite(Packet *pkt)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class FaultModel;
|
||||
|
||||
namespace garnet
|
||||
@@ -162,6 +165,7 @@ class Router : public BasicRouter, public Consumer
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_ROUTER_HH__
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -268,4 +271,5 @@ RoutingUnit::outportComputeCustom(RouteInfo route,
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -95,6 +98,7 @@ class RoutingUnit
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_ROUTINGUNIT_HH__
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -394,4 +397,5 @@ SwitchAllocator::resetStats()
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -90,6 +93,7 @@ class SwitchAllocator : public Consumer
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_SWITCHALLOCATOR_HH__
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -79,4 +82,5 @@ VirtualChannel::functionalWrite(Packet *pkt)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -103,6 +106,7 @@ class VirtualChannel
|
||||
};
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_VIRTUALCHANNEL_HH__
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -128,4 +131,5 @@ flit::functionalWrite(Packet *pkt)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -134,6 +137,7 @@ operator<<(std::ostream& out, const flit& obj)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_FLIT_HH__
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -97,4 +100,5 @@ flitBuffer::functionalWrite(Packet *pkt)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
namespace garnet
|
||||
{
|
||||
|
||||
@@ -93,6 +96,7 @@ operator<<(std::ostream& out, const flitBuffer& obj)
|
||||
}
|
||||
|
||||
} // namespace garnet
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_0_FLITBUFFER_HH__
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
const int PRIORITY_SWITCH_LIMIT = 128;
|
||||
|
||||
// Operator for helper class
|
||||
@@ -330,4 +333,5 @@ PerfectSwitch::print(std::ostream& out) const
|
||||
out << "[PerfectSwitch " << m_switch_id << "]";
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class MessageBuffer;
|
||||
class NetDest;
|
||||
class SimpleNetwork;
|
||||
@@ -117,6 +120,7 @@ operator<<(std::ostream& out, const PerfectSwitch& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_SIMPLE_PERFECTSWITCH_HH__
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
SimpleExtLink::SimpleExtLink(const Params &p)
|
||||
: BasicExtLink(p)
|
||||
{
|
||||
@@ -63,4 +66,5 @@ SimpleIntLink::print(std::ostream& out) const
|
||||
out << name();
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class SimpleExtLink : public BasicExtLink
|
||||
{
|
||||
public:
|
||||
@@ -80,6 +83,7 @@ operator<<(std::ostream& out, const SimpleIntLink& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_RUBY_NETWORK_SIMPLE_SIMPLELINK_HH__
|
||||
|
||||
@@ -32,9 +32,9 @@ from m5.objects.BasicLink import BasicIntLink, BasicExtLink
|
||||
class SimpleExtLink(BasicExtLink):
|
||||
type = 'SimpleExtLink'
|
||||
cxx_header = "mem/ruby/network/simple/SimpleLink.hh"
|
||||
cxx_class = 'gem5::SimpleExtLink'
|
||||
cxx_class = 'gem5::ruby::SimpleExtLink'
|
||||
|
||||
class SimpleIntLink(BasicIntLink):
|
||||
type = 'SimpleIntLink'
|
||||
cxx_header = "mem/ruby/network/simple/SimpleLink.hh"
|
||||
cxx_class = 'gem5::SimpleIntLink'
|
||||
cxx_class = 'gem5::ruby::SimpleIntLink'
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
SimpleNetwork::SimpleNetwork(const Params &p)
|
||||
: Network(p), m_buffer_size(p.buffer_size),
|
||||
m_endpoint_bandwidth(p.endpoint_bandwidth),
|
||||
@@ -243,4 +246,5 @@ NetworkStats::NetworkStats(statistics::Group *parent)
|
||||
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
namespace ruby
|
||||
{
|
||||
|
||||
class NetDest;
|
||||
class MessageBuffer;
|
||||
class Throttle;
|
||||
@@ -125,6 +128,7 @@ operator<<(std::ostream& out, const SimpleNetwork& obj)
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace ruby
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_SIMPLE_SIMPLENETWORK_HH__
|
||||
|
||||
@@ -34,7 +34,7 @@ from m5.objects.MessageBuffer import MessageBuffer
|
||||
class SimpleNetwork(RubyNetwork):
|
||||
type = 'SimpleNetwork'
|
||||
cxx_header = "mem/ruby/network/simple/SimpleNetwork.hh"
|
||||
cxx_class = 'gem5::SimpleNetwork'
|
||||
cxx_class = 'gem5::ruby::SimpleNetwork'
|
||||
|
||||
buffer_size = Param.Int(0,
|
||||
"default buffer size; 0 indicates infinite buffering");
|
||||
@@ -74,7 +74,7 @@ class SimpleNetwork(RubyNetwork):
|
||||
class Switch(BasicRouter):
|
||||
type = 'Switch'
|
||||
cxx_header = 'mem/ruby/network/simple/Switch.hh'
|
||||
cxx_class = 'gem5::Switch'
|
||||
cxx_class = 'gem5::ruby::Switch'
|
||||
|
||||
virt_nets = Param.Int(Parent.number_of_virtual_networks,
|
||||
"number of virtual networks")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user