Switch.cc (9465:4ae4f3f4b870) Switch.cc (9499:b03b556a8fbb)
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;

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

67void
68Switch::addInPort(const vector<MessageBuffer*>& in)
69{
70 m_perfect_switch_ptr->addInPort(in, this);
71}
72
73void
74Switch::addOutPort(const vector<MessageBuffer*>& out,
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;

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

67void
68Switch::addInPort(const vector<MessageBuffer*>& in)
69{
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)
75 const NetDest& routing_table_entry, Cycles link_latency, int bw_multiplier)
76{
77 // Create a throttle
78 Throttle* throttle_ptr = new Throttle(m_id, m_throttles.size(),
76{
77 // Create a throttle
78 Throttle* throttle_ptr = new Throttle(m_id, m_throttles.size(),
79 link_latency, bw_multiplier, m_network_ptr->getEndpointBandwidth(),
80 this);
79 link_latency, bw_multiplier, m_network_ptr->getEndpointBandwidth(),
80 this);
81 m_throttles.push_back(throttle_ptr);
82
83 // Create one buffer per vnet (these are intermediaryQueues)
84 vector<MessageBuffer*> intermediateBuffers;
85 for (int i = 0; i < out.size(); i++) {
86 MessageBuffer* buffer_ptr = new MessageBuffer;
87 // Make these queues ordered
88 buffer_ptr->setOrdering(true);

--- 160 unchanged lines hidden ---
81 m_throttles.push_back(throttle_ptr);
82
83 // Create one buffer per vnet (these are intermediaryQueues)
84 vector<MessageBuffer*> intermediateBuffers;
85 for (int i = 0; i < out.size(); i++) {
86 MessageBuffer* buffer_ptr = new MessageBuffer;
87 // Make these queues ordered
88 buffer_ptr->setOrdering(true);

--- 160 unchanged lines hidden ---