PerfectSwitch.cc (9499:b03b556a8fbb) PerfectSwitch.cc (9508:dde110931867)
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;

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

63
64 for(int i = 0;i < m_virtual_networks;++i)
65 {
66 m_pending_message_count.push_back(0);
67 }
68}
69
70void
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;

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

63
64 for(int i = 0;i < m_virtual_networks;++i)
65 {
66 m_pending_message_count.push_back(0);
67 }
68}
69
70void
71PerfectSwitch::addInPort(const vector<MessageBuffer*>& in, Switch *sw)
71PerfectSwitch::addInPort(const vector& in)
72{
73 assert(in.size() == m_virtual_networks);
74 NodeID port = m_in.size();
75 m_in.push_back(in);
76
77 for (int j = 0; j < m_virtual_networks; j++) {
78 m_in[port][j]->setConsumer(this);
72{
73 assert(in.size() == m_virtual_networks);
74 NodeID port = m_in.size();
75 m_in.push_back(in);
76
77 for (int j = 0; j < m_virtual_networks; j++) {
78 m_in[port][j]->setConsumer(this);
79 m_in[port][j]->setClockObj(sw);
80
81 string desc = csprintf("[Queue from port %s %s %s to PerfectSwitch]",
82 to_string(m_switch_id), to_string(port), to_string(j));
83 m_in[port][j]->setDescription(desc);
84 m_in[port][j]->setIncomingLink(port);
85 m_in[port][j]->setVnet(j);
86 }
87}

--- 260 unchanged lines hidden ---
79
80 string desc = csprintf("[Queue from port %s %s %s to PerfectSwitch]",
81 to_string(m_switch_id), to_string(port), to_string(j));
82 m_in[port][j]->setDescription(desc);
83 m_in[port][j]->setIncomingLink(port);
84 m_in[port][j]->setVnet(j);
85 }
86}

--- 260 unchanged lines hidden ---