Deleted Added
sdiff udiff text old ( 6879:c07cf29b5a33 ) new ( 6881:5a61a8a9009a )
full compact
1
2/*
3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 48 unchanged lines hidden (view full) ---

57{
58 return new SimpleNetwork(nodes);
59}
60*/
61
62SimpleNetwork::SimpleNetwork(const Params *p)
63 : Network(p)
64{
65}
66
67void SimpleNetwork::init()
68{
69
70 Network::init();
71
72 m_endpoint_switches.setSize(m_nodes);
73
74 m_in_use.setSize(m_virtual_networks);
75 m_ordered.setSize(m_virtual_networks);
76 for (int i = 0; i < m_virtual_networks; i++) {
77 m_in_use[i] = false;
78 m_ordered[i] = false;
79 }

--- 6 unchanged lines hidden (view full) ---

86 m_fromNetQueues[node].setSize(m_virtual_networks);
87 for (int j = 0; j < m_virtual_networks; j++) {
88 m_toNetQueues[node][j] = new MessageBuffer(
89 "toNet node "+int_to_string(node)+" j "+int_to_string(j));
90 m_fromNetQueues[node][j] = new MessageBuffer(
91 "fromNet node "+int_to_string(node)+" j "+int_to_string(j));
92 }
93 }
94
95 // Setup the network switches
96 // m_topology_ptr = new Topology(this, m_nodes);
97 m_topology_ptr->makeTopology();
98 int number_of_switches = m_topology_ptr->numSwitches();
99 for (int i=0; i<number_of_switches; i++) {
100 m_switch_ptr_vector.insertAtBottom(new Switch(i, this));
101 }
102 m_topology_ptr->createLinks(this, false); // false because this isn't a reconfiguration
103}
104
105void SimpleNetwork::reset()

--- 165 unchanged lines hidden ---