summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r--src/mem/ruby/network/fault_model/FaultModel.cc7
-rw-r--r--src/mem/ruby/network/fault_model/FaultModel.hh9
-rw-r--r--src/mem/ruby/network/garnet/BaseGarnetNetwork.cc2
-rw-r--r--src/mem/ruby/network/orion/OrionConfig.hh27
-rw-r--r--src/mem/ruby/network/orion/OrionRouter.cc2
-rw-r--r--src/mem/ruby/network/orion/TechParameter.hh2
6 files changed, 24 insertions, 25 deletions
diff --git a/src/mem/ruby/network/fault_model/FaultModel.cc b/src/mem/ruby/network/fault_model/FaultModel.cc
index 195f7c66c..83679984d 100644
--- a/src/mem/ruby/network/fault_model/FaultModel.cc
+++ b/src/mem/ruby/network/fault_model/FaultModel.cc
@@ -37,11 +37,8 @@
* Proceedings of the 48th Design Automation Conference (DAC'11)
*/
-// C includes
-#include <assert.h>
-#include <stdio.h>
-
// C++ includes
+#include <cassert>
#include <fstream>
#include <iostream>
#include <vector>
@@ -50,6 +47,8 @@
#include "FaultModel.hh"
#include "base/misc.hh"
+using namespace std;
+
#define MAX(a,b) ((a > b) ? (a) : (b))
diff --git a/src/mem/ruby/network/fault_model/FaultModel.hh b/src/mem/ruby/network/fault_model/FaultModel.hh
index 12a3f3844..c099220ca 100644
--- a/src/mem/ruby/network/fault_model/FaultModel.hh
+++ b/src/mem/ruby/network/fault_model/FaultModel.hh
@@ -47,7 +47,6 @@
// C++ includes
#include <string>
-using namespace std;
// GEM5 includes
#include "params/FaultModel.hh"
@@ -112,7 +111,7 @@ class FaultModel : public SimObject
int number_of_buff_per_data_vc,
int number_of_buff_per_ctrl_vc);
- string fault_type_to_string(int fault_type_index);
+ std::string fault_type_to_string(int fault_type_index);
// the following 2 functions are called at runtime, to get the probability
// of each fault type (fault_vector) or the aggregate fault probability
@@ -134,9 +133,9 @@ class FaultModel : public SimObject
void print(void);
private:
- vector <system_conf> configurations;
- vector <system_conf> routers;
- vector <int> temperature_weights;
+ std::vector <system_conf> configurations;
+ std::vector <system_conf> routers;
+ std::vector <int> temperature_weights;
};
#endif // __MEM_RUBY_NETWORK_FAULT_MODEL_HH__
diff --git a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc
index f7093c8ba..69d513329 100644
--- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc
+++ b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc
@@ -33,6 +33,8 @@
#include "mem/ruby/network/Topology.hh"
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
+using namespace std;
+
BaseGarnetNetwork::BaseGarnetNetwork(const Params *p)
: Network(p)
{
diff --git a/src/mem/ruby/network/orion/OrionConfig.hh b/src/mem/ruby/network/orion/OrionConfig.hh
index 7138fd8a2..d9b0e0830 100644
--- a/src/mem/ruby/network/orion/OrionConfig.hh
+++ b/src/mem/ruby/network/orion/OrionConfig.hh
@@ -37,8 +37,6 @@
#include "mem/ruby/network/orion/Type.hh"
-using namespace std;
-
class TechParameter;
class OrionConfig
@@ -56,12 +54,12 @@ class OrionConfig
void set_in_buf_num_set(uint32_t in_buf_num_set_);
void set_flit_width(uint32_t flit_width_);
- void read_file(const string& filename_);
- void print_config(ostream& out_);
+ void read_file(const std::string& filename_);
+ void print_config(std::ostream& out_);
public:
template<class T>
- T get(const string& key_) const;
+ T get(const std::string& key_) const;
const TechParameter* get_tech_param_ptr() const { return m_tech_param_ptr; }
uint32_t get_num_in_port() const { return m_num_in_port; }
uint32_t get_num_out_port() const { return m_num_out_port; }
@@ -71,7 +69,7 @@ class OrionConfig
uint32_t get_flit_width() const { return m_flit_width; }
private:
- map<string, string> m_params_map;
+ std::map<std::string, std::string> m_params_map;
TechParameter* m_tech_param_ptr;
uint32_t m_num_in_port;
@@ -84,28 +82,28 @@ class OrionConfig
protected:
struct key_not_found
{
- string m_key;
- key_not_found(const string& key_ = string()) : m_key(key_)
+ std::string m_key;
+ key_not_found(const std::string& key_ = string()) : m_key(key_)
{}
};
template<class T>
- static T string_as_T(const string& str_);
+ static T string_as_T(const std::string& str_);
template<class T>
- static string T_as_string(const T& t_);
+ static std::string T_as_string(const T& t_);
private:
- static string ms_param_name[];
+ static std::string ms_param_name[];
};
template<class T>
T OrionConfig::get(const string& key_) const
{
- map<string, string>::const_iterator it;
+ std::map<std::string, std::string>::const_iterator it;
it = m_params_map.find(key_);
if (it == m_params_map.end())
{
- cerr << key_ << " NOT FOUND!" << endl;
+ std::cerr << key_ << " NOT FOUND!" << std::endl;
throw key_not_found(key_);
}
return string_as_T<T>(it->second);
@@ -140,7 +138,8 @@ inline bool OrionConfig::string_as_T<bool>(const string& str_)
}
else
{
- cerr << "Invalid bool value: '" << str_ << "'. Treated as FALSE." << endl;
+ std::cerr << "Invalid bool value: '" << str_ <<
+ "'. Treated as FALSE." << std::endl;
ret = false;
}
return ret;
diff --git a/src/mem/ruby/network/orion/OrionRouter.cc b/src/mem/ruby/network/orion/OrionRouter.cc
index e6fc88a78..bcf7c3920 100644
--- a/src/mem/ruby/network/orion/OrionRouter.cc
+++ b/src/mem/ruby/network/orion/OrionRouter.cc
@@ -43,6 +43,8 @@
#include "mem/ruby/network/orion/OrionConfig.hh"
#include "OrionRouter.hh"
+using namespace std;
+
OrionRouter::OrionRouter(
uint32_t num_in_port_,
uint32_t num_out_port_,
diff --git a/src/mem/ruby/network/orion/TechParameter.hh b/src/mem/ruby/network/orion/TechParameter.hh
index af9ba65d4..c894a513c 100644
--- a/src/mem/ruby/network/orion/TechParameter.hh
+++ b/src/mem/ruby/network/orion/TechParameter.hh
@@ -40,8 +40,6 @@
#include "mem/ruby/network/orion/Type.hh"
-using namespace std;
-
class OrionConfig;
class TechParameter