PerfectSwitch.hh (10312:08f4deeb5b48) | PerfectSwitch.hh (10370:4466307b8a2a) |
---|---|
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; --- 51 unchanged lines hidden (view full) --- 60 public: 61 PerfectSwitch(SwitchID sid, Switch *, uint32_t); 62 ~PerfectSwitch(); 63 64 std::string name() 65 { return csprintf("PerfectSwitch-%i", m_switch_id); } 66 67 void init(SimpleNetwork *); | 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; --- 51 unchanged lines hidden (view full) --- 60 public: 61 PerfectSwitch(SwitchID sid, Switch *, uint32_t); 62 ~PerfectSwitch(); 63 64 std::string name() 65 { return csprintf("PerfectSwitch-%i", m_switch_id); } 66 67 void init(SimpleNetwork *); |
68 void addInPort(const std::map<int, MessageBuffer*>& in); 69 void addOutPort(const std::map<int, MessageBuffer*>& out, | 68 void addInPort(const std::vector<MessageBuffer*>& in); 69 void addOutPort(const std::vector<MessageBuffer*>& out, |
70 const NetDest& routing_table_entry); 71 72 int getInLinks() const { return m_in.size(); } 73 int getOutLinks() const { return m_out.size(); } 74 75 void wakeup(); 76 void storeEventInfo(int info); 77 --- 6 unchanged lines hidden (view full) --- 84 PerfectSwitch(const PerfectSwitch& obj); 85 PerfectSwitch& operator=(const PerfectSwitch& obj); 86 87 void operateVnet(int vnet); 88 89 SwitchID m_switch_id; 90 91 // vector of queues from the components | 70 const NetDest& routing_table_entry); 71 72 int getInLinks() const { return m_in.size(); } 73 int getOutLinks() const { return m_out.size(); } 74 75 void wakeup(); 76 void storeEventInfo(int info); 77 --- 6 unchanged lines hidden (view full) --- 84 PerfectSwitch(const PerfectSwitch& obj); 85 PerfectSwitch& operator=(const PerfectSwitch& obj); 86 87 void operateVnet(int vnet); 88 89 SwitchID m_switch_id; 90 91 // vector of queues from the components |
92 std::vector<std::map<int, MessageBuffer*> > m_in; 93 std::vector<std::map<int, MessageBuffer*> > m_out; | 92 std::vector<std::vector<MessageBuffer*> > m_in; 93 std::vector<std::vector<MessageBuffer*> > m_out; |
94 95 std::vector<NetDest> m_routing_table; 96 std::vector<LinkOrder> m_link_order; 97 98 uint32_t m_virtual_networks; 99 int m_round_robin_start; 100 int m_wakeups_wo_switch; 101 --- 13 unchanged lines hidden --- | 94 95 std::vector<NetDest> m_routing_table; 96 std::vector<LinkOrder> m_link_order; 97 98 uint32_t m_virtual_networks; 99 int m_round_robin_start; 100 int m_wakeups_wo_switch; 101 --- 13 unchanged lines hidden --- |