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 "mem/ruby/network/garnet2.0/InputUnit.hh"
38#include "mem/ruby/network/garnet2.0/Router.hh"
39#include "mem/ruby/slicc_interface/Message.hh"
40
41RoutingUnit::RoutingUnit(Router *router)
42{
43 m_router = router;
44 m_routing_table.clear();

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

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