Switch.cc (9354:7691ec6b173b) Switch.cc (9465:4ae4f3f4b870)
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

62{
63 BasicRouter::init();
64 m_perfect_switch_ptr->init(m_network_ptr);
65}
66
67void
68Switch::addInPort(const vector<MessageBuffer*>& in)
69{
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

62{
63 BasicRouter::init();
64 m_perfect_switch_ptr->init(m_network_ptr);
65}
66
67void
68Switch::addInPort(const vector<MessageBuffer*>& in)
69{
70 m_perfect_switch_ptr->addInPort(in);
70 m_perfect_switch_ptr->addInPort(in, this);
71}
72
73void
74Switch::addOutPort(const vector<MessageBuffer*>& out,
75 const NetDest& routing_table_entry, int link_latency, int bw_multiplier)
76{
77 // Create a throttle
78 Throttle* throttle_ptr = new Throttle(m_id, m_throttles.size(),

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

92 intermediateBuffers.push_back(buffer_ptr);
93 m_buffers_to_free.push_back(buffer_ptr);
94 }
95
96 // Hook the queues to the PerfectSwitch
97 m_perfect_switch_ptr->addOutPort(intermediateBuffers, routing_table_entry);
98
99 // Hook the queues to the Throttle
71}
72
73void
74Switch::addOutPort(const vector<MessageBuffer*>& out,
75 const NetDest& routing_table_entry, int link_latency, int bw_multiplier)
76{
77 // Create a throttle
78 Throttle* throttle_ptr = new Throttle(m_id, m_throttles.size(),

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

92 intermediateBuffers.push_back(buffer_ptr);
93 m_buffers_to_free.push_back(buffer_ptr);
94 }
95
96 // Hook the queues to the PerfectSwitch
97 m_perfect_switch_ptr->addOutPort(intermediateBuffers, routing_table_entry);
98
99 // Hook the queues to the Throttle
100 throttle_ptr->addLinks(intermediateBuffers, out);
100 throttle_ptr->addLinks(intermediateBuffers, out, this);
101}
102
103void
104Switch::clearRoutingTables()
105{
106 m_perfect_switch_ptr->clearRoutingTables();
107}
108

--- 140 unchanged lines hidden ---
101}
102
103void
104Switch::clearRoutingTables()
105{
106 m_perfect_switch_ptr->clearRoutingTables();
107}
108

--- 140 unchanged lines hidden ---