Deleted Added
sdiff udiff text old ( 11664:2365e9e396f7 ) new ( 12065:e3e51756dfef )
full compact
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright

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

37 * well as the links between chip and network switches.
38 */
39
40#ifndef __MEM_RUBY_NETWORK_NETWORK_HH__
41#define __MEM_RUBY_NETWORK_NETWORK_HH__
42
43#include <iostream>
44#include <string>
45#include <vector>
46
47#include "mem/protocol/LinkDirection.hh"
48#include "mem/protocol/MessageSizeType.hh"
49#include "mem/ruby/common/TypeDefines.hh"
50#include "mem/ruby/network/Topology.hh"
51#include "mem/packet.hh"
52#include "params/RubyNetwork.hh"
53#include "sim/clocked_object.hh"
54
55class NetDest;
56class MessageBuffer;
57
58class Network : public ClockedObject
59{

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

97 * the network. Each network needs to implement these for functional
98 * accesses to work correctly.
99 */
100 virtual bool functionalRead(Packet *pkt)
101 { fatal("Functional read not implemented.\n"); }
102 virtual uint32_t functionalWrite(Packet *pkt)
103 { fatal("Functional write not implemented.\n"); }
104
105 protected:
106 // Private copy constructor and assignment operator
107 Network(const Network& obj);
108 Network& operator=(const Network& obj);
109
110 uint32_t m_nodes;
111 static uint32_t m_virtual_networks;
112 std::vector<std::string> m_vnet_type_names;

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

132
133 StatsCallback(Network *_ctr)
134 : ctr(_ctr)
135 {
136 }
137
138 void process() {ctr->collateStats();}
139 };
140};
141
142inline std::ostream&
143operator<<(std::ostream& out, const Network& obj)
144{
145 obj.print(out);
146 out << std::flush;
147 return out;
148}
149
150#endif // __MEM_RUBY_NETWORK_NETWORK_HH__