Deleted Added
sdiff udiff text old ( 11667:ebf2acd02fc5 ) new ( 13449:2f7efa89c58b )
full compact
1/*
2 * Copyright (c) 2008 Princeton University
3 * Copyright (c) 2016 Georgia Institute of Technology
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 20 unchanged lines hidden (view full) ---

29 * Authors: Niket Agarwal
30 * Tushar Krishna
31 */
32
33
34#include "mem/ruby/network/garnet2.0/RoutingUnit.hh"
35
36#include "base/cast.hh"
37#include "base/logging.hh"
38#include "mem/ruby/network/garnet2.0/InputUnit.hh"
39#include "mem/ruby/network/garnet2.0/Router.hh"
40#include "mem/ruby/slicc_interface/Message.hh"
41
42RoutingUnit::RoutingUnit(Router *router)
43{
44 m_router = router;
45 m_routing_table.clear();

--- 174 unchanged lines hidden (view full) ---

220 // "Local" or "North" or "West" or "East"
221 assert(inport_dirn != "South");
222 outport_dirn = "South";
223 }
224 } else {
225 // x_hops == 0 and y_hops == 0
226 // this is not possible
227 // already checked that in outportCompute() function
228 panic("x_hops == y_hops == 0");
229 }
230
231 return m_outports_dirn2idx[outport_dirn];
232}
233
234// Template for implementing custom routing algorithm
235// using port directions. (Example adaptive)
236int
237RoutingUnit::outportComputeCustom(RouteInfo route,
238 int inport,
239 PortDirection inport_dirn)
240{
241 panic("%s placeholder executed", __FUNCTION__);
242}