gem5  v20.1.0.0
system.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, 2014, 2018 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2002-2005 The Regents of The University of Michigan
15  * Copyright (c) 2011 Regents of the University of California
16  * All rights reserved.
17  *
18  * Redistribution and use in source and binary forms, with or without
19  * modification, are permitted provided that the following conditions are
20  * met: redistributions of source code must retain the above copyright
21  * notice, this list of conditions and the following disclaimer;
22  * redistributions in binary form must reproduce the above copyright
23  * notice, this list of conditions and the following disclaimer in the
24  * documentation and/or other materials provided with the distribution;
25  * neither the name of the copyright holders nor the names of its
26  * contributors may be used to endorse or promote products derived from
27  * this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  */
41 
42 #ifndef __SYSTEM_HH__
43 #define __SYSTEM_HH__
44 
45 #include <string>
46 #include <unordered_map>
47 #include <utility>
48 #include <vector>
49 
50 #include "arch/isa_traits.hh"
52 #include "base/loader/symtab.hh"
53 #include "base/statistics.hh"
54 #include "config/the_isa.hh"
55 #include "cpu/base.hh"
56 #include "cpu/pc_event.hh"
57 #include "enums/MemoryMode.hh"
58 #include "mem/mem_requestor.hh"
59 #include "mem/physical.hh"
60 #include "mem/port.hh"
61 #include "mem/port_proxy.hh"
62 #include "params/System.hh"
63 #include "sim/futex_map.hh"
64 #include "sim/redirect_path.hh"
65 #include "sim/se_signal.hh"
66 #include "sim/sim_object.hh"
67 #include "sim/workload.hh"
68 
69 class BaseRemoteGDB;
70 class KvmVM;
71 class ThreadContext;
72 
73 class System : public SimObject, public PCEventScope
74 {
75  private:
76 
82  class SystemPort : public RequestPort
83  {
84  public:
85 
89  SystemPort(const std::string &_name, SimObject *_owner)
90  : RequestPort(_name, _owner)
91  { }
92  bool recvTimingResp(PacketPtr pkt) override
93  { panic("SystemPort does not receive timing!\n"); return false; }
94  void recvReqRetry() override
95  { panic("SystemPort does not expect retry!\n"); }
96  };
97 
100 
101  // Map of memory address ranges for devices with their own backing stores
102  std::unordered_map<RequestorID, AbstractMemory *> deviceMemMap;
103 
104  public:
105 
106  class Threads
107  {
108  private:
109  struct Thread
110  {
111  ThreadContext *context = nullptr;
112  bool active = false;
113  BaseRemoteGDB *gdb = nullptr;
114  Event *resumeEvent = nullptr;
115 
116  void resume();
117  std::string name() const;
118  void quiesce() const;
119  };
120 
122 
123  Thread &
125  {
126  assert(id < size());
127  return threads[id];
128  }
129 
130  const Thread &
131  thread(ContextID id) const
132  {
133  assert(id < size());
134  return threads[id];
135  }
136 
138  void replace(ThreadContext *tc, ContextID id);
139 
140  friend class System;
141 
142  public:
144  {
145  private:
146  const Threads &threads;
147  int pos;
148 
149  friend class Threads;
150 
151  const_iterator(const Threads &_threads, int _pos) :
152  threads(_threads), pos(_pos)
153  {}
154 
155  public:
156  const_iterator(const const_iterator &) = default;
157  const_iterator &operator = (const const_iterator &) = default;
158 
159  using iterator_category = std::forward_iterator_tag;
161  using difference_type = int;
162  using pointer = const value_type *;
163  using reference = const value_type &;
164 
167  {
168  pos++;
169  return *this;
170  }
171 
174  {
175  return const_iterator(threads, pos++);
176  }
177 
180 
181  bool
182  operator == (const const_iterator &other) const
183  {
184  return &threads == &other.threads && pos == other.pos;
185  }
186 
187  bool
188  operator != (const const_iterator &other) const
189  {
190  return !(*this == other);
191  }
192  };
193 
195 
196  ThreadContext *
198  {
199  return thread(id).context;
200  }
201 
202  void markActive(ContextID id) { thread(id).active = true; }
203 
204  int size() const { return threads.size(); }
205  bool empty() const { return threads.empty(); }
206  int numRunning() const;
207  int
208  numActive() const
209  {
210  int count = 0;
211  for (auto &thread: threads) {
212  if (thread.active)
213  count++;
214  }
215  return count;
216  }
217 
218  void quiesce(ContextID id);
219  void quiesceTick(ContextID id, Tick when);
220 
221  const_iterator begin() const { return const_iterator(*this, 0); }
222  const_iterator end() const { return const_iterator(*this, size()); }
223  };
224 
229  void init() override;
230  void startup() override;
231 
241 
245  Port &getPort(const std::string &if_name,
246  PortID idx=InvalidPortID) override;
247 
258  bool isAtomicMode() const {
259  return memoryMode == Enums::atomic ||
260  memoryMode == Enums::atomic_noncaching;
261  }
262 
269  bool isTimingMode() const {
270  return memoryMode == Enums::timing;
271  }
272 
279  bool bypassCaches() const {
280  return memoryMode == Enums::atomic_noncaching;
281  }
292  Enums::MemoryMode getMemoryMode() const { return memoryMode; }
293 
301  void setMemoryMode(Enums::MemoryMode mode);
307  unsigned int cacheLineSize() const { return _cacheLineSize; }
308 
310 
311  const bool multiThread;
312 
313  using SimObject::schedule;
314 
315  bool schedule(PCEvent *event) override;
316  bool remove(PCEvent *event) override;
317 
319 
320  uint64_t init_param;
321 
325 
327  Workload *workload = nullptr;
328 
329  public:
335  return kvmVM;
336  }
337 
339  bool validKvmEnvironment() const;
340 
343 
345  Addr freeMemSize() const;
346 
348  Addr memSize() const;
349 
357  bool isMemAddr(Addr addr) const;
358 
364  void addDeviceMemory(RequestorID requestorId,
365  AbstractMemory *deviceMemory);
366 
372  bool isDeviceMemAddr(PacketPtr pkt) const;
373 
378 
382  Arch getArch() const { return Arch::TheISA; }
383 
387  ByteOrder
389  {
390  return _params->byte_order;
391  }
392 
396  Addr getPageBytes() const { return TheISA::PageBytes; }
397 
401  Addr getPageShift() const { return TheISA::PageShift; }
402 
407 
408  protected:
409 
410  KvmVM *const kvmVM;
411 
413 
414  Enums::MemoryMode memoryMode;
415 
416  const unsigned int _cacheLineSize;
417 
418  uint64_t workItemsBegin;
419  uint64_t workItemsEnd;
420  uint32_t numWorkIds;
421 
428 
430 
431  protected:
435  std::string stripSystemName(const std::string& requestor_name) const;
436 
437  public:
438 
472  RequestorID getRequestorId(const SimObject* requestor,
473  std::string subrequestor = std::string());
474 
483  RequestorID getGlobalRequestorId(const std::string& requestor_name);
484 
488  std::string getRequestorName(RequestorID requestor_id);
489 
494  RequestorID lookupRequestorId(const SimObject* obj) const;
495 
500  RequestorID lookupRequestorId(const std::string& name) const;
501 
503  RequestorID maxRequestors() { return requestors.size(); }
504 
505  protected:
507  RequestorID _getRequestorId(const SimObject* requestor,
508  const std::string& requestor_name);
509 
514  std::string leafRequestorName(const SimObject* requestor,
515  const std::string& subrequestor);
516 
517  public:
518 
519  void regStats() override;
524  uint64_t
526  {
527  return ++workItemsBegin;
528  }
529 
534  uint64_t
536  {
537  return ++workItemsEnd;
538  }
539 
545  int
547  {
549  return threads.numActive();
550  }
551 
552  inline void workItemBegin(uint32_t tid, uint32_t workid)
553  {
554  std::pair<uint32_t,uint32_t> p(tid, workid);
556  }
557 
558  void workItemEnd(uint32_t tid, uint32_t workid);
559 
560  public:
561  bool breakpoint();
562 
563  public:
564  typedef SystemParams Params;
565 
566  protected:
568 
574 
575  public:
576  System(Params *p);
577  ~System();
578 
579  const Params *params() const { return (const Params *)_params; }
580 
585  const AddrRange &m5opRange() const { return _m5opRange; }
586 
587  public:
588 
591  Addr allocPhysPages(int npages);
592 
595  void replaceThreadContext(ThreadContext *tc, ContextID context_id);
596 
597  void serialize(CheckpointOut &cp) const override;
598  void unserialize(CheckpointIn &cp) override;
599 
600  void drainResume() override;
601 
602  public:
604  std::map<std::pair<uint32_t,uint32_t>, Tick> lastWorkItemStarted;
605  std::map<uint32_t, Stats::Histogram*> workItemStats;
606 
608  //
609  // STATIC GLOBAL SYSTEM LIST
610  //
612 
614  static int numSystemsRunning;
615 
616  static void printSystems();
617 
619 
620  static const int maxPID = 32768;
621 
623  std::set<int> PIDs;
624 
625  // By convention, all signals are owned by the receiving process. The
626  // receiver will delete the signal upon reception.
628 
629  // Used by syscall-emulation mode. This member contains paths which need
630  // to be redirected to the faux-filesystem (a duplicate filesystem
631  // intended to replace certain files on the host filesystem).
633 };
634 
635 void printSystems();
636 
637 #endif // __SYSTEM_HH__
System::Threads::const_iterator::operator=
const_iterator & operator=(const const_iterator &)=default
KvmVM
KVM VM container.
Definition: vm.hh:289
System::PIDs
std::set< int > PIDs
Process set to track which PIDs have already been allocated.
Definition: system.hh:623
System::signalList
std::list< BasicSignal > signalList
Definition: system.hh:627
System::deviceMemMap
std::unordered_map< RequestorID, AbstractMemory * > deviceMemMap
Definition: system.hh:102
ThermalModel
Definition: thermal_model.hh:147
System::getRequestorId
RequestorID getRequestorId(const SimObject *requestor, std::string subrequestor=std::string())
Request an id used to create a request object in the system.
Definition: system.cc:600
System::pagePtr
Addr pagePtr
Definition: system.hh:318
System::Threads::numRunning
int numRunning() const
Definition: system.cc:165
System::Threads::const_iterator::operator*
reference operator*()
Definition: system.hh:178
System::liveEvents
std::list< PCEvent * > liveEvents
Definition: system.hh:98
System::getSystemPort
RequestPort & getSystemPort()
Get a reference to the system port that can be used by non-structural simulation objects like process...
Definition: system.hh:240
MipsISA::index
Bitfield< 30, 0 > index
Definition: pra_constants.hh:44
System::isTimingMode
bool isTimingMode() const
Is the system in timing mode?
Definition: system.hh:269
System::startup
void startup() override
startup() is the final initialization call before simulation.
Definition: system.cc:281
InvalidPortID
const PortID InvalidPortID
Definition: types.hh:238
System::getPageBytes
Addr getPageBytes() const
Get the page bytes for the ISA.
Definition: system.hh:396
System::workItemEnd
void workItemEnd(uint32_t tid, uint32_t workid)
Definition: system.cc:509
System::physProxy
PortProxy physProxy
Port to physical memory used for writing object files into ram at boot.
Definition: system.hh:324
Workload
Definition: workload.hh:40
ArmISA::atomic
Bitfield< 23, 20 > atomic
Definition: miscregs_types.hh:96
System::m5opRange
const AddrRange & m5opRange() const
Range used by memory-mapped m5 pseudo-ops if enabled.
Definition: system.hh:585
System::getGuestByteOrder
ByteOrder getGuestByteOrder() const
Get the guest byte order.
Definition: system.hh:388
System::init
void init() override
After all objects have been created and all ports are connected, check that the system port is connec...
Definition: system.cc:273
ContextID
int ContextID
Globally unique thread context ID.
Definition: types.hh:231
System::_getRequestorId
RequestorID _getRequestorId(const SimObject *requestor, const std::string &requestor_name)
helper function for getRequestorId
Definition: system.cc:607
System::Threads::Thread::quiesce
void quiesce() const
Definition: system.cc:94
System::Threads::markActive
void markActive(ContextID id)
Definition: system.hh:202
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
redirect_path.hh
System::registerThreadContext
ContextID registerThreadContext(ThreadContext *tc, ContextID assigned=InvalidContextID)
Definition: system.cc:325
System::redirectPaths
std::vector< RedirectPath * > redirectPaths
Definition: system.hh:632
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:237
futex_map.hh
System::_cacheLineSize
const unsigned int _cacheLineSize
Definition: system.hh:416
FutexMap
FutexMap class holds a map of all futexes used in the system.
Definition: futex_map.hh:90
System::maxPID
static const int maxPID
Definition: system.hh:620
System::Threads::Thread::resumeEvent
Event * resumeEvent
Definition: system.hh:114
System::Threads::const_iterator::difference_type
int difference_type
Definition: system.hh:161
System::getGlobalRequestorId
RequestorID getGlobalRequestorId(const std::string &requestor_name)
Registers a GLOBAL RequestorID, which is a RequestorID not related to any particular SimObject; since...
Definition: system.cc:594
std::vector
STL vector class.
Definition: stl.hh:37
InvalidContextID
const ContextID InvalidContextID
Definition: types.hh:232
System::getKvmVM
KvmVM * getKvmVM()
Get a pointer to the Kernel Virtual Machine (KVM) SimObject, if present.
Definition: system.hh:334
workload.hh
System::Params
SystemParams Params
Definition: system.hh:564
X86ISA::count
count
Definition: misc.hh:703
System::validKvmEnvironment
bool validKvmEnvironment() const
Verify gem5 configuration will support KVM emulation.
Definition: system.cc:368
System::replaceThreadContext
void replaceThreadContext(ThreadContext *tc, ContextID context_id)
Definition: system.cc:356
System::markWorkItem
int markWorkItem(int index)
Called by pseudo_inst to mark the cpus actively executing work items.
Definition: system.hh:546
System::workItemBegin
void workItemBegin(uint32_t tid, uint32_t workid)
Definition: system.hh:552
System::Threads::Thread
Definition: system.hh:109
System::Threads::const_iterator::threads
const Threads & threads
Definition: system.hh:146
System::incWorkItemsEnd
uint64_t incWorkItemsEnd()
Called by pseudo_inst to track the number of work items completed by this system.
Definition: system.hh:535
System::Threads::replace
void replace(ThreadContext *tc, ContextID id)
Definition: system.cc:138
System::getPhysMem
PhysicalMemory & getPhysMem()
Get a pointer to access the physical memory of the system.
Definition: system.hh:342
System::Threads::findFree
ThreadContext * findFree()
Definition: system.cc:155
System::printSystems
static void printSystems()
Definition: system.cc:526
System::stripSystemName
std::string stripSystemName(const std::string &requestor_name) const
Strips off the system name from a requestor name.
Definition: system.cc:547
System::lookupRequestorId
RequestorID lookupRequestorId(const SimObject *obj) const
Looks up the RequestorID for a given SimObject returns an invalid RequestorID (invldRequestorId) if n...
Definition: system.cc:557
System::memoryMode
Enums::MemoryMode memoryMode
Definition: system.hh:414
System::getArch
Arch getArch() const
Get the architecture.
Definition: system.hh:382
System::breakpoint
bool breakpoint()
Definition: system.cc:314
System::systemList
static std::vector< System * > systemList
Definition: system.hh:613
AbstractMemory
An abstract memory represents a contiguous block of physical memory, with an associated address range...
Definition: abstract_mem.hh:104
System::System
System(Params *p)
Definition: system.cc:205
RequestorID
uint16_t RequestorID
Definition: request.hh:85
Counter
int64_t Counter
Statistics counter type.
Definition: types.hh:58
System::SystemPort
Private class for the system port which is only used as a requestor for debug access and for non-stru...
Definition: system.hh:82
System::Threads::Thread::gdb
BaseRemoteGDB * gdb
Definition: system.hh:113
System::workItemsEnd
uint64_t workItemsEnd
Definition: system.hh:419
cp
Definition: cprintf.cc:40
EventManager::schedule
void schedule(Event &event, Tick when)
Definition: eventq.hh:1005
System::workload
Workload * workload
OS kernel.
Definition: system.hh:327
System::physmem
PhysicalMemory physmem
Definition: system.hh:412
System::setMemoryMode
void setMemoryMode(Enums::MemoryMode mode)
Change the memory mode of the system.
Definition: system.cc:308
System::Threads::Thread::name
std::string name() const
Definition: system.cc:86
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
Event
Definition: eventq.hh:246
AddrRange
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Definition: addr_range.hh:68
System::Threads::begin
const_iterator begin() const
Definition: system.hh:221
System::Threads::const_iterator::const_iterator
const_iterator(const Threads &_threads, int _pos)
Definition: system.hh:151
sim_object.hh
System::init_param
uint64_t init_param
Definition: system.hh:320
System
Definition: system.hh:73
System::multiThread
const bool multiThread
Definition: system.hh:311
ArmISA::PageShift
const Addr PageShift
Definition: isa_traits.hh:51
System::futexMap
FutexMap futexMap
Definition: system.hh:618
System::~System
~System()
Definition: system.cc:266
MipsISA::event
Bitfield< 10, 5 > event
Definition: pra_constants.hh:297
statistics.hh
System::numWorkIds
uint32_t numWorkIds
Definition: system.hh:420
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
System::Threads::quiesceTick
void quiesceTick(ContextID id, Tick when)
Definition: system.cc:190
port_proxy.hh
System::Threads::quiesce
void quiesce(ContextID id)
Definition: system.cc:179
System::Threads::end
const_iterator end() const
Definition: system.hh:222
ArmISA::mode
Bitfield< 4, 0 > mode
Definition: miscregs_types.hh:70
System::Threads::insert
ContextID insert(ThreadContext *tc, ContextID id=InvalidContextID)
Definition: system.cc:103
port.hh
System::schedule
bool schedule(PCEvent *event) override
Definition: system.cc:336
System::Threads::size
int size() const
Definition: system.hh:204
System::bypassCaches
bool bypassCaches() const
Should caches be bypassed?
Definition: system.hh:279
System::incWorkItemsBegin
uint64_t incWorkItemsBegin()
Called by pseudo_inst to track the number of work items started by this system.
Definition: system.hh:525
System::leafRequestorName
std::string leafRequestorName(const SimObject *requestor, const std::string &subrequestor)
Helper function for constructing the full (sub)requestor name by providing the root requestor and the...
Definition: system.cc:638
System::memSize
Addr memSize() const
Amount of physical memory that exists.
Definition: system.cc:405
PCEventScope
Definition: pc_event.hh:64
System::numSystemsRunning
static int numSystemsRunning
Definition: system.hh:614
System::Threads::Thread::resume
void resume()
Definition: system.cc:77
RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:74
std::pair
STL pair class.
Definition: stl.hh:58
System::getThermalModel
ThermalModel * getThermalModel() const
The thermal model used for this system (if any).
Definition: system.hh:406
BaseRemoteGDB
Definition: remote_gdb.hh:43
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
System::Threads::thread
Thread & thread(ContextID id)
Definition: system.hh:124
System::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: system.cc:472
System::Threads::operator[]
ThreadContext * operator[](ContextID id) const
Definition: system.hh:197
System::SystemPort::SystemPort
SystemPort(const std::string &_name, SimObject *_owner)
Create a system port with a name and an owner.
Definition: system.hh:89
System::SystemPort::recvReqRetry
void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
Definition: system.hh:94
System::SystemPort::recvTimingResp
bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
Definition: system.hh:92
System::Threads::thread
const Thread & thread(ContextID id) const
Definition: system.hh:131
System::getPageShift
Addr getPageShift() const
Get the number of bits worth of in-page address for the ISA.
Definition: system.hh:401
System::workItemsBegin
uint64_t workItemsBegin
Definition: system.hh:418
System::freeMemSize
Addr freeMemSize() const
Amount of physical memory that is still free.
Definition: system.cc:411
SimObject::name
virtual const std::string name() const
Definition: sim_object.hh:133
System::_systemPort
SystemPort _systemPort
Definition: system.hh:99
System::lastWorkItemStarted
std::map< std::pair< uint32_t, uint32_t >, Tick > lastWorkItemStarted
Definition: system.hh:604
System::getMemoryMode
Enums::MemoryMode getMemoryMode() const
Get the memory mode of the system.
Definition: system.hh:292
System::Threads
Definition: system.hh:106
System::Threads::const_iterator::operator==
bool operator==(const const_iterator &other) const
Definition: system.hh:182
PhysicalMemory
The physical memory encapsulates all memories in the system and provides basic functionality for acce...
Definition: physical.hh:110
System::threads
Threads threads
Definition: system.hh:309
ArmISA::PageBytes
const Addr PageBytes
Definition: isa_traits.hh:52
Loader::Arch
Arch
Definition: object_file.hh:44
System::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Additional function to return the Port of a memory object.
Definition: system.cc:301
System::workItemStats
std::map< uint32_t, Stats::Histogram * > workItemStats
Definition: system.hh:605
System::_m5opRange
const AddrRange _m5opRange
Range for memory-mapped m5 pseudo ops.
Definition: system.hh:573
PortProxy
This object is a proxy for a port or other object which implements the functional response protocol,...
Definition: port_proxy.hh:80
System::isDeviceMemAddr
bool isDeviceMemAddr(PacketPtr pkt) const
Similar to isMemAddr but for devices.
Definition: system.cc:431
base.hh
pc_event.hh
System::maxRequestors
RequestorID maxRequestors()
Get the number of requestors registered in the system.
Definition: system.hh:503
System::kvmVM
KvmVM *const kvmVM
Definition: system.hh:410
System::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: system.cc:454
System::Threads::const_iterator::operator!=
bool operator!=(const const_iterator &other) const
Definition: system.hh:188
System::Threads::const_iterator
Definition: system.hh:143
se_signal.hh
System::totalNumInsts
Counter totalNumInsts
Definition: system.hh:603
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
physical.hh
addr
ip6_addr_t addr
Definition: inet.hh:423
mem_requestor.hh
System::_params
Params * _params
Definition: system.hh:567
System::requestors
std::vector< RequestorInfo > requestors
This array is a per-system list of all devices capable of issuing a memory system request and an asso...
Definition: system.hh:427
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:63
System::addDeviceMemory
void addDeviceMemory(RequestorID requestorId, AbstractMemory *deviceMemory)
Add a physical memory range for a device.
Definition: system.cc:423
System::remove
bool remove(PCEvent *event) override
Definition: system.cc:346
System::getRequestorName
std::string getRequestorName(RequestorID requestor_id)
Get the name of an object for a given request id.
Definition: system.cc:651
System::allocPhysPages
Addr allocPhysPages(int npages)
Allocate npages contiguous unused physical pages.
Definition: system.cc:386
PCEvent
Definition: pc_event.hh:42
System::getDeviceMemory
AbstractMemory * getDeviceMemory(RequestorID _id) const
Return a pointer to the device memory.
Definition: system.cc:440
symtab.hh
System::Threads::empty
bool empty() const
Definition: system.hh:205
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
std::list< PCEvent * >
System::cacheLineSize
unsigned int cacheLineSize() const
Get the cache line size of the system.
Definition: system.hh:307
System::Threads::const_iterator::pos
int pos
Definition: system.hh:147
System::Threads::const_iterator::operator->
pointer operator->()
Definition: system.hh:179
CheckpointIn
Definition: serialize.hh:67
System::Threads::Thread::context
ThreadContext * context
Definition: system.hh:111
System::regStats
void regStats() override
Callback to set stat parameters.
Definition: system.cc:493
System::isAtomicMode
bool isAtomicMode() const
Is the system in atomic mode?
Definition: system.hh:258
System::params
const Params * params() const
Definition: system.hh:579
memory_image.hh
System::Threads::const_iterator::operator++
const_iterator & operator++()
Definition: system.hh:166
System::isMemAddr
bool isMemAddr(Addr addr) const
Check if a physical address is within a range of a memory that is part of the global address map.
Definition: system.cc:417
System::Threads::threads
std::vector< Thread > threads
Definition: system.hh:121
printSystems
void printSystems()
Definition: system.cc:541
ArmISA::id
Bitfield< 33 > id
Definition: miscregs_types.hh:247
System::Threads::numActive
int numActive() const
Definition: system.hh:208
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
System::Threads::const_iterator::iterator_category
std::forward_iterator_tag iterator_category
Definition: system.hh:159
System::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: system.cc:448
System::Threads::Thread::active
bool active
Definition: system.hh:112
curTick
Tick curTick()
The current simulated tick.
Definition: core.hh:45
System::thermalModel
ThermalModel * thermalModel
Definition: system.hh:429
SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:92

Generated on Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17