diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2015-09-18 13:27:48 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2015-09-18 13:27:48 -0500 |
commit | 89750538648a11a8db9bd0704d000bb26367b87b (patch) | |
tree | 28bb1aee6fc742ee2a7c72de5d8b183ac667f024 /src/mem | |
parent | 96c999fe88a5f600a1a5ddf8c15eadba3051508b (diff) | |
download | gem5-89750538648a11a8db9bd0704d000bb26367b87b.tar.xz |
ruby: garnet: mark some variables as const
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc | 9 | ||||
-rw-r--r-- | src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh | 4 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc index e350eba6b..a02ac83f0 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc @@ -43,13 +43,10 @@ using namespace std; using m5::stl_helpers::deletePointers; NetworkInterface_d::NetworkInterface_d(const Params *p) - : ClockedObject(p), Consumer(this) + : ClockedObject(p), Consumer(this), m_id(p->id), + m_virtual_networks(p->virt_nets), m_vc_per_vnet(p->vcs_per_vnet), + m_num_vcs(m_vc_per_vnet * m_virtual_networks) { - m_id = p->id; - m_virtual_networks = p->virt_nets; - m_vc_per_vnet = p->vcs_per_vnet; - m_num_vcs = m_vc_per_vnet*m_virtual_networks; - m_vc_round_robin = 0; m_ni_buffers.resize(m_num_vcs); m_ni_enqueue_time.resize(m_num_vcs); diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh index 812e8b7fb..d2ddcb820 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh +++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh @@ -70,8 +70,8 @@ class NetworkInterface_d : public ClockedObject, public Consumer private: GarnetNetwork_d *m_net_ptr; - int m_virtual_networks, m_num_vcs, m_vc_per_vnet; - NodeID m_id; + const NodeID m_id; + const int m_virtual_networks, m_vc_per_vnet, m_num_vcs; std::vector<OutVcState_d *> m_out_vc_state; std::vector<int> m_vc_allocator; int m_vc_round_robin; // For round robin scheduling |