diff options
author | Tushar Krishna <tushar@csail.mit.edu> | 2012-03-19 17:34:17 -0400 |
---|---|---|
committer | Tushar Krishna <tushar@csail.mit.edu> | 2012-03-19 17:34:17 -0400 |
commit | c9e4bca8d8deea063a09bf852b0d37dc129bc227 (patch) | |
tree | 4791501d08b85f82055676d36a24c063773a36bd /src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh | |
parent | 72538294fb1eb2e4dcd5d818c78bcdf78b0de491 (diff) | |
download | gem5-c9e4bca8d8deea063a09bf852b0d37dc129bc227.tar.xz |
Garnet: Stats at vnet granularity + code cleanup
This patch
(1) Moves redundant code from fixed and flexible networks to BaseGarnetNetwork.
(2) Prints network stats at vnet granularity.
Diffstat (limited to 'src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh')
-rw-r--r-- | src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh index 5c7959131..fe29ef960 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh @@ -59,40 +59,15 @@ class GarnetNetwork : public BaseGarnetNetwork int getBufferSize() { return m_buffer_size; } int getNumPipeStages() {return m_number_of_pipe_stages; } - // returns the queue requested for the given component - MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num, - std::string vnet_type); - MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num, - std::string vnet_type); - - void clearStats(); - void printStats(std::ostream& out) const; - void printConfig(std::ostream& out) const; - void print(std::ostream& out) const; - - inline void increment_injected_flits() { m_flits_injected++; } - inline void increment_received_flits() { m_flits_received++; } - - inline void - increment_network_latency(Time latency) - { - m_network_latency += latency; - } - - inline void - increment_queueing_latency(Time latency) - { - m_queueing_latency += latency; - } - - bool isVNetOrdered(int vnet) { return m_ordered[vnet]; } - bool validVirtualNetwork(int vnet) { return m_in_use[vnet]; } - - Time getRubyStartTime(); int getNumNodes(){ return m_nodes; } void reset(); + void printLinkStats(std::ostream& out) const; + void printPowerStats(std::ostream& out) const; + void printConfig(std::ostream& out) const; + void print(std::ostream& out) const; + // Methods used by Topology to setup the network void makeOutLink(SwitchID src, NodeID dest, BasicLink* link, LinkDirection direction, @@ -108,7 +83,8 @@ class GarnetNetwork : public BaseGarnetNetwork bool isReconfiguration); private: - void checkNetworkAllocation(NodeID id, bool ordered, int network_num); + void checkNetworkAllocation(NodeID id, bool ordered, int network_num, + std::string vnet_type); GarnetNetwork(const GarnetNetwork& obj); GarnetNetwork& operator=(const GarnetNetwork& obj); |