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; --- 33 unchanged lines hidden (view full) --- 42#include <string> 43#include <vector> 44 45#include "mem/ruby/common/Consumer.hh" 46#include "mem/ruby/network/Network.hh" 47#include "mem/ruby/system/System.hh" 48 49class MessageBuffer; |
50 51class Throttle : public Consumer 52{ 53 public: 54 Throttle(int sID, RubySystem *rs, NodeID node, Cycles link_latency, 55 int link_bandwidth_multiplier, int endpoint_bandwidth, |
56 ClockedObject *em); 57 Throttle(RubySystem *rs, NodeID node, Cycles link_latency, 58 int link_bandwidth_multiplier, int endpoint_bandwidth, 59 ClockedObject *em); |
60 ~Throttle() {} 61 62 std::string name() |
63 { return csprintf("Throttle-%i", m_sID); } |
64 65 void addLinks(const std::vector<MessageBuffer*>& in_vec, 66 const std::vector<MessageBuffer*>& out_vec); 67 void wakeup(); 68 69 // The average utilization (a fraction) since last clearStats() 70 const Stats::Scalar & getUtilization() const 71 { return m_link_utilization; } --- 20 unchanged lines hidden (view full) --- 92 Throttle(const Throttle& obj); 93 Throttle& operator=(const Throttle& obj); 94 95 std::vector<MessageBuffer*> m_in; 96 std::vector<MessageBuffer*> m_out; 97 unsigned int m_vnets; 98 std::vector<int> m_units_remaining; 99 |
100 int m_sID; |
101 NodeID m_node; |
102 int m_link_bandwidth_multiplier; 103 Cycles m_link_latency; 104 int m_wakeups_wo_switch; 105 int m_endpoint_bandwidth; 106 RubySystem *m_ruby_system; 107 108 // Statistical variables 109 Stats::Scalar m_link_utilization; --- 15 unchanged lines hidden --- |