Switch.cc (9117:49116b947194) Switch.cc (9230:33eb3c8a98b9)
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;

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

69 const NetDest& routing_table_entry, int link_latency, int bw_multiplier)
70{
71 Throttle* throttle_ptr = NULL;
72 SimpleNetwork* net_ptr =
73 safe_cast<SimpleNetwork*>(RubySystem::getNetwork());
74
75 // Create a throttle
76 throttle_ptr = new Throttle(m_switch_id, m_throttles.size(), link_latency,
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;

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

69 const NetDest& routing_table_entry, int link_latency, int bw_multiplier)
70{
71 Throttle* throttle_ptr = NULL;
72 SimpleNetwork* net_ptr =
73 safe_cast<SimpleNetwork*>(RubySystem::getNetwork());
74
75 // Create a throttle
76 throttle_ptr = new Throttle(m_switch_id, m_throttles.size(), link_latency,
77 bw_multiplier, net_ptr->getEndpointBandwidth());
77 bw_multiplier, net_ptr->getEndpointBandwidth(),
78 net_ptr);
78 m_throttles.push_back(throttle_ptr);
79
80 // Create one buffer per vnet (these are intermediaryQueues)
81 vector<MessageBuffer*> intermediateBuffers;
82 for (int i = 0; i < out.size(); i++) {
83 MessageBuffer* buffer_ptr = new MessageBuffer;
84 // Make these queues ordered
85 buffer_ptr->setOrdering(true);

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

209}
210
211void
212Switch::print(std::ostream& out) const
213{
214 // FIXME printing
215 out << "[Switch]";
216}
79 m_throttles.push_back(throttle_ptr);
80
81 // Create one buffer per vnet (these are intermediaryQueues)
82 vector<MessageBuffer*> intermediateBuffers;
83 for (int i = 0; i < out.size(); i++) {
84 MessageBuffer* buffer_ptr = new MessageBuffer;
85 // Make these queues ordered
86 buffer_ptr->setOrdering(true);

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

210}
211
212void
213Switch::print(std::ostream& out) const
214{
215 // FIXME printing
216 out << "[Switch]";
217}
217