From 25cd13dbf1d6f7d306b40c7e2e3d7231b0c5eb04 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Sat, 12 Sep 2015 16:16:03 -0500 Subject: ruby: simple network: store Switch* in PerfectSwitch and Throttle There are two reasons for doing so: a. provide a source of clock to PerfectSwitch. A follow on patch removes sender and receiver pointers from MessageBuffer means that the object owning the buffer should have some way of providing timing info. b. schedule events. A follow on patch removes the consumer class. So the PerfectSwitch needs some EventManager object to schedule events on its own. --- src/mem/ruby/network/simple/Throttle.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mem/ruby/network/simple/Throttle.hh') diff --git a/src/mem/ruby/network/simple/Throttle.hh b/src/mem/ruby/network/simple/Throttle.hh index 85bf9691a..405593bb1 100644 --- a/src/mem/ruby/network/simple/Throttle.hh +++ b/src/mem/ruby/network/simple/Throttle.hh @@ -47,20 +47,18 @@ #include "mem/ruby/system/System.hh" class MessageBuffer; +class Switch; class Throttle : public Consumer { public: Throttle(int sID, RubySystem *rs, NodeID node, Cycles link_latency, int link_bandwidth_multiplier, int endpoint_bandwidth, - ClockedObject *em); - Throttle(RubySystem *rs, NodeID node, Cycles link_latency, - int link_bandwidth_multiplier, int endpoint_bandwidth, - ClockedObject *em); + Switch *em); ~Throttle() {} std::string name() - { return csprintf("Throttle-%i", m_sID); } + { return csprintf("Throttle-%i", m_switch_id); } void addLinks(const std::vector& in_vec, const std::vector& out_vec); @@ -97,8 +95,10 @@ class Throttle : public Consumer unsigned int m_vnets; std::vector m_units_remaining; - int m_sID; + const int m_switch_id; + Switch *m_switch; NodeID m_node; + int m_link_bandwidth_multiplier; Cycles m_link_latency; int m_wakeups_wo_switch; -- cgit v1.2.3