diff options
Diffstat (limited to 'src/mem/ruby/network')
7 files changed, 33 insertions, 47 deletions
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 a33776c17..16792ef2b 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc @@ -205,9 +205,8 @@ NetworkInterface_d::calculateVC(int vnet) void NetworkInterface_d::wakeup() { - DEBUG_EXPR(NETWORK_COMP, MedPrio, m_id); - DEBUG_MSG(NETWORK_COMP, MedPrio, "NI WOKE UP"); - DEBUG_EXPR(NETWORK_COMP, MedPrio, g_eventQueue_ptr->getTime()); + DPRINTF(RubyNetwork, "m_id: %d woke up at time: %lld", + m_id, g_eventQueue_ptr->getTime()); MsgPtr msg_ptr; diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc index de57944f1..50aa16cea 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc @@ -62,8 +62,8 @@ Switch_d::init() void Switch_d::wakeup() { - DEBUG_MSG(NETWORK_COMP, HighPrio, "Switch woke up"); - DEBUG_EXPR(NETWORK_COMP, HighPrio, g_eventQueue_ptr->getTime()); + DPRINTF(RubyNetwork, "Switch woke up at time: %lld\n", + g_eventQueue_ptr->getTime()); for (int inport = 0; inport < m_num_inports; inport++) { if (!m_switch_buffer[inport]->isReady()) diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc index 86f9483c6..23efaa618 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc @@ -258,9 +258,8 @@ NetworkInterface::wakeup() if (inNetLink->isReady()) { flit *t_flit = inNetLink->consumeLink(); if (t_flit->get_type() == TAIL_ || t_flit->get_type() == HEAD_TAIL_) { - DEBUG_EXPR(NETWORK_COMP, HighPrio, m_id); - DEBUG_MSG(NETWORK_COMP, HighPrio, "Message got delivered"); - DEBUG_EXPR(NETWORK_COMP, HighPrio, g_eventQueue_ptr->getTime()); + DPRINTF(RubyNetwork, "m_id: %d, Message delivered at time: %lld\n", + m_id, g_eventQueue_ptr->getTime()); // When we are doing network only testing, the messages do not // have to be buffered into the message buffers of the protocol diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc index ca75edb58..ce90c9748 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc @@ -309,8 +309,8 @@ Router::wakeup() // checking the incoming link if (m_in_link[incoming_port]->isReady()) { - DEBUG_EXPR(NETWORK_COMP, HighPrio, m_id); - DEBUG_EXPR(NETWORK_COMP, HighPrio, g_eventQueue_ptr->getTime()); + DPRINTF(RubyNetwork, "m_id: %d, Time: %lld\n", + m_id, g_eventQueue_ptr->getTime()); t_flit = m_in_link[incoming_port]->peekLink(); routeCompute(t_flit, incoming_port); m_in_link[incoming_port]->consumeLink(); diff --git a/src/mem/ruby/network/simple/PerfectSwitch.cc b/src/mem/ruby/network/simple/PerfectSwitch.cc index 5a1ee32ec..7229c724f 100644 --- a/src/mem/ruby/network/simple/PerfectSwitch.cc +++ b/src/mem/ruby/network/simple/PerfectSwitch.cc @@ -123,7 +123,7 @@ PerfectSwitch::~PerfectSwitch() void PerfectSwitch::wakeup() { - DEBUG_EXPR(NETWORK_COMP, MedPrio, m_switch_id); + DPRINTF(RubyNetwork, "m_switch_id: %d\n",m_switch_id); MsgPtr msg_ptr; @@ -168,12 +168,12 @@ PerfectSwitch::wakeup() // Is there a message waiting? while (m_in[incoming][vnet]->isReady()) { - DEBUG_EXPR(NETWORK_COMP, MedPrio, incoming); + DPRINTF(RubyNetwork, "incoming: %d\n", incoming); // Peek at message msg_ptr = m_in[incoming][vnet]->peekMsgPtr(); net_msg_ptr = safe_cast<NetworkMessage*>(msg_ptr.get()); - DEBUG_EXPR(NETWORK_COMP, MedPrio, *net_msg_ptr); + DPRINTF(RubyNetwork, "Message: %s\n", (*net_msg_ptr)); output_links.clear(); output_link_destinations.clear(); @@ -216,7 +216,7 @@ PerfectSwitch::wakeup() // pick the next link to look at int link = m_link_order[i].m_link; NetDest dst = m_routing_table[link]; - DEBUG_EXPR(NETWORK_COMP, MedPrio, dst); + DPRINTF(RubyNetwork, "dst: %s\n", dst); if (!msg_dsts.intersectionIsNotEmpty(dst)) continue; @@ -246,19 +246,17 @@ PerfectSwitch::wakeup() int outgoing = output_links[i]; if (!m_out[outgoing][vnet]->areNSlotsAvailable(1)) enough = false; - DEBUG_MSG(NETWORK_COMP, HighPrio, - "checking if node is blocked"); - DEBUG_EXPR(NETWORK_COMP, HighPrio, outgoing); - DEBUG_EXPR(NETWORK_COMP, HighPrio, vnet); - DEBUG_EXPR(NETWORK_COMP, HighPrio, enough); + DPRINTF(RubyNetwork, "Checking if node is blocked\n" + "outgoing: %d, vnet: %d, enough: %d\n", + outgoing, vnet, enough); } // There were not enough resources if (!enough) { g_eventQueue_ptr->scheduleEvent(this, 1); - DEBUG_MSG(NETWORK_COMP, HighPrio, - "Can't deliver message since a node is blocked"); - DEBUG_EXPR(NETWORK_COMP, HighPrio, *net_msg_ptr); + DPRINTF(RubyNetwork, "Can't deliver message since a node " + "is blocked\n" + "Message: %s\n", (*net_msg_ptr)); break; // go to next incoming port } @@ -295,13 +293,10 @@ PerfectSwitch::wakeup() output_link_destinations[i]; // Enqeue msg - DEBUG_NEWLINE(NETWORK_COMP,HighPrio); - DEBUG_MSG(NETWORK_COMP, HighPrio, - csprintf("switch: %d enqueuing net msg from " - "inport[%d][%d] to outport [%d][%d] time: %d.", + DPRINTF(RubyNetwork, "Switch: %d enqueuing net msg from " + "inport[%d][%d] to outport [%d][%d] time: %lld.\n", m_switch_id, incoming, vnet, outgoing, vnet, - g_eventQueue_ptr->getTime())); - DEBUG_NEWLINE(NETWORK_COMP,HighPrio); + g_eventQueue_ptr->getTime()); m_out[outgoing][vnet]->enqueue(msg_ptr); } diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc index a77d40dee..096a8f466 100644 --- a/src/mem/ruby/network/simple/Throttle.cc +++ b/src/mem/ruby/network/simple/Throttle.cc @@ -161,12 +161,10 @@ Throttle::wakeup() m_units_remaining[vnet] += network_message_to_size(net_msg_ptr); - DEBUG_NEWLINE(NETWORK_COMP,HighPrio); - DEBUG_MSG(NETWORK_COMP, HighPrio, - csprintf("throttle: %d my bw %d bw spent enqueueing " - "net msg %d time: %d.", + DPRINTF(RubyNetwork, "throttle: %d my bw %d bw spent " + "enqueueing net msg %d time: %lld.\n", m_node, getLinkBandwidth(), m_units_remaining[vnet], - g_eventQueue_ptr->getTime())); + g_eventQueue_ptr->getTime()); // Move the message m_out[vnet]->enqueue(m_in[vnet]->peekMsgPtr(), m_link_latency); @@ -175,8 +173,7 @@ Throttle::wakeup() // Count the message m_message_counters[net_msg_ptr->getMessageSize()][vnet]++; - DEBUG_MSG(NETWORK_COMP,LowPrio,*m_out[vnet]); - DEBUG_NEWLINE(NETWORK_COMP,HighPrio); + DPRINTF(RubyNetwork, "%s\n", *m_out[vnet]); } // Calculate the amount of bandwidth we spent on this message @@ -188,7 +185,7 @@ Throttle::wakeup() if (bw_remaining > 0 && (m_in[vnet]->isReady() || m_units_remaining[vnet] > 0) && !m_out[vnet]->areNSlotsAvailable(1)) { - DEBUG_MSG(NETWORK_COMP,LowPrio,vnet); + DPRINTF(RubyNetwork, "vnet: %d", vnet); // schedule me to wakeup again because I'm waiting for my // output queue to become available schedule_wakeup = true; @@ -209,11 +206,9 @@ Throttle::wakeup() // We have extra bandwidth and our output buffer was // available, so we must not have anything else to do until // another message arrives. - DEBUG_MSG(NETWORK_COMP, LowPrio, *this); - DEBUG_MSG(NETWORK_COMP, LowPrio, "not scheduled again"); + DPRINTF(RubyNetwork, "%s not scheduled again\n", *this); } else { - DEBUG_MSG(NETWORK_COMP, LowPrio, *this); - DEBUG_MSG(NETWORK_COMP, LowPrio, "scheduled again"); + DPRINTF(RubyNetwork, "%s scheduled again\n", *this); // We are out of bandwidth for this cycle, so wakeup next // cycle and continue diff --git a/src/mem/ruby/network/simple/Topology.cc b/src/mem/ruby/network/simple/Topology.cc index bd167bd40..5e6bf9939 100644 --- a/src/mem/ruby/network/simple/Topology.cc +++ b/src/mem/ruby/network/simple/Topology.cc @@ -405,13 +405,11 @@ shortest_path_to_node(SwitchID src, SwitchID next, const Matrix& weights, } } - DEBUG_MSG(NETWORK_COMP, MedPrio, "returning shortest path"); - DEBUG_EXPR(NETWORK_COMP, MedPrio, (src-(2*max_machines))); - DEBUG_EXPR(NETWORK_COMP, MedPrio, (next-(2*max_machines))); - DEBUG_EXPR(NETWORK_COMP, MedPrio, src); - DEBUG_EXPR(NETWORK_COMP, MedPrio, next); - DEBUG_EXPR(NETWORK_COMP, MedPrio, result); - DEBUG_NEWLINE(NETWORK_COMP, MedPrio); + DPRINTF(RubyNetwork, "Returning shortest path\n" + "(src-(2*max_machines)): %d, (next-(2*max_machines)): %d, " + "src: %d, next: %d, result: %s\n", + (src-(2*max_machines)), (next-(2*max_machines)), + src, next, result); return result; } |