summaryrefslogtreecommitdiff
path: root/src/mem/ruby
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:41 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:41 -0500
commitcc2cc588693bb73b1892aea82fd0ac9729196f25 (patch)
tree29056c28b5492831634fcab6692e94ffe66af3eb /src/mem/ruby
parent82d136285dac52a97384961a814d5a0dda4a6482 (diff)
downloadgem5-cc2cc588693bb73b1892aea82fd0ac9729196f25.tar.xz
ruby: eliminate type Time
There is another type Time in src/base class which results in a conflict.
Diffstat (limited to 'src/mem/ruby')
-rw-r--r--src/mem/ruby/common/TypeDefines.hh1
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh2
-rw-r--r--src/mem/ruby/profiler/StoreTrace.cc2
-rw-r--r--src/mem/ruby/profiler/StoreTrace.hh5
-rw-r--r--src/mem/ruby/slicc_interface/RubySlicc_Util.hh1
-rw-r--r--src/mem/ruby/system/CacheRecorder.cc2
-rw-r--r--src/mem/ruby/system/CacheRecorder.hh5
8 files changed, 11 insertions, 11 deletions
diff --git a/src/mem/ruby/common/TypeDefines.hh b/src/mem/ruby/common/TypeDefines.hh
index 391c9365a..9996fb0f4 100644
--- a/src/mem/ruby/common/TypeDefines.hh
+++ b/src/mem/ruby/common/TypeDefines.hh
@@ -33,7 +33,6 @@
typedef unsigned long long uint64;
typedef long long int64;
-typedef int64 Time;
typedef uint64 physical_address_t;
typedef int64 Index; // what the address bit ripper returns
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
index 5f9493806..db71c9974 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
@@ -60,7 +60,7 @@ NetworkInterface_d::NetworkInterface_d(const Params *p)
// instantiating the NI flit buffers
for (int i = 0; i < m_num_vcs; i++) {
m_ni_buffers[i] = new flitBuffer_d();
- m_ni_enqueue_time[i] = INFINITE_;
+ m_ni_enqueue_time[i] = Cycles(INFINITE_);
}
m_vc_allocator.resize(m_virtual_networks); // 1 allocator per vnet
@@ -330,7 +330,7 @@ NetworkInterface_d::scheduleOutputLink()
if (t_flit->get_type() == TAIL_ ||
t_flit->get_type() == HEAD_TAIL_) {
- m_ni_enqueue_time[vc] = INFINITE_;
+ m_ni_enqueue_time[vc] = Cycles(INFINITE_);
}
return;
}
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh
index 0b8b9f12f..05142cd28 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh
@@ -86,7 +86,7 @@ class NetworkInterface_d : public ClockedObject, public Consumer
// Input Flit Buffers
// The flit buffers which will serve the Consumer
std::vector<flitBuffer_d *> m_ni_buffers;
- std::vector<Time> m_ni_enqueue_time;
+ std::vector<Cycles> m_ni_enqueue_time;
// The Message buffers that takes messages from the protocol
std::vector<MessageBuffer *> inNode_ptr;
diff --git a/src/mem/ruby/profiler/StoreTrace.cc b/src/mem/ruby/profiler/StoreTrace.cc
index 84b05ea86..1c462dd25 100644
--- a/src/mem/ruby/profiler/StoreTrace.cc
+++ b/src/mem/ruby/profiler/StoreTrace.cc
@@ -127,7 +127,7 @@ void
StoreTrace::downgrade(NodeID node)
{
if (node == m_last_writer) {
- Time current = curTick();
+ Tick current = curTick();
assert(m_stores_this_interval != 0);
assert(m_last_store != 0);
assert(m_first_store != 0);
diff --git a/src/mem/ruby/profiler/StoreTrace.hh b/src/mem/ruby/profiler/StoreTrace.hh
index 293871723..ac38a420b 100644
--- a/src/mem/ruby/profiler/StoreTrace.hh
+++ b/src/mem/ruby/profiler/StoreTrace.hh
@@ -31,6 +31,7 @@
#include <iostream>
+#include "base/types.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/common/Histogram.hh"
@@ -61,8 +62,8 @@ class StoreTrace
Address m_addr;
NodeID m_last_writer;
- Time m_first_store;
- Time m_last_store;
+ Tick m_first_store;
+ Tick m_last_store;
int m_stores_this_interval;
int64 m_total_samples; // Total number of store lifetimes of this line
diff --git a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh
index 52a47518f..4398a4a00 100644
--- a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh
+++ b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh
@@ -47,7 +47,6 @@ random(int n)
}
inline Cycles zero_time() { return Cycles(0); }
-inline Cycles TimeToCycles(Time t) { return Cycles(t); }
inline NodeID
intToID(int nodenum)
diff --git a/src/mem/ruby/system/CacheRecorder.cc b/src/mem/ruby/system/CacheRecorder.cc
index 3a76a64f7..542d91aef 100644
--- a/src/mem/ruby/system/CacheRecorder.cc
+++ b/src/mem/ruby/system/CacheRecorder.cc
@@ -143,7 +143,7 @@ CacheRecorder::enqueueNextFetchRequest()
void
CacheRecorder::addRecord(int cntrl, const physical_address_t data_addr,
const physical_address_t pc_addr,
- RubyRequestType type, Time time, DataBlock& data)
+ RubyRequestType type, Tick time, DataBlock& data)
{
TraceRecord* rec = (TraceRecord*)malloc(sizeof(TraceRecord) +
m_block_size_bytes);
diff --git a/src/mem/ruby/system/CacheRecorder.hh b/src/mem/ruby/system/CacheRecorder.hh
index 2156b0689..ad1223dce 100644
--- a/src/mem/ruby/system/CacheRecorder.hh
+++ b/src/mem/ruby/system/CacheRecorder.hh
@@ -38,6 +38,7 @@
#include <vector>
#include "base/hashmap.hh"
+#include "base/types.hh"
#include "mem/protocol/RubyRequestType.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/common/DataBlock.hh"
@@ -54,7 +55,7 @@ class Sequencer;
class TraceRecord {
public:
int m_cntrl_id;
- Time m_time;
+ Tick m_time;
physical_address_t m_data_address;
physical_address_t m_pc_address;
RubyRequestType m_type;
@@ -75,7 +76,7 @@ class CacheRecorder
uint64_t block_size_bytes);
void addRecord(int cntrl, const physical_address_t data_addr,
const physical_address_t pc_addr, RubyRequestType type,
- Time time, DataBlock& data);
+ Tick time, DataBlock& data);
uint64 aggregateRecords(uint8_t** data, uint64 size);