summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-05-17 14:34:52 -0700
committerNathan Binkert <nate@binkert.org>2009-05-17 14:34:52 -0700
commit8d2e51c7f52670055ffe97e221302561b87015a2 (patch)
tree792d211d603bd9155dee00861d1ce92d3ba2f09d /src/mem
parent709d859530325f28b904001f5a55dbdec2bad199 (diff)
downloadgem5-8d2e51c7f52670055ffe97e221302561b87015a2.tar.xz
includes: sort includes again
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/bus.hh4
-rw-r--r--src/mem/cache/cache_impl.hh9
-rw-r--r--src/mem/cache/mshr.cc10
-rw-r--r--src/mem/cache/tags/fa_lru.cc5
-rw-r--r--src/mem/cache/tags/fa_lru.hh10
-rw-r--r--src/mem/cache/tags/iic_repl/gen.cc2
-rw-r--r--src/mem/cache/tags/iic_repl/repl.hh3
-rw-r--r--src/mem/cache/tags/lru.hh12
-rw-r--r--src/mem/gems_common/util.cc3
-rw-r--r--src/mem/packet.hh3
-rw-r--r--src/mem/page_table.hh10
-rw-r--r--src/mem/physical.cc2
-rw-r--r--src/mem/ruby/common/Debug.hh7
-rw-r--r--src/mem/ruby/common/Global.hh6
-rw-r--r--src/mem/ruby/network/orion/power_ll.cc4
-rw-r--r--src/mem/ruby/network/orion/power_utils.cc7
-rw-r--r--src/mem/rubymem.cc20
-rw-r--r--src/mem/slicc/slicc_global.hh4
18 files changed, 56 insertions, 65 deletions
diff --git a/src/mem/bus.hh b/src/mem/bus.hh
index a55e37e59..4de42b538 100644
--- a/src/mem/bus.hh
+++ b/src/mem/bus.hh
@@ -41,16 +41,16 @@
#include <set>
#include <list>
-#include "base/range.hh"
#include "base/hashmap.hh"
+#include "base/range.hh"
#include "base/range_map.hh"
#include "base/types.hh"
#include "mem/mem_object.hh"
#include "mem/packet.hh"
#include "mem/port.hh"
#include "mem/request.hh"
-#include "sim/eventq.hh"
#include "params/Bus.hh"
+#include "sim/eventq.hh"
class Bus : public MemObject
{
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index cf738a340..0940893bc 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -37,18 +37,15 @@
* Cache definitions.
*/
-#include "base/types.hh"
#include "base/fast_alloc.hh"
#include "base/misc.hh"
#include "base/range.hh"
-
-#include "mem/cache/cache.hh"
+#include "base/types.hh"
#include "mem/cache/blk.hh"
+#include "mem/cache/cache.hh"
#include "mem/cache/mshr.hh"
#include "mem/cache/prefetch/base.hh"
-
-#include "sim/sim_exit.hh" // for SimExitEvent
-
+#include "sim/sim_exit.hh"
template<class TagStore>
Cache<TagStore>::Cache(const Params *p, TagStore *tags, BasePrefetcher *pf)
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index ee267feb8..726253c62 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -34,16 +34,16 @@
* Miss Status and Handling Register (MSHR) definitions.
*/
-#include <assert.h>
+#include <algorithm>
+#include <cassert>
#include <string>
#include <vector>
-#include <algorithm>
-#include "mem/cache/mshr.hh"
-#include "sim/core.hh" // for curTick
-#include "base/types.hh"
#include "base/misc.hh"
+#include "base/types.hh"
#include "mem/cache/cache.hh"
+#include "mem/cache/mshr.hh"
+#include "sim/core.hh"
using namespace std;
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index f92d4cb37..0e0121f67 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -33,13 +33,12 @@
* Definitions a fully associative LRU tagstore.
*/
+#include <cassert>
#include <sstream>
-#include <assert.h>
-
-#include "mem/cache/tags/fa_lru.hh"
#include "base/intmath.hh"
#include "base/misc.hh"
+#include "mem/cache/tags/fa_lru.hh"
using namespace std;
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 4eab10c49..23d09d709 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -33,15 +33,15 @@
* Declaration of a fully associative LRU tag store.
*/
-#ifndef __FA_LRU_HH__
-#define __FA_LRU_HH__
+#ifndef __MEM_CACHE_TAGS_FA_LRU_HH__
+#define __MEM_CACHE_TAGS_FA_LRU_HH__
#include <list>
-#include "mem/cache/blk.hh"
-#include "mem/packet.hh"
#include "base/hashmap.hh"
+#include "mem/cache/blk.hh"
#include "mem/cache/tags/base.hh"
+#include "mem/packet.hh"
/**
* A fully associative cache block.
@@ -281,4 +281,4 @@ public:
}
};
-#endif
+#endif // __MEM_CACHE_TAGS_FA_LRU_HH__
diff --git a/src/mem/cache/tags/iic_repl/gen.cc b/src/mem/cache/tags/iic_repl/gen.cc
index 1c19420da..1008c3a7c 100644
--- a/src/mem/cache/tags/iic_repl/gen.cc
+++ b/src/mem/cache/tags/iic_repl/gen.cc
@@ -37,10 +37,10 @@
#include <string>
#include "base/misc.hh"
+#include "base/types.hh"
#include "mem/cache/tags/iic.hh"
#include "mem/cache/tags/iic_repl/gen.hh"
#include "params/GenRepl.hh"
-#include "base/types.hh"
using namespace std;
diff --git a/src/mem/cache/tags/iic_repl/repl.hh b/src/mem/cache/tags/iic_repl/repl.hh
index 91a4cc309..c792e3350 100644
--- a/src/mem/cache/tags/iic_repl/repl.hh
+++ b/src/mem/cache/tags/iic_repl/repl.hh
@@ -41,11 +41,10 @@
#include <string>
#include <list>
-#include "cpu/smt.hh"
#include "base/types.hh"
+#include "cpu/smt.hh"
#include "sim/sim_object.hh"
-
class IIC;
/**
diff --git a/src/mem/cache/tags/lru.hh b/src/mem/cache/tags/lru.hh
index 7b6e95e84..466095ec9 100644
--- a/src/mem/cache/tags/lru.hh
+++ b/src/mem/cache/tags/lru.hh
@@ -33,16 +33,16 @@
* Declaration of a LRU tag store.
*/
-#ifndef __LRU_HH__
-#define __LRU_HH__
+#ifndef __MEM_CACHE_TAGS_LRU_HH__
+#define __MEM_CACHE_TAGS_LRU_HH__
+#include <cassert>
#include <cstring>
#include <list>
-#include "mem/cache/blk.hh" // base class
-#include "mem/packet.hh" // for inlined functions
-#include <assert.h>
+#include "mem/cache/blk.hh"
#include "mem/cache/tags/base.hh"
+#include "mem/packet.hh"
class BaseCache;
@@ -261,4 +261,4 @@ public:
virtual void cleanupRefs();
};
-#endif
+#endif // __MEM_CACHE_TAGS_LRU_HH__
diff --git a/src/mem/gems_common/util.cc b/src/mem/gems_common/util.cc
index d7b0e7853..a64da15a6 100644
--- a/src/mem/gems_common/util.cc
+++ b/src/mem/gems_common/util.cc
@@ -30,7 +30,8 @@
* $Id$
*/
-#include "assert.h"
+#include <cassert>
+
#include "mem/gems_common/util.hh"
// Split a string into a head and tail strings on the specified
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 14c6c40a4..6e804b726 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -48,11 +48,10 @@
#include "base/flags.hh"
#include "base/misc.hh"
#include "base/printable.hh"
-#include "mem/request.hh"
#include "base/types.hh"
+#include "mem/request.hh"
#include "sim/core.hh"
-
struct Packet;
typedef Packet *PacketPtr;
typedef uint8_t* PacketDataPtr;
diff --git a/src/mem/page_table.hh b/src/mem/page_table.hh
index 461b07a69..3ce720ad4 100644
--- a/src/mem/page_table.hh
+++ b/src/mem/page_table.hh
@@ -33,17 +33,17 @@
* Declaration of a non-full system Page Table.
*/
-#ifndef __PAGE_TABLE__
-#define __PAGE_TABLE__
+#ifndef __MEM_PAGE_TABLE_HH__
+#define __MEM_PAGE_TABLE_HH__
#include <string>
-#include "sim/faults.hh"
#include "arch/isa_traits.hh"
#include "arch/tlb.hh"
#include "base/hashmap.hh"
-#include "mem/request.hh"
#include "base/types.hh"
+#include "mem/request.hh"
+#include "sim/faults.hh"
#include "sim/serialize.hh"
class Process;
@@ -133,4 +133,4 @@ class PageTable
void unserialize(Checkpoint *cp, const std::string &section);
};
-#endif
+#endif // __MEM_PAGE_TABLE_HH__
diff --git a/src/mem/physical.cc b/src/mem/physical.cc
index 56849b12d..a49c12a5c 100644
--- a/src/mem/physical.cc
+++ b/src/mem/physical.cc
@@ -42,11 +42,11 @@
#include "arch/isa_traits.hh"
#include "base/misc.hh"
#include "base/random.hh"
+#include "base/types.hh"
#include "config/full_system.hh"
#include "mem/packet_access.hh"
#include "mem/physical.hh"
#include "sim/eventq.hh"
-#include "base/types.hh"
using namespace std;
using namespace TheISA;
diff --git a/src/mem/ruby/common/Debug.hh b/src/mem/ruby/common/Debug.hh
index 8548e9772..ad88431ef 100644
--- a/src/mem/ruby/common/Debug.hh
+++ b/src/mem/ruby/common/Debug.hh
@@ -31,13 +31,14 @@
* $Id$
*/
-#ifndef DEBUG_H
-#define DEBUG_H
+#ifndef __MEM_RUBY_DEBUG_HH__
+#define __MEM_RUBY_DEBUG_HH__
#include <unistd.h>
#include <iostream>
#include "config/ruby_debug.hh"
+#include "mem/ruby/common/Global.hh"
extern std::ostream * debug_cout_ptr;
@@ -302,5 +303,5 @@ const bool ASSERT_FLAG = true;
}\
}
-#endif //DEBUG_H
+#endif // __MEM_RUBY_DEBUG_HH__
diff --git a/src/mem/ruby/common/Global.hh b/src/mem/ruby/common/Global.hh
index de2d06e0e..2f42aabcb 100644
--- a/src/mem/ruby/common/Global.hh
+++ b/src/mem/ruby/common/Global.hh
@@ -32,8 +32,8 @@
*
* */
-#ifndef GLOBAL_H
-#define GLOBAL_H
+#ifndef __MEM_RUBY_GLOBAL_HH__
+#define __MEM_RUBY_GLOBAL_HH__
#ifdef SINGLE_LEVEL_CACHE
const bool TWO_LEVEL_CACHE = false;
@@ -105,5 +105,5 @@ extern inline int max_tokens()
}
-#endif //GLOBAL_H
+#endif // __MEM_RUBY_GLOBAL_HH__
diff --git a/src/mem/ruby/network/orion/power_ll.cc b/src/mem/ruby/network/orion/power_ll.cc
index aab98cc8c..864336034 100644
--- a/src/mem/ruby/network/orion/power_ll.cc
+++ b/src/mem/ruby/network/orion/power_ll.cc
@@ -67,8 +67,8 @@
* SOFTWARE.
*------------------------------------------------------------*/
-#include <math.h>
-#include <assert.h>
+#include <cassert>
+#include <cmath>
#include "mem/ruby/network/orion/parm_technology.hh"
#include "mem/ruby/network/orion/SIM_port.hh"
diff --git a/src/mem/ruby/network/orion/power_utils.cc b/src/mem/ruby/network/orion/power_utils.cc
index be308be88..bc69c3cc7 100644
--- a/src/mem/ruby/network/orion/power_utils.cc
+++ b/src/mem/ruby/network/orion/power_utils.cc
@@ -26,11 +26,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <stdio.h>
+#include <cassert>
+#include <cmath>
+#include <cstdio>
+
#include "mem/ruby/network/orion/parm_technology.hh"
#include "mem/ruby/network/orion/power_utils.hh"
-#include <assert.h>
-#include <math.h>
/* ----------- from SIM_power_util.c ------------ */
diff --git a/src/mem/rubymem.cc b/src/mem/rubymem.cc
index 911d533a0..3f121f7af 100644
--- a/src/mem/rubymem.cc
+++ b/src/mem/rubymem.cc
@@ -28,24 +28,20 @@
* Authors: Daniel Sanchez
*/
+#include <iostream>
+#include <fstream>
#include "arch/isa_traits.hh"
-#include "mem/rubymem.hh"
-#include "sim/eventq.hh"
-#include "base/types.hh"
#include "base/output.hh"
-
-// Ruby includes
-#include "mem/ruby/system/System.hh"
-#include "mem/ruby/system/Sequencer.hh"
-#include "mem/ruby/init.hh"
+#include "base/types.hh"
#include "mem/ruby/common/Debug.hh"
-
+#include "mem/ruby/init.hh"
+#include "mem/ruby/system/Sequencer.hh"
+#include "mem/ruby/system/System.hh"
+#include "mem/rubymem.hh"
+#include "sim/eventq.hh"
#include "sim/sim_exit.hh"
-#include <iostream>
-#include <fstream>
-
using namespace std;
using namespace TheISA;
diff --git a/src/mem/slicc/slicc_global.hh b/src/mem/slicc/slicc_global.hh
index 3e4f37a57..40a00c9d2 100644
--- a/src/mem/slicc/slicc_global.hh
+++ b/src/mem/slicc/slicc_global.hh
@@ -30,9 +30,7 @@
#ifndef SLICC_GLOBAL_H
#define SLICC_GLOBAL_H
-#include <assert.h> /* slicc needs to include this in order to use classes in
- * ../common directory.
- */
+#include <cassert>
#include "mem/gems_common/std-includes.hh"
#include "mem/gems_common/Map.hh"