system.hh (3125:febd811bccc6) | system.hh (3202:c095cfd0da96) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 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; --- 48 unchanged lines hidden (view full) --- 57class Platform; 58class GDBListener; 59class RemoteGDB; 60#endif 61 62class System : public SimObject 63{ 64 public: | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 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; --- 48 unchanged lines hidden (view full) --- 57class Platform; 58class GDBListener; 59class RemoteGDB; 60#endif 61 62class System : public SimObject 63{ 64 public: |
65 enum MemoryMode { 66 Invalid=0, 67 Atomic, 68 Timing 69 }; | |
70 71 static const char *MemoryModeStrings[3]; 72 | 65 66 static const char *MemoryModeStrings[3]; 67 |
68 SimObject::MemoryMode getMemoryMode() { assert(memoryMode); return memoryMode; } |
|
73 | 69 |
74 MemoryMode getMemoryMode() { assert(memoryMode); return memoryMode; } 75 | |
76 /** Change the memory mode of the system. This should only be called by the 77 * python!! 78 * @param mode Mode to change to (atomic/timing) 79 */ | 70 /** Change the memory mode of the system. This should only be called by the 71 * python!! 72 * @param mode Mode to change to (atomic/timing) 73 */ |
80 void setMemoryMode(MemoryMode mode); | 74 void setMemoryMode(SimObject::MemoryMode mode); |
81 82 PhysicalMemory *physmem; 83 PCEventQueue pcEventQueue; 84 85 std::vector<ThreadContext *> threadContexts; 86 int numcpus; 87 88 int getNumCPUs() --- 32 unchanged lines hidden (view full) --- 121 122 int page_ptr; 123 124 125#endif // FULL_SYSTEM 126 127 protected: 128 | 75 76 PhysicalMemory *physmem; 77 PCEventQueue pcEventQueue; 78 79 std::vector<ThreadContext *> threadContexts; 80 int numcpus; 81 82 int getNumCPUs() --- 32 unchanged lines hidden (view full) --- 115 116 int page_ptr; 117 118 119#endif // FULL_SYSTEM 120 121 protected: 122 |
129 MemoryMode memoryMode; | 123 SimObject::MemoryMode memoryMode; |
130 131#if FULL_SYSTEM 132 /** 133 * Fix up an address used to match PCs for hooking simulator 134 * events on to target function executions. See comment in 135 * system.cc for details. 136 */ 137 virtual Addr fixFuncEventAddr(Addr addr) = 0; --- 30 unchanged lines hidden (view full) --- 168 virtual bool breakpoint() = 0; 169#endif // FULL_SYSTEM 170 171 public: 172 struct Params 173 { 174 std::string name; 175 PhysicalMemory *physmem; | 124 125#if FULL_SYSTEM 126 /** 127 * Fix up an address used to match PCs for hooking simulator 128 * events on to target function executions. See comment in 129 * system.cc for details. 130 */ 131 virtual Addr fixFuncEventAddr(Addr addr) = 0; --- 30 unchanged lines hidden (view full) --- 162 virtual bool breakpoint() = 0; 163#endif // FULL_SYSTEM 164 165 public: 166 struct Params 167 { 168 std::string name; 169 PhysicalMemory *physmem; |
176 MemoryMode mem_mode; | 170 SimObject::MemoryMode mem_mode; |
177 178#if FULL_SYSTEM 179 Tick boot_cpu_frequency; 180 std::string boot_osflags; 181 uint64_t init_param; 182 183 std::string kernel_path; 184 std::string readfile; --- 64 unchanged lines hidden --- | 171 172#if FULL_SYSTEM 173 Tick boot_cpu_frequency; 174 std::string boot_osflags; 175 uint64_t init_param; 176 177 std::string kernel_path; 178 std::string readfile; --- 64 unchanged lines hidden --- |