PerfectSwitch.cc (9302:c2e70a9bc340) PerfectSwitch.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;

--- 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& in)
71PerfectSwitch::addInPort(const vector<MessageBuffer*>& in, Switch *sw)
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
79 string desc = csprintf("[Queue from port %s %s %s to PerfectSwitch]",
80 to_string(m_switch_id), to_string(port), to_string(j));
81 m_in[port][j]->setDescription(desc);
82 m_in[port][j]->setIncomingLink(port);
83 m_in[port][j]->setVnet(j);
84 }
85}
86

--- 259 unchanged lines hidden ---
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}
88

--- 259 unchanged lines hidden ---