diff options
Diffstat (limited to 'src/mem/ruby/network/simple/Switch.hh')
-rw-r--r-- | src/mem/ruby/network/simple/Switch.hh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mem/ruby/network/simple/Switch.hh b/src/mem/ruby/network/simple/Switch.hh index 0bc1e5eca..9946e5cc1 100644 --- a/src/mem/ruby/network/simple/Switch.hh +++ b/src/mem/ruby/network/simple/Switch.hh @@ -42,18 +42,23 @@ #include <iostream> #include <vector> +#include "mem/ruby/network/BasicRouter.hh" +#include "params/Switch.hh" + class MessageBuffer; class PerfectSwitch; class NetDest; class SimpleNetwork; class Throttle; -class Switch +class Switch : public BasicRouter { public: - Switch(SwitchID sid, SimpleNetwork* network_ptr); + typedef SwitchParams Params; + Switch(const Params *p); ~Switch(); + void init(); void addInPort(const std::vector<MessageBuffer*>& in); void addOutPort(const std::vector<MessageBuffer*>& out, const NetDest& routing_table_entry, int link_latency, @@ -67,6 +72,7 @@ class Switch void printStats(std::ostream& out) const; void clearStats(); void print(std::ostream& out) const; + void init_net_ptr(SimpleNetwork* net_ptr) { m_network_ptr = net_ptr; } private: // Private copy constructor and assignment operator @@ -77,7 +83,6 @@ class Switch SimpleNetwork* m_network_ptr; std::vector<Throttle*> m_throttles; std::vector<MessageBuffer*> m_buffers_to_free; - SwitchID m_switch_id; }; inline std::ostream& |