summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/orion
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2011-04-28 17:18:14 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2011-04-28 17:18:14 -0700
commit40bcbf42539fec83628f2ae2627238adff27f62c (patch)
tree993083e3b6e5661697261e81869bf40e17027826 /src/mem/ruby/network/orion
parentbc5eb596053f7f69c88f8218f20709d94b2a331c (diff)
downloadgem5-40bcbf42539fec83628f2ae2627238adff27f62c.tar.xz
network: convert links & switches to first class C++ SimObjects
This patch converts links and switches from second class simobjects that were virtually ignored by the networks (both simple and Garnet) to first class simobjects that directly correspond to c++ ojbects manipulated by the topology and network classes. This is especially true for Garnet, where the links and switches directly correspond to specific C++ objects. By making this change, many aspects of the Topology class were simplified. --HG-- rename : src/mem/ruby/network/Network.cc => src/mem/ruby/network/BasicLink.cc rename : src/mem/ruby/network/Network.hh => src/mem/ruby/network/BasicLink.hh rename : src/mem/ruby/network/Network.cc => src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.cc rename : src/mem/ruby/network/Network.hh => src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.hh rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.py rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/fixed-pipeline/GarnetRouter_d.py rename : src/mem/ruby/network/Network.cc => src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.cc rename : src/mem/ruby/network/Network.hh => src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.hh rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.py rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/flexible-pipeline/GarnetRouter.py
Diffstat (limited to 'src/mem/ruby/network/orion')
-rw-r--r--src/mem/ruby/network/orion/NetworkPower.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mem/ruby/network/orion/NetworkPower.cc b/src/mem/ruby/network/orion/NetworkPower.cc
index 81d611f63..2b77c2ef6 100644
--- a/src/mem/ruby/network/orion/NetworkPower.cc
+++ b/src/mem/ruby/network/orion/NetworkPower.cc
@@ -231,7 +231,6 @@ NetworkLink_d::calculate_power()
OrionLink* orion_link_ptr;
static double freq_Hz;
double link_length;
- int channel_width;
// Initialization
const string cfg_fn = "src/mem/ruby/network/orion/router.cfg";
@@ -239,17 +238,19 @@ NetworkLink_d::calculate_power()
freq_Hz = orion_cfg_ptr->get<double>("FREQUENCY");
link_length = orion_cfg_ptr->get<double>("LINK_LENGTH");
- channel_width = m_net_ptr->getFlitSize();
orion_link_ptr = new OrionLink(
link_length,
channel_width /* channel width */,
orion_cfg_ptr);
-
- // Dynamic Power
- double sim_cycles =
- (double)(g_eventQueue_ptr->getTime() - m_net_ptr->getRubyStartTime());
+//
+// NOTE! I believe this calculation will be moved to McPAT, thus this
+// reference to the net_ptr can be removed
+//
+// // Dynamic Power
+ double sim_cycles = 0.0;
+// (double)(g_eventQueue_ptr->getTime() - m_net_ptr->getRubyStartTime());
double Plink_dyn = orion_link_ptr->calc_dynamic_energy(channel_width/2)*
(m_link_utilized/ sim_cycles)*freq_Hz;