summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh
diff options
context:
space:
mode:
authorTushar Krishna <tushar@csail.mit.edu>2011-02-06 22:14:16 -0800
committerTushar Krishna <tushar@csail.mit.edu>2011-02-06 22:14:16 -0800
commit59163f824c71e4290399be7c1c4b6e70b799a388 (patch)
tree77942dd87d46e09326f1239cc4147f9218829d9f /src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh
parentafd754dc0d644f989e8aa00884203ce0e4143d47 (diff)
downloadgem5-59163f824c71e4290399be7c1c4b6e70b799a388.tar.xz
garnet: separate data and ctrl VCs
Separate data VCs and ctrl VCs in garnet, as ctrl VCs have 1 buffer per VC, while data VCs have > 1 buffers per VC. This is for correct power estimations.
Diffstat (limited to 'src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh')
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh
index f3fb4384a..39b2cb5fe 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh
@@ -42,6 +42,16 @@ class OutVcState_d
int get_inport() { return m_in_port; }
int get_invc() { return m_in_vc; }
int get_credit_count() { return m_credit_count; }
+ void
+ set_credit_count()
+ {
+ // only need to initialize credit count for data VCs
+ // constructor sets this to BuffersPerCtrlVC by default
+
+ if (m_network_ptr->get_vnet_type(m_id) == DATA_VNET_)
+ m_credit_count = m_network_ptr->getBuffersPerDataVC();
+ }
+
void set_inport(int port) { m_in_port = port; }
void set_invc(int vc) { m_in_vc = vc; }
inline bool