Deleted Added
sdiff udiff text old ( 6154:6bb54dcb940e ) new ( 7002:48a19d52d939 )
full compact
1
2/*
3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

36 * has number of input ports/output ports and has a routing table
37 * as well.
38 *
39 */
40
41#ifndef PerfectSwitch_H
42#define PerfectSwitch_H
43
44#include "mem/ruby/common/Global.hh"
45#include "mem/gems_common/Vector.hh"
46#include "mem/ruby/common/Consumer.hh"
47#include "mem/ruby/system/NodeID.hh"
48
49class MessageBuffer;
50class NetDest;
51class SimpleNetwork;

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

71 int getOutLinks() const { return m_out.size(); }
72
73 // Destructor
74 ~PerfectSwitch();
75
76 // Public Methods
77 void wakeup();
78
79 void printStats(ostream& out) const;
80 void clearStats();
81 void printConfig(ostream& out) const;
82
83 void print(ostream& out) const;
84private:
85
86 // Private copy constructor and assignment operator
87 PerfectSwitch(const PerfectSwitch& obj);
88 PerfectSwitch& operator=(const PerfectSwitch& obj);
89
90 // Data Members (m_ prefix)
91 SwitchID m_switch_id;

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

97 Vector<LinkOrder> m_link_order;
98 int m_virtual_networks;
99 int m_round_robin_start;
100 int m_wakeups_wo_switch;
101 SimpleNetwork* m_network_ptr;
102};
103
104// Output operator declaration
105ostream& operator<<(ostream& out, const PerfectSwitch& obj);
106
107// ******************* Definitions *******************
108
109// Output operator definition
110extern inline
111ostream& operator<<(ostream& out, const PerfectSwitch& obj)
112{
113 obj.print(out);
114 out << flush;
115 return out;
116}
117
118#endif //PerfectSwitch_H