gem5  v22.1.0.0
pseudo_inst.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2012, 2015, 2017 ARM Limited
3  * Copyright (c) 2020 Barkhausen Institut
4  * All rights reserved
5  *
6  * The license below extends only to copyright in the software and shall
7  * not be construed as granting a license to any other intellectual
8  * property including but not limited to intellectual property relating
9  * to a hardware implementation of the functionality of the software
10  * licensed hereunder. You may use the software subject to the license
11  * terms below provided that you ensure that this notice is replicated
12  * unmodified and in its entirety in all distributions of the software,
13  * modified or unmodified, in source code or in binary form.
14  *
15  * Copyright (c) 2011 Advanced Micro Devices, Inc.
16  * Copyright (c) 2003-2006 The Regents of The University of Michigan
17  * All rights reserved.
18  *
19  * Redistribution and use in source and binary forms, with or without
20  * modification, are permitted provided that the following conditions are
21  * met: redistributions of source code must retain the above copyright
22  * notice, this list of conditions and the following disclaimer;
23  * redistributions in binary form must reproduce the above copyright
24  * notice, this list of conditions and the following disclaimer in the
25  * documentation and/or other materials provided with the distribution;
26  * neither the name of the copyright holders nor the names of its
27  * contributors may be used to endorse or promote products derived from
28  * this software without specific prior written permission.
29  *
30  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41  */
42 
43 #include "sim/pseudo_inst.hh"
44 
45 #include <fcntl.h>
46 #include <unistd.h>
47 
48 #include <array>
49 #include <cerrno>
50 #include <fstream>
51 #include <string>
52 #include <vector>
53 
54 #include "base/debug.hh"
55 #include "base/output.hh"
56 #include "cpu/base.hh"
57 #include "cpu/thread_context.hh"
58 #include "debug/Loader.hh"
59 #include "debug/Quiesce.hh"
60 #include "debug/WorkItems.hh"
61 #include "dev/net/dist_iface.hh"
64 #include "params/BaseCPU.hh"
65 #include "sim/full_system.hh"
66 #include "sim/process.hh"
67 #include "sim/serialize.hh"
68 #include "sim/sim_events.hh"
69 #include "sim/sim_exit.hh"
70 #include "sim/stat_control.hh"
71 #include "sim/stats.hh"
72 #include "sim/system.hh"
73 
74 namespace gem5
75 {
76 
77 using namespace statistics;
78 
79 GEM5_DEPRECATED_NAMESPACE(PseudoInst, pseudo_inst);
80 namespace pseudo_inst
81 {
82 
89 namespace
90 {
91 
95 const std::string DEFAULT = "";
99 const std::string DIST_RANK = "dist-rank";
103 const std::string DIST_SIZE = "dist-size";
104 
105 } // anonymous namespace
106 
107 void
109 {
110  DPRINTF(PseudoInst, "pseudo_inst::arm()\n");
111 
112  auto *workload = tc->getSystemPtr()->workload;
113  if (workload)
114  workload->recordArm();
115 }
116 
117 void
119 {
120  DPRINTF(PseudoInst, "pseudo_inst::quiesce()\n");
121  tc->quiesce();
122 }
123 
124 void
126 {
127  DPRINTF(PseudoInst, "pseudo_inst::quiesceSkip()\n");
128  tc->quiesceTick(tc->getCpuPtr()->nextCycle() + 1);
129 }
130 
131 void
132 quiesceNs(ThreadContext *tc, uint64_t ns)
133 {
134  DPRINTF(PseudoInst, "pseudo_inst::quiesceNs(%i)\n", ns);
136 }
137 
138 void
139 quiesceCycles(ThreadContext *tc, uint64_t cycles)
140 {
141  DPRINTF(PseudoInst, "pseudo_inst::quiesceCycles(%i)\n", cycles);
142  tc->quiesceTick(tc->getCpuPtr()->clockEdge(Cycles(cycles)));
143 }
144 
145 uint64_t
147 {
148  DPRINTF(PseudoInst, "pseudo_inst::quiesceTime()\n");
149 
150  return (tc->readLastActivate() - tc->readLastSuspend()) /
152 }
153 
154 uint64_t
156 {
157  DPRINTF(PseudoInst, "pseudo_inst::rpns()\n");
158  return curTick() / sim_clock::as_int::ns;
159 }
160 
161 void
163 {
164  DPRINTF(PseudoInst, "pseudo_inst::wakeCPU(%i)\n", cpuid);
165  System *sys = tc->getSystemPtr();
166 
167  if (sys->threads.size() <= cpuid) {
168  warn("pseudo_inst::wakeCPU(%i), cpuid greater than number of contexts"
169  "(%i)\n", cpuid, sys->threads.size());
170  return;
171  }
172 
173  ThreadContext *other_tc = sys->threads[cpuid];
174  if (other_tc->status() == ThreadContext::Suspended)
175  other_tc->activate();
176 }
177 
178 void
180 {
181  DPRINTF(PseudoInst, "pseudo_inst::m5exit(%i)\n", delay);
182  if (DistIface::readyToExit(delay)) {
183  Tick when = curTick() + delay * sim_clock::as_int::ns;
184  exitSimLoop("m5_exit instruction encountered", 0, when, 0, true);
185  }
186 }
187 
188 // m5sum is for sanity checking the gem5 op interface.
189 uint64_t
190 m5sum(ThreadContext *tc, uint64_t a, uint64_t b, uint64_t c,
191  uint64_t d, uint64_t e, uint64_t f)
192 {
193  DPRINTF(PseudoInst, "pseudo_inst::m5sum(%#x, %#x, %#x, %#x, %#x, %#x)\n",
194  a, b, c, d, e, f);
195  return a + b + c + d + e + f;
196 }
197 
198 void
199 m5fail(ThreadContext *tc, Tick delay, uint64_t code)
200 {
201  DPRINTF(PseudoInst, "pseudo_inst::m5fail(%i, %i)\n", delay, code);
202  Tick when = curTick() + delay * sim_clock::as_int::ns;
203  exitSimLoop("m5_fail instruction encountered", code, when, 0, true);
204 }
205 
206 void
208 {
209  DPRINTF(PseudoInst, "pseudo_inst::loadsymbol()\n");
210 
211  const std::string &filename = tc->getCpuPtr()->system->params().symbolfile;
212  if (filename.empty()) {
213  return;
214  }
215 
216  std::string buffer;
217  std::ifstream file(filename.c_str());
218 
219  if (!file)
220  fatal("file error: Can't open symbol table file %s\n", filename);
221 
222  while (!file.eof()) {
223  getline(file, buffer);
224 
225  if (buffer.empty())
226  continue;
227 
228  std::string::size_type idx = buffer.find(' ');
229  if (idx == std::string::npos)
230  continue;
231 
232  std::string address = "0x" + buffer.substr(0, idx);
233  eat_white(address);
234  if (address.empty())
235  continue;
236 
237  // Skip over letter and space
238  std::string symbol = buffer.substr(idx + 3);
239  eat_white(symbol);
240  if (symbol.empty())
241  continue;
242 
243  Addr addr;
244  if (!to_number(address, addr))
245  continue;
246 
247  if (!tc->getSystemPtr()->workload->insertSymbol(
248  { loader::Symbol::Binding::Global, symbol, addr })) {
249  continue;
250  }
251 
252 
253  DPRINTF(Loader, "Loaded symbol: %s @ %#llx\n", symbol, addr);
254  }
255  file.close();
256 }
257 
258 void
260 {
261  DPRINTF(PseudoInst, "pseudo_inst::addsymbol(0x%x, 0x%x)\n",
262  addr, symbolAddr);
263 
264  std::string symbol;
265  TranslatingPortProxy fs_proxy(tc);
266  SETranslatingPortProxy se_proxy(tc);
267  PortProxy &virt_proxy = FullSystem ? fs_proxy : se_proxy;
268 
269  virt_proxy.readString(symbol, symbolAddr);
270 
271  DPRINTF(Loader, "Loaded symbol: %s @ %#llx\n", symbol, addr);
272 
277 }
278 
279 uint64_t
280 initParam(ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
281 {
282  DPRINTF(PseudoInst, "pseudo_inst::initParam() key:%s%s\n",
283  (char *)&key_str1, (char *)&key_str2);
284 
285  // The key parameter string is passed in via two 64-bit registers. We copy
286  // out the characters from the 64-bit integer variables here, and
287  // concatenate them in the key character buffer
288  const int len = 2 * sizeof(uint64_t) + 1;
289  char key[len];
290  std::memset(key, '\0', len);
291 
292  std::array<uint64_t, 2> key_regs = {{ key_str1, key_str2 }};
293  key_regs = letoh(key_regs);
294  std::memcpy(key, key_regs.data(), sizeof(key_regs));
295 
296  // Check key parameter to figure out what to return.
297  const std::string key_str(key);
298  if (key == DEFAULT)
299  return tc->getCpuPtr()->system->init_param;
300  else if (key == DIST_RANK)
301  return DistIface::rankParam();
302  else if (key == DIST_SIZE)
303  return DistIface::sizeParam();
304  else
305  panic("Unknown key for initparam pseudo instruction:\"%s\"", key_str);
306 }
307 
308 
309 void
310 resetstats(ThreadContext *tc, Tick delay, Tick period)
311 {
312  DPRINTF(PseudoInst, "pseudo_inst::resetstats(%i, %i)\n", delay, period);
313  if (!tc->getCpuPtr()->params().do_statistics_insts)
314  return;
315 
316 
317  Tick when = curTick() + delay * sim_clock::as_int::ns;
318  Tick repeat = period * sim_clock::as_int::ns;
319 
320  statistics::schedStatEvent(false, true, when, repeat);
321 }
322 
323 void
324 dumpstats(ThreadContext *tc, Tick delay, Tick period)
325 {
326  DPRINTF(PseudoInst, "pseudo_inst::dumpstats(%i, %i)\n", delay, period);
327  if (!tc->getCpuPtr()->params().do_statistics_insts)
328  return;
329 
330 
331  Tick when = curTick() + delay * sim_clock::as_int::ns;
332  Tick repeat = period * sim_clock::as_int::ns;
333 
334  statistics::schedStatEvent(true, false, when, repeat);
335 }
336 
337 void
339 {
340  DPRINTF(PseudoInst, "pseudo_inst::dumpresetstats(%i, %i)\n", delay,
341  period);
342  if (!tc->getCpuPtr()->params().do_statistics_insts)
343  return;
344 
345 
346  Tick when = curTick() + delay * sim_clock::as_int::ns;
347  Tick repeat = period * sim_clock::as_int::ns;
348 
349  statistics::schedStatEvent(true, true, when, repeat);
350 }
351 
352 void
353 m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
354 {
355  DPRINTF(PseudoInst, "pseudo_inst::m5checkpoint(%i, %i)\n", delay, period);
356  if (!tc->getCpuPtr()->params().do_checkpoint_insts)
357  return;
358 
359  if (DistIface::readyToCkpt(delay, period)) {
360  Tick when = curTick() + delay * sim_clock::as_int::ns;
361  Tick repeat = period * sim_clock::as_int::ns;
362  exitSimLoop("checkpoint", 0, when, repeat);
363  }
364 }
365 
366 uint64_t
367 readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
368 {
369  DPRINTF(PseudoInst, "pseudo_inst::readfile(0x%x, 0x%x, 0x%x)\n",
370  vaddr, len, offset);
371 
372  const std::string &file = tc->getSystemPtr()->params().readfile;
373  if (file.empty()) {
374  return 0;
375  }
376 
377  uint64_t result = 0;
378 
379  int fd = ::open(file.c_str(), O_RDONLY, 0);
380  if (fd < 0)
381  panic("could not open file %s\n", file);
382 
383  if (::lseek(fd, offset, SEEK_SET) < 0)
384  panic("could not seek: %s", strerror(errno));
385 
386  char *buf = new char[len];
387  char *p = buf;
388  while (len > 0) {
389  int bytes = ::read(fd, p, len);
390  if (bytes <= 0)
391  break;
392 
393  p += bytes;
394  result += bytes;
395  len -= bytes;
396  }
397 
398  close(fd);
399  TranslatingPortProxy fs_proxy(tc);
400  SETranslatingPortProxy se_proxy(tc);
401  PortProxy &virt_proxy = FullSystem ? fs_proxy : se_proxy;
402 
403  virt_proxy.writeBlob(vaddr, buf, result);
404  delete [] buf;
405  return result;
406 }
407 
408 uint64_t
409 writefile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset,
410  Addr filename_addr)
411 {
412  DPRINTF(PseudoInst, "pseudo_inst::writefile(0x%x, 0x%x, 0x%x, 0x%x)\n",
413  vaddr, len, offset, filename_addr);
414 
415  // copy out target filename
416  std::string filename;
417  TranslatingPortProxy fs_proxy(tc);
418  SETranslatingPortProxy se_proxy(tc);
419  PortProxy &virt_proxy = FullSystem ? fs_proxy : se_proxy;
420 
421  virt_proxy.readString(filename, filename_addr);
422 
423  OutputStream *out;
424  if (offset == 0) {
425  // create a new file (truncate)
426  out = simout.create(filename, true, true);
427  } else {
428  // do not truncate file if offset is non-zero
429  // (ios::in flag is required as well to keep the existing data
430  // intact, otherwise existing data will be zeroed out.)
431  out = simout.open(filename,
432  std::ios::in | std::ios::out | std::ios::binary, true);
433  }
434 
435  std::ostream *os(out->stream());
436  if (!os)
437  panic("could not open file %s\n", filename);
438 
439  if (offset != 0) {
440  // seek to offset
441  os->seekp(offset);
442  }
443 
444  // copy out data and write to file
445  char *buf = new char[len];
446 
447  virt_proxy.readBlob(vaddr, buf, len);
448  os->write(buf, len);
449  if (os->fail() || os->bad())
450  panic("Error while doing writefile!\n");
451 
452  simout.close(out);
453 
454  delete [] buf;
455 
456  return len;
457 }
458 
459 void
461 {
462  DPRINTF(PseudoInst, "pseudo_inst::debugbreak()\n");
464 }
465 
466 void
468 {
469  DPRINTF(PseudoInst, "pseudo_inst::switchcpu()\n");
470  exitSimLoop("switchcpu");
471 }
472 
473 void
475 {
476  DPRINTF(PseudoInst, "pseudo_inst::togglesync()\n");
478 }
479 
480 void
482 {
483  DPRINTF(PseudoInst, "pseudo_inst::triggerWorkloadEvent()\n");
484  tc->getSystemPtr()->workload->event(tc);
485 }
486 
487 //
488 // This function is executed when annotated work items begin. Depending on
489 // what the user specified at the command line, the simulation may exit and/or
490 // take a checkpoint when a certain work item begins.
491 //
492 void
493 workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid)
494 {
495  DPRINTF(PseudoInst, "pseudo_inst::workbegin(%i, %i)\n", workid, threadid);
496  System *sys = tc->getSystemPtr();
497  const System::Params &params = sys->params();
498 
499  if (params.exit_on_work_items) {
500  exitSimLoop("workbegin", static_cast<int>(workid));
501  return;
502  }
503 
504  DPRINTF(WorkItems, "Work Begin workid: %d, threadid %d\n", workid,
505  threadid);
506  tc->getCpuPtr()->workItemBegin();
507  sys->workItemBegin(threadid, workid);
508 
509  //
510  // If specified, determine if this is the specific work item the user
511  // identified
512  //
513  if (params.work_item_id == -1 || params.work_item_id == workid) {
514 
515  uint64_t systemWorkBeginCount = sys->incWorkItemsBegin();
516  int cpuId = tc->getCpuPtr()->cpuId();
517 
518  if (params.work_cpus_ckpt_count != 0 &&
519  sys->markWorkItem(cpuId) >= params.work_cpus_ckpt_count) {
520  //
521  // If active cpus equals checkpoint count, create checkpoint
522  //
523  exitSimLoop("checkpoint");
524  }
525 
526  if (systemWorkBeginCount == params.work_begin_ckpt_count) {
527  //
528  // Note: the string specified as the cause of the exit event must
529  // exactly equal "checkpoint" inorder to create a checkpoint
530  //
531  exitSimLoop("checkpoint");
532  }
533 
534  if (systemWorkBeginCount == params.work_begin_exit_count) {
535  //
536  // If a certain number of work items started, exit simulation
537  //
538  exitSimLoop("work started count reach");
539  }
540 
541  if (cpuId == params.work_begin_cpu_id_exit) {
542  //
543  // If work started on the cpu id specified, exit simulation
544  //
545  exitSimLoop("work started on specific cpu");
546  }
547  }
548 }
549 
550 //
551 // This function is executed when annotated work items end. Depending on
552 // what the user specified at the command line, the simulation may exit and/or
553 // take a checkpoint when a certain work item ends.
554 //
555 void
556 workend(ThreadContext *tc, uint64_t workid, uint64_t threadid)
557 {
558  DPRINTF(PseudoInst, "pseudo_inst::workend(%i, %i)\n", workid, threadid);
559  System *sys = tc->getSystemPtr();
560  const System::Params &params = sys->params();
561 
562  if (params.exit_on_work_items) {
563  exitSimLoop("workend", static_cast<int>(workid));
564  return;
565  }
566 
567  DPRINTF(WorkItems, "Work End workid: %d, threadid %d\n", workid, threadid);
568  tc->getCpuPtr()->workItemEnd();
569  sys->workItemEnd(threadid, workid);
570 
571  //
572  // If specified, determine if this is the specific work item the user
573  // identified
574  //
575  if (params.work_item_id == -1 || params.work_item_id == workid) {
576 
577  uint64_t systemWorkEndCount = sys->incWorkItemsEnd();
578  int cpuId = tc->getCpuPtr()->cpuId();
579 
580  if (params.work_cpus_ckpt_count != 0 &&
581  sys->markWorkItem(cpuId) >= params.work_cpus_ckpt_count) {
582  //
583  // If active cpus equals checkpoint count, create checkpoint
584  //
585  exitSimLoop("checkpoint");
586  }
587 
588  if (params.work_end_ckpt_count != 0 &&
589  systemWorkEndCount == params.work_end_ckpt_count) {
590  //
591  // If total work items completed equals checkpoint count, create
592  // checkpoint
593  //
594  exitSimLoop("checkpoint");
595  }
596 
597  if (params.work_end_exit_count != 0 &&
598  systemWorkEndCount == params.work_end_exit_count) {
599  //
600  // If total work items completed equals exit count, exit simulation
601  //
602  exitSimLoop("work items exit count reached");
603  }
604  }
605 }
606 
607 } // namespace pseudo_inst
608 } // namespace gem5
#define DPRINTF(x,...)
Definition: trace.hh:186
System * system
Definition: base.hh:375
void workItemBegin()
Definition: base.hh:214
int cpuId() const
Reads this CPU's ID.
Definition: base.hh:183
void workItemEnd()
Definition: base.hh:215
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
Tick nextCycle() const
Based on the clock of the object, determine the start tick of the first cycle that is at least one cy...
Cycles is a wrapper class for representing cycle counts, i.e.
Definition: types.hh:79
static uint64_t rankParam()
Getter for the dist rank param.
Definition: dist_iface.cc:916
static bool readyToExit(Tick delay)
Initiate the exit from the simulation.
Definition: dist_iface.cc:891
static void toggleSync(ThreadContext *tc)
Trigger the primary to start/stop synchronization.
Definition: dist_iface.cc:854
static bool readyToCkpt(Tick delay, Tick period)
Initiate taking a checkpoint.
Definition: dist_iface.cc:823
static uint64_t sizeParam()
Getter for the dist size param.
Definition: dist_iface.cc:929
void close(OutputStream *file)
Closes an output file and free the corresponding OutputFile.
Definition: output.cc:147
OutputStream * open(const std::string &name, std::ios_base::openmode mode, bool recreateable=true, bool no_gz=false)
Open a file in this directory (optionally compressed).
Definition: output.cc:224
OutputStream * create(const std::string &name, bool binary=false, bool no_gz=false)
Creates a file in this directory (optionally compressed).
Definition: output.cc:210
std::ostream * stream() const
Get the output underlying output stream.
Definition: output.hh:62
This object is a proxy for a port or other object which implements the functional response protocol,...
Definition: port_proxy.hh:87
void writeBlob(Addr addr, const void *p, int size) const
Same as tryWriteBlob, but insists on success.
Definition: port_proxy.hh:192
void readString(std::string &str, Addr addr) const
Same as tryReadString, but insists on success.
Definition: port_proxy.hh:260
void readBlob(Addr addr, void *p, int size) const
Higher level interfaces based on the above.
Definition: port_proxy.hh:182
SimObjectParams Params
Definition: sim_object.hh:170
int size() const
Definition: system.hh:213
int markWorkItem(int index)
Called by pseudo_inst to mark the cpus actively executing work items.
Definition: system.hh:541
uint64_t incWorkItemsEnd()
Called by pseudo_inst to track the number of work items completed by this system.
Definition: system.hh:530
uint64_t incWorkItemsBegin()
Called by pseudo_inst to track the number of work items started by this system.
Definition: system.hh:520
void workItemEnd(uint32_t tid, uint32_t workid)
Definition: system.cc:377
Workload * workload
OS kernel.
Definition: system.hh:329
uint64_t init_param
Definition: system.hh:322
void workItemBegin(uint32_t tid, uint32_t workid)
Definition: system.hh:548
Threads threads
Definition: system.hh:313
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void activate()=0
Set the status to Active.
virtual System * getSystemPtr()=0
virtual Tick readLastActivate()=0
void quiesceTick(Tick resume)
Quiesce, suspend, and schedule activate at resume.
virtual Tick readLastSuspend()=0
void quiesce()
Quiesce thread context.
@ Suspended
Temporarily inactive.
virtual BaseCPU * getCpuPtr()=0
virtual Status status() const =0
This proxy attempts to translate virtual addresses using the TLBs.
virtual void event(ThreadContext *tc)
Definition: workload.hh:116
void recordArm()
Definition: workload.hh:90
virtual bool insertSymbol(const loader::Symbol &symbol)=0
bool insert(const Symbol &symbol)
Insert a new symbol in the table if it does not already exist.
Definition: symtab.cc:55
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:178
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:190
const Params & params() const
Definition: sim_object.hh:176
uint16_t len
Definition: helpers.cc:62
#define warn(...)
Definition: logging.hh:246
Bitfield< 14, 12 > fd
Definition: types.hh:150
Bitfield< 7 > b
Definition: misc_types.hh:388
Bitfield< 23, 0 > offset
Definition: types.hh:144
Bitfield< 9 > e
Definition: misc_types.hh:65
Bitfield< 0 > ns
Definition: misc_types.hh:338
Bitfield< 8 > a
Definition: misc_types.hh:66
Bitfield< 9 > d
Definition: misc_types.hh:64
Bitfield< 28, 21 > cpuid
Definition: dt_constants.hh:95
Bitfield< 2 > c
Definition: pagetable.hh:63
Bitfield< 56 > f
Definition: pagetable.hh:53
Bitfield< 54 > p
Definition: pagetable.hh:70
Bitfield< 17 > os
Definition: misc.hh:810
Bitfield< 3 > addr
Definition: types.hh:84
void breakpoint()
Definition: debug.cc:65
SymbolTable debugSymbolTable
Global unified debugging symbol table (for target).
Definition: symtab.cc:44
uint64_t m5sum(ThreadContext *tc, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f)
Definition: pseudo_inst.cc:190
uint64_t rpns(ThreadContext *tc)
Definition: pseudo_inst.cc:155
void loadsymbol(ThreadContext *tc)
Definition: pseudo_inst.cc:207
void quiesceCycles(ThreadContext *tc, uint64_t cycles)
Definition: pseudo_inst.cc:139
void arm(ThreadContext *tc)
Definition: pseudo_inst.cc:108
void debugbreak(ThreadContext *tc)
Definition: pseudo_inst.cc:460
void m5fail(ThreadContext *tc, Tick delay, uint64_t code)
Definition: pseudo_inst.cc:199
void quiesce(ThreadContext *tc)
Definition: pseudo_inst.cc:118
void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
Definition: pseudo_inst.cc:259
uint64_t writefile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset, Addr filename_addr)
Definition: pseudo_inst.cc:409
uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
Definition: pseudo_inst.cc:367
void quiesceNs(ThreadContext *tc, uint64_t ns)
Definition: pseudo_inst.cc:132
void m5exit(ThreadContext *tc, Tick delay)
Definition: pseudo_inst.cc:179
void quiesceSkip(ThreadContext *tc)
Definition: pseudo_inst.cc:125
void togglesync(ThreadContext *tc)
Definition: pseudo_inst.cc:474
void resetstats(ThreadContext *tc, Tick delay, Tick period)
Definition: pseudo_inst.cc:310
void workend(ThreadContext *tc, uint64_t workid, uint64_t threadid)
Definition: pseudo_inst.cc:556
uint64_t initParam(ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
Definition: pseudo_inst.cc:280
void triggerWorkloadEvent(ThreadContext *tc)
Definition: pseudo_inst.cc:481
uint64_t quiesceTime(ThreadContext *tc)
Definition: pseudo_inst.cc:146
void wakeCPU(ThreadContext *tc, uint64_t cpuid)
Definition: pseudo_inst.cc:162
void m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
Definition: pseudo_inst.cc:353
void workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid)
Definition: pseudo_inst.cc:493
void switchcpu(ThreadContext *tc)
Definition: pseudo_inst.cc:467
void dumpstats(ThreadContext *tc, Tick delay, Tick period)
Definition: pseudo_inst.cc:324
void dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
Definition: pseudo_inst.cc:338
Tick ns
nanosecond
Definition: core.cc:71
unsigned int size_type
Definition: types.hh:60
void schedStatEvent(bool dump, bool reset, Tick when, Tick repeat)
Schedule statistics dumping.
GEM5_DEPRECATED_NAMESPACE(Units, units)
Units for Stats.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
T letoh(T value)
Definition: byteswap.hh:173
bool to_number(const std::string &value, Pixel &retval)
Definition: pixel.hh:217
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:46
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
Definition: root.cc:220
OutputDirectory simout
Definition: output.cc:62
uint64_t Tick
Tick count type.
Definition: types.hh:58
void exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat, bool serialize)
Schedule an event to exit the simulation loop (returning to Python) at the end of the current cycle (...
Definition: sim_events.cc:88
void eat_white(std::string &s)
Definition: str.hh:67

Generated on Wed Dec 21 2022 10:22:40 for gem5 by doxygen 1.9.1