diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:18 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:18 -0800 |
commit | 42bebab77973114c5d81a37b50faf521b6f0a029 (patch) | |
tree | 40d031d2689ed11500f6027ffb36eaafdd4e35f4 /src/mem/ruby/network/simple/SimpleNetwork.cc | |
parent | a8ea70dac6592b63cf957acd33a938189f1712af (diff) | |
download | gem5-42bebab77973114c5d81a37b50faf521b6f0a029.tar.xz |
ruby: connects sm queues to the network
Diffstat (limited to 'src/mem/ruby/network/simple/SimpleNetwork.cc')
-rw-r--r-- | src/mem/ruby/network/simple/SimpleNetwork.cc | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc index 2f5ed798a..ecd38de1a 100644 --- a/src/mem/ruby/network/simple/SimpleNetwork.cc +++ b/src/mem/ruby/network/simple/SimpleNetwork.cc @@ -62,13 +62,12 @@ Network* Network::createNetwork(int nodes) SimpleNetwork::SimpleNetwork(const Params *p) : Network(p) { -} - -void SimpleNetwork::init() -{ - - Network::init(); - + // + // Note: the parent Network Object constructor is called before the + // SimpleNetwork child constructor. Therefore, the member variables + // used below should already be initialized. + // + m_endpoint_switches.setSize(m_nodes); m_in_use.setSize(m_virtual_networks); @@ -91,10 +90,18 @@ void SimpleNetwork::init() "fromNet node "+int_to_string(node)+" j "+int_to_string(j)); } } +} + +void SimpleNetwork::init() +{ + + Network::init(); - // Setup the network switches - // m_topology_ptr = new Topology(this, m_nodes); - m_topology_ptr->makeTopology(); + // + // The topology pointer should have already been initialized in the parent + // class network constructor. + // + assert(m_topology_ptr != NULL); int number_of_switches = m_topology_ptr->numSwitches(); for (int i=0; i<number_of_switches; i++) { m_switch_ptr_vector.insertAtBottom(new Switch(i, this)); |