summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2011-01-10 11:11:20 -0800
committerNathan Binkert <nate@binkert.org>2011-01-10 11:11:20 -0800
commitbd18ac82877072a87745aaf7a104e7bb036c6c66 (patch)
tree0fb980aea5b81d79160105fbf505670be0cf5e72 /src/mem/ruby/network
parent8e262adf4fcc009776810b9795f907fcd468591c (diff)
downloadgem5-bd18ac82877072a87745aaf7a104e7bb036c6c66.tar.xz
ruby: get rid of ruby's Debug.hh
Get rid of the Debug class Get rid of ASSERT and use assert Use DPRINTFR for ProtocolTrace
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc6
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc3
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh3
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc9
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc3
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/flit.hh3
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.cc5
-rw-r--r--src/mem/ruby/network/simple/Throttle.cc6
-rw-r--r--src/mem/ruby/network/simple/Topology.cc6
9 files changed, 28 insertions, 16 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
index 69fc416e6..216234bcb 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
@@ -28,6 +28,8 @@
* Authors: Niket Agarwal
*/
+#include <cassert>
+
#include "base/stl_helpers.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
#include "mem/protocol/MachineType.hh"
@@ -223,8 +225,8 @@ void
GarnetNetwork_d::checkNetworkAllocation(NodeID id, bool ordered,
int network_num)
{
- ASSERT(id < m_nodes);
- ASSERT(network_num < m_virtual_networks);
+ assert(id < m_nodes);
+ assert(network_num < m_virtual_networks);
if (ordered) {
m_ordered[network_num] = true;
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 0bcefe337..45270ad7a 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
@@ -28,6 +28,7 @@
* Authors: Niket Agarwal
*/
+#include <cassert>
#include <cmath>
#include "base/stl_helpers.hh"
@@ -105,7 +106,7 @@ void
NetworkInterface_d::addNode(vector<MessageBuffer *>& in,
vector<MessageBuffer *>& out)
{
- ASSERT(in.size() == m_virtual_networks);
+ assert(in.size() == m_virtual_networks);
inNode_ptr = in;
outNode_ptr = out;
for (int j = 0; j < m_virtual_networks; j++) {
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh
index bde8618ee..f928e04f6 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh
@@ -31,6 +31,7 @@
#ifndef __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_FLIT_D_HH__
#define __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_FLIT_D_HH__
+#include <cassert>
#include <iostream>
#include "mem/ruby/network/garnet/NetworkHeader.hh"
@@ -98,7 +99,7 @@ class flit_d
greater(flit_d* n1, flit_d* n2)
{
if (n1->get_time() == n2->get_time()) {
- //ASSERT(n1->flit_id != n2->flit_id);
+ //assert(n1->flit_id != n2->flit_id);
return (n1->get_id() > n2->get_id());
} else {
return (n1->get_time() > n2->get_time());
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
index 631c5ab21..20ddf86e5 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
@@ -28,6 +28,9 @@
* Authors: Niket Agarwal
*/
+#include <cassert>
+
+#include "base/cprintf.hh"
#include "base/stl_helpers.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh"
#include "mem/protocol/MachineType.hh"
@@ -188,9 +191,9 @@ void
GarnetNetwork::checkNetworkAllocation(NodeID id, bool ordered,
int network_num)
{
- printf ("id = %i, m_nodes = %i \n", id, m_nodes);
- ASSERT(id < m_nodes);
- ASSERT(network_num < m_virtual_networks);
+ cprintf ("id = %i, m_nodes = %i \n", id, m_nodes);
+ assert(id < m_nodes);
+ assert(network_num < m_virtual_networks);
if (ordered) {
m_ordered[network_num] = true;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
index 23efaa618..afc841a1b 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
@@ -28,6 +28,7 @@
* Authors: Niket Agarwal
*/
+#include <cassert>
#include <cmath>
#include "base/stl_helpers.hh"
@@ -95,7 +96,7 @@ void
NetworkInterface::addNode(vector<MessageBuffer*>& in,
vector<MessageBuffer*>& out)
{
- ASSERT(in.size() == m_virtual_networks);
+ assert(in.size() == m_virtual_networks);
inNode_ptr = in;
outNode_ptr = out;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/flit.hh b/src/mem/ruby/network/garnet/flexible-pipeline/flit.hh
index e0825f3ab..4c072b270 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/flit.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/flit.hh
@@ -28,6 +28,7 @@
* Authors: Niket Agarwal
*/
+#include <cassert>
#include <iostream>
#include "mem/ruby/network/garnet/NetworkHeader.hh"
@@ -57,7 +58,7 @@ class flit
greater(flit* n1, flit* n2)
{
if (n1->get_time() == n2->get_time())
- //ASSERT(n1->flit_id != n2->flit_id);
+ //assert(n1->flit_id != n2->flit_id);
return (n1->get_id() > n2->get_id());
else
return (n1->get_time() > n2->get_time());
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc
index 956b85f1d..3b215b849 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.cc
+++ b/src/mem/ruby/network/simple/SimpleNetwork.cc
@@ -26,6 +26,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <cassert>
#include <numeric>
#include "base/stl_helpers.hh"
@@ -198,8 +199,8 @@ SimpleNetwork::makeInternalLink(SwitchID src, SwitchID dest,
void
SimpleNetwork::checkNetworkAllocation(NodeID id, bool ordered, int network_num)
{
- ASSERT(id < m_nodes);
- ASSERT(network_num < m_virtual_networks);
+ assert(id < m_nodes);
+ assert(network_num < m_virtual_networks);
if (ordered) {
m_ordered[network_num] = true;
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc
index 096a8f466..55e5b4e78 100644
--- a/src/mem/ruby/network/simple/Throttle.cc
+++ b/src/mem/ruby/network/simple/Throttle.cc
@@ -26,6 +26,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <cassert>
+
#include "base/cprintf.hh"
#include "mem/protocol/Protocol.hh"
#include "mem/ruby/buffers/MessageBuffer.hh"
@@ -45,8 +47,6 @@ const int PRIORITY_SWITCH_LIMIT = 128;
static int network_message_to_size(NetworkMessage* net_msg_ptr);
-extern ostream *debug_cout_ptr;
-
Throttle::Throttle(int sID, NodeID node, int link_latency,
int link_bandwidth_multiplier)
{
@@ -67,7 +67,7 @@ Throttle::init(NodeID node, int link_latency, int link_bandwidth_multiplier)
m_node = node;
m_vnets = 0;
- ASSERT(link_bandwidth_multiplier > 0);
+ assert(link_bandwidth_multiplier > 0);
m_link_bandwidth_multiplier = link_bandwidth_multiplier;
m_link_latency = link_latency;
diff --git a/src/mem/ruby/network/simple/Topology.cc b/src/mem/ruby/network/simple/Topology.cc
index 5e6bf9939..d79491ef2 100644
--- a/src/mem/ruby/network/simple/Topology.cc
+++ b/src/mem/ruby/network/simple/Topology.cc
@@ -26,6 +26,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <cassert>
+
#include "mem/protocol/MachineType.hh"
#include "mem/protocol/Protocol.hh"
#include "mem/protocol/TopologyType.hh"
@@ -224,8 +226,8 @@ void
Topology::addLink(SwitchID src, SwitchID dest, int link_latency,
int bw_multiplier, int link_weight)
{
- ASSERT(src <= m_number_of_switches+m_nodes+m_nodes);
- ASSERT(dest <= m_number_of_switches+m_nodes+m_nodes);
+ assert(src <= m_number_of_switches+m_nodes+m_nodes);
+ assert(dest <= m_number_of_switches+m_nodes+m_nodes);
m_links_src_vector.push_back(src);
m_links_dest_vector.push_back(dest);
m_links_latency_vector.push_back(link_latency);