3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
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
9 * notice, this list of conditions and the following disclaimer;
10 * redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution;
13 * neither the name of the copyright holders nor the names of its
14 * contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 #ifdef SINGLE_LEVEL_CACHE
39 const bool TWO_LEVEL_CACHE = false;
40 #define L1I_CACHE_MEMBER_VARIABLE m_L1Cache_cacheMemory_vec[m_version] // currently all protocols require L1s == nodes
41 #define L1D_CACHE_MEMBER_VARIABLE m_L1Cache_cacheMemory_vec[m_version] // "
42 #define L2_CACHE_MEMBER_VARIABLE m_L1Cache_cacheMemory_vec[m_version] // "
43 #define L2_CACHE_VARIABLE m_L1Cache_cacheMemory_vec
45 const bool TWO_LEVEL_CACHE = true;
47 #define L1I_CACHE_MEMBER_VARIABLE m_L1Cache_L1IcacheMemory_vec[m_version]
48 #define L1D_CACHE_MEMBER_VARIABLE m_L1Cache_L1DcacheMemory_vec[m_version]
49 #define L2_CACHE_MEMBER_VARIABLE m_L2Cache_L2cacheMemory_vec[m_version]
50 #define L2_CACHE_VARIABLE m_L2Cache_L2cacheMemory_vec
52 #define L1I_CACHE_MEMBER_VARIABLE m_L1Cache_L1IcacheMemory_vec[m_version] // currently all protocols require L1s == nodes
53 #define L1D_CACHE_MEMBER_VARIABLE m_L1Cache_L1DcacheMemory_vec[m_version] // "
54 // #define L2_CACHE_MEMBER_VARIABLE m_L1Cache_L2cacheMemory_vec[m_version] // old exclusive caches don't support L2s != nodes
55 #define L2_CACHE_MEMBER_VARIABLE m_L1Cache_cacheMemory_vec[m_version] // old exclusive caches don't support L2s != nodes
56 #define L2_CACHE_VARIABLE m_L1Cache_L2cacheMemory_vec
58 #endif //SINGLE_LEVEL_CACHE
60 #define DIRECTORY_MEMBER_VARIABLE m_Directory_directory_vec[m_version]
61 #define TBE_TABLE_MEMBER_VARIABLE m_L1Cache_TBEs_vec[m_version]
63 typedef unsigned char uint8;
64 typedef unsigned int uint32;
65 typedef unsigned long long uint64;
67 typedef signed char int8;
69 typedef long long int64;
71 typedef long long integer_t;
72 typedef unsigned long long uinteger_t;
75 typedef uint64 physical_address_t;
78 typedef integer_t simtime_t;
80 // external includes for all classes
81 #include "mem/gems_common/std-includes.hh"
82 #include "mem/ruby/common/Debug.hh"
84 // simple type declarations
85 typedef Time LogicalTime;
86 typedef int64 Index; // what the address bit ripper returns
87 typedef int word; // one word of a cache line
92 extern RubyEventQueue* g_eventQueue_ptr;
95 extern RubySystem* g_system_ptr;
98 extern Debug* g_debug_ptr;
100 // FIXME: this is required by the contructor of Directory_Entry.h. It can't go
101 // into slicc_util.h because it opens a can of ugly worms
102 extern inline int max_tokens()