gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
isa.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 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;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #include "arch/sparc/isa.hh"
30 
31 #include "arch/sparc/asi.hh"
32 #include "arch/sparc/decoder.hh"
33 #include "arch/sparc/interrupts.hh"
34 #include "arch/sparc/regs/float.hh"
35 #include "arch/sparc/regs/int.hh"
36 #include "arch/sparc/regs/misc.hh"
38 #include "base/bitfield.hh"
39 #include "base/trace.hh"
40 #include "cpu/base.hh"
41 #include "cpu/thread_context.hh"
42 #include "debug/MatRegs.hh"
43 #include "debug/Timer.hh"
44 #include "params/SparcISA.hh"
45 
46 namespace gem5
47 {
48 
49 namespace SparcISA
50 {
51 
52 static PSTATE
54 {
55  PSTATE mask = 0;
56  mask.ie = 1;
57  mask.priv = 1;
58  mask.am = 1;
59  mask.pef = 1;
60  mask.mm = 3;
61  mask.tle = 1;
62  mask.cle = 1;
63  mask.pid1 = 1;
64  return mask;
65 }
66 
67 static const PSTATE PstateMask = buildPstateMask();
68 
69 namespace
70 {
71 
72 /* Not applicable for SPARC */
73 RegClass vecRegClass(VecRegClass, VecRegClassName, 1, debug::IntRegs);
76  debug::IntRegs);
77 RegClass matRegClass(MatRegClass, MatRegClassName, 1, debug::MatRegs);
78 RegClass ccRegClass(CCRegClass, CCRegClassName, 0, debug::IntRegs);
79 
80 } // anonymous namespace
81 
83 {
84  _regClasses.push_back(&flatIntRegClass);
85  _regClasses.push_back(&floatRegClass);
86  _regClasses.push_back(&vecRegClass);
87  _regClasses.push_back(&vecElemClass);
88  _regClasses.push_back(&vecPredRegClass);
89  _regClasses.push_back(&matRegClass);
90  _regClasses.push_back(&ccRegClass);
91  _regClasses.push_back(&miscRegClass);
92 
93  clear();
94 }
95 
96 static void
98 {
99  uint8_t tl = src->readMiscRegNoEffect(MISCREG_TL);
100 
101  // Read all the trap level dependent registers and save them off
102  for (int i = 1; i <= MaxTL; i++) {
105 
114  }
115 
116  // Save off the traplevel
119 
120 
121  // ASRs
122 // dest->setMiscRegNoEffect(MISCREG_Y,
123 // src->readMiscRegNoEffect(MISCREG_Y));
124 // dest->setMiscRegNoEffect(MISCREG_CCR,
125 // src->readMiscRegNoEffect(MISCREG_CCR));
126  dest->setMiscReg(MISCREG_ASI,
140 
141  // Priv Registers
150  dest->setMiscReg(MISCREG_CWP,
152 // dest->setMiscRegNoEffect(MISCREG_CANSAVE,
153 // src->readMiscRegNoEffect(MISCREG_CANSAVE));
154 // dest->setMiscRegNoEffect(MISCREG_CANRESTORE,
155 // src->readMiscRegNoEffect(MISCREG_CANRESTORE));
156 // dest->setMiscRegNoEffect(MISCREG_OTHERWIN,
157 // src->readMiscRegNoEffect(MISCREG_OTHERWIN));
158 // dest->setMiscRegNoEffect(MISCREG_CLEANWIN,
159 // src->readMiscRegNoEffect(MISCREG_CLEANWIN));
160 // dest->setMiscRegNoEffect(MISCREG_WSTATE,
161 // src->readMiscRegNoEffect(MISCREG_WSTATE));
163 
164  // Hyperprivilged registers
175 
176  // FSR
179 
180  // Strand Status Register
183 
184  // MMU Registers
193 
194  // Scratchpad Registers
211 
212  // Queue Registers
229 }
230 
231 void
233 {
234  // First loop through the integer registers.
235  int old_gl = src->readMiscRegNoEffect(MISCREG_GL);
236  int old_cwp = src->readMiscRegNoEffect(MISCREG_CWP);
237  // Globals
238  for (int x = 0; x < MaxGL; ++x) {
239  src->setMiscReg(MISCREG_GL, x);
241  // Skip %g0 which is always zero.
242  for (int y = 1; y < 8; y++) {
243  RegId reg = intRegClass[y];
244  tc->setReg(reg, src->getReg(reg));
245  }
246  }
247  // Locals and ins. Outs are all also ins.
248  for (int x = 0; x < NWindows; ++x) {
249  src->setMiscReg(MISCREG_CWP, x);
251  for (int y = 16; y < 32; y++) {
252  RegId reg = intRegClass[y];
253  tc->setReg(reg, src->getReg(reg));
254  }
255  }
256  // Microcode reg and pseudo int regs (misc regs in the integer regfile).
257  for (int y = int_reg::NumArchRegs;
259  RegId reg = intRegClass[y];
260  tc->setReg(reg, src->getReg(reg));
261  }
262 
263  // Restore src's GL, CWP
264  src->setMiscReg(MISCREG_GL, old_gl);
265  src->setMiscReg(MISCREG_CWP, old_cwp);
266 
267 
268  // Then loop through the floating point registers.
269  for (int i = 0; i < SparcISA::float_reg::NumArchRegs; ++i) {
271  tc->setReg(reg, src->getReg(reg));
272  }
273 
274  // Copy misc. registers
275  copyMiscRegs(src, tc);
276 
277  // Lastly copy PC/NPC
278  tc->pcState(src->pcState());
279 }
280 
281 void
283 {
286  // Microcode registers.
287  for (int i = 0; i < int_reg::NumMicroRegs; i++)
293 }
294 
295 void
297 {
298  assert(offset >= 0 && offset + NumWindowedRegs <= int_reg::NumRegs);
299  RegIndex *mapChunk = intRegMap + offset;
300  for (int i = 0; i < NumWindowedRegs; i++)
301  mapChunk[i] = TotalGlobals +
303 }
304 
305 void
307 {
308  assert(offset >= 0 && offset + NumGlobalRegs <= int_reg::NumRegs);
309  RegIndex *mapChunk = intRegMap + offset;
310  mapChunk[0] = 0;
311  for (int i = 1; i < NumGlobalRegs; i++)
312  mapChunk[i] = i + gl * NumGlobalRegs;
313 }
314 
315 void
317 {
318  cwp = 0;
319  gl = 0;
320  reloadRegMap();
321 
322  // y = 0;
323  // ccr = 0;
324  asi = 0;
325  tick = 1ULL << 63;
326  fprs = 0;
327  gsr = 0;
328  softint = 0;
329  tick_cmpr = 0;
330  stick = 0;
331  stick_cmpr = 0;
332  memset(tpc, 0, sizeof(tpc));
333  memset(tnpc, 0, sizeof(tnpc));
334  memset(tstate, 0, sizeof(tstate));
335  memset(tt, 0, sizeof(tt));
336  tba = 0;
337  pstate = 0;
338  tl = 0;
339  pil = 0;
340  // cansave = 0;
341  // canrestore = 0;
342  // cleanwin = 0;
343  // otherwin = 0;
344  // wstate = 0;
345  // In a T1, bit 11 is apparently always 1
346  hpstate = 0;
347  hpstate.id = 1;
348  memset(htstate, 0, sizeof(htstate));
349  hintp = 0;
350  htba = 0;
351  hstick_cmpr = 0;
352  // This is set this way in Legion for some reason
353  strandStatusReg = 0x50000;
354  fsr = 0;
355 
356  priContext = 0;
357  secContext = 0;
358  partId = 0;
359  lsuCtrlReg = 0;
360 
361  memset(scratchPad, 0, sizeof(scratchPad));
362 
363  cpu_mondo_head = 0;
364  cpu_mondo_tail = 0;
365  dev_mondo_head = 0;
366  dev_mondo_tail = 0;
367  res_error_head = 0;
368  res_error_tail = 0;
369  nres_error_head = 0;
370  nres_error_tail = 0;
371 
372  // If one of these events is active, it's not obvious to me how to get
373  // rid of it cleanly. For now we'll just assert that they're not.
374  if (tickCompare != NULL && sTickCompare != NULL && hSTickCompare != NULL)
375  panic("Tick comparison event active when clearing the ISA object.\n");
376 }
377 
378 RegVal
380 {
381 
382  // The three idxs are moved up from the switch statement
383  // due to more frequent calls.
384 
385  if (idx == MISCREG_GL)
386  return gl;
387  if (idx == MISCREG_CWP)
388  return cwp;
389  if (idx == MISCREG_TLB_DATA) {
390  /* Package up all the data for the tlb:
391  * 6666555555555544444444443333333333222222222211111111110000000000
392  * 3210987654321098765432109876543210987654321098765432109876543210
393  * secContext | priContext | |tl|partid| |||||^hpriv
394  * ||||^red
395  * |||^priv
396  * ||^am
397  * |^lsuim
398  * ^lsudm
399  */
400  return (uint64_t)hpstate.hpriv |
401  (uint64_t)hpstate.red << 1 |
402  (uint64_t)pstate.priv << 2 |
403  (uint64_t)pstate.am << 3 |
404  bits((uint64_t)lsuCtrlReg,3,2) << 4 |
405  bits((uint64_t)partId,7,0) << 8 |
406  bits((uint64_t)tl,2,0) << 16 |
407  (uint64_t)priContext << 32 |
408  (uint64_t)secContext << 48;
409  }
410 
411  switch (idx) {
412  // case MISCREG_TLB_DATA:
413  // [original contents see above]
414  // case MISCREG_Y:
415  // return y;
416  // case MISCREG_CCR:
417  // return ccr;
418  case MISCREG_ASI:
419  return asi;
420  case MISCREG_FPRS:
421  return fprs;
422  case MISCREG_TICK:
423  return tick;
424  case MISCREG_PCR:
425  panic("PCR not implemented\n");
426  case MISCREG_PIC:
427  panic("PIC not implemented\n");
428  case MISCREG_GSR:
429  return gsr;
430  case MISCREG_SOFTINT:
431  return softint;
432  case MISCREG_TICK_CMPR:
433  return tick_cmpr;
434  case MISCREG_STICK:
435  return stick;
436  case MISCREG_STICK_CMPR:
437  return stick_cmpr;
438 
440  case MISCREG_TPC:
441  return tpc[tl-1];
442  case MISCREG_TNPC:
443  return tnpc[tl-1];
444  case MISCREG_TSTATE:
445  return tstate[tl-1];
446  case MISCREG_TT:
447  return tt[tl-1];
448  case MISCREG_PRIVTICK:
449  panic("Priviliged access to tick registers not implemented\n");
450  case MISCREG_TBA:
451  return tba;
452  case MISCREG_PSTATE:
453  return (RegVal)pstate;
454  case MISCREG_TL:
455  return tl;
456  case MISCREG_PIL:
457  return pil;
458  // CWP, GL moved
459  // case MISCREG_CWP:
460  // return cwp;
461  // case MISCREG_CANSAVE:
462  // return cansave;
463  // case MISCREG_CANRESTORE:
464  // return canrestore;
465  // case MISCREG_CLEANWIN:
466  // return cleanwin;
467  // case MISCREG_OTHERWIN:
468  // return otherwin;
469  // case MISCREG_WSTATE:
470  // return wstate;
471  // case MISCREG_GL:
472  // return gl;
473 
475  case MISCREG_HPSTATE:
476  return (RegVal)hpstate;
477  case MISCREG_HTSTATE:
478  return htstate[tl-1];
479  case MISCREG_HINTP:
480  return hintp;
481  case MISCREG_HTBA:
482  return htba;
484  return strandStatusReg;
485  case MISCREG_HSTICK_CMPR:
486  return hstick_cmpr;
487 
489  case MISCREG_FSR:
490  DPRINTF(MiscRegs, "FSR read as: %#x\n", fsr);
491  return fsr;
492 
494  return priContext;
496  return secContext;
497  case MISCREG_MMU_PART_ID:
498  return partId;
500  return lsuCtrlReg;
501 
503  return scratchPad[0];
505  return scratchPad[1];
507  return scratchPad[2];
509  return scratchPad[3];
511  return scratchPad[4];
513  return scratchPad[5];
515  return scratchPad[6];
517  return scratchPad[7];
519  return cpu_mondo_head;
521  return cpu_mondo_tail;
523  return dev_mondo_head;
525  return dev_mondo_tail;
527  return res_error_head;
529  return res_error_tail;
531  return nres_error_head;
533  return nres_error_tail;
534  default:
535  panic("Miscellaneous register %d not implemented\n", idx);
536  }
537 }
538 
539 RegVal
541 {
542  switch (idx) {
543  // tick and stick are aliased to each other in niagra
544  // well store the tick data in stick and the interrupt bit in tick
545  case MISCREG_STICK:
546  case MISCREG_TICK:
547  case MISCREG_PRIVTICK:
548  // I'm not sure why legion ignores the lowest two bits, but we'll go
549  // with it
550  // change from curCycle() to instCount() until we're done with legion
551  DPRINTF(Timer, "Instruction Count when TICK read: %#X stick=%#X\n",
552  tc->getCpuPtr()->instCount(), stick);
553  return mbits(tc->getCpuPtr()->instCount() + (int64_t)stick,62,2) |
554  mbits(tick,63,63);
555  case MISCREG_FPRS:
556  // in legion if fp is enabled du and dl are set
557  return fprs | 0x3;
558  case MISCREG_PCR:
559  case MISCREG_PIC:
560  panic("Performance Instrumentation not impl\n");
561  case MISCREG_SOFTINT_CLR:
562  case MISCREG_SOFTINT_SET:
563  panic("Can read from softint clr/set\n");
564  case MISCREG_SOFTINT:
565  case MISCREG_TICK_CMPR:
566  case MISCREG_STICK_CMPR:
567  case MISCREG_HINTP:
568  case MISCREG_HTSTATE:
569  case MISCREG_HTBA:
570  case MISCREG_HVER:
572  case MISCREG_HSTICK_CMPR:
581  case MISCREG_HPSTATE:
582  return readFSReg(idx);
583  }
584  return readMiscRegNoEffect(idx);
585 }
586 
587 void
589 {
590  switch (idx) {
591 // case MISCREG_Y:
592 // y = val;
593 // break;
594 // case MISCREG_CCR:
595 // ccr = val;
596 // break;
597  case MISCREG_ASI:
598  asi = val;
599  break;
600  case MISCREG_FPRS:
601  fprs = val;
602  break;
603  case MISCREG_TICK:
604  tick = val;
605  break;
606  case MISCREG_PCR:
607  panic("PCR not implemented\n");
608  case MISCREG_PIC:
609  panic("PIC not implemented\n");
610  case MISCREG_GSR:
611  gsr = val;
612  break;
613  case MISCREG_SOFTINT:
614  softint = val;
615  break;
616  case MISCREG_TICK_CMPR:
617  tick_cmpr = val;
618  break;
619  case MISCREG_STICK:
620  stick = val;
621  break;
622  case MISCREG_STICK_CMPR:
623  stick_cmpr = val;
624  break;
625 
627  case MISCREG_TPC:
628  tpc[tl-1] = val;
629  break;
630  case MISCREG_TNPC:
631  tnpc[tl-1] = val;
632  break;
633  case MISCREG_TSTATE:
634  tstate[tl-1] = val;
635  break;
636  case MISCREG_TT:
637  tt[tl-1] = val;
638  break;
639  case MISCREG_PRIVTICK:
640  panic("Priviliged access to tick regesiters not implemented\n");
641  case MISCREG_TBA:
642  // clear lower 7 bits on writes.
643  tba = val & ~0x7FFFULL;
644  break;
645  case MISCREG_PSTATE:
646  pstate = (val & PstateMask);
647  break;
648  case MISCREG_TL:
649  tl = val;
650  break;
651  case MISCREG_PIL:
652  pil = val;
653  break;
654  case MISCREG_CWP:
655  cwp = val;
656  break;
657 // case MISCREG_CANSAVE:
658 // cansave = val;
659 // break;
660 // case MISCREG_CANRESTORE:
661 // canrestore = val;
662 // break;
663 // case MISCREG_CLEANWIN:
664 // cleanwin = val;
665 // break;
666 // case MISCREG_OTHERWIN:
667 // otherwin = val;
668 // break;
669 // case MISCREG_WSTATE:
670 // wstate = val;
671 // break;
672  case MISCREG_GL:
673  gl = val;
674  break;
675 
677  case MISCREG_HPSTATE:
678  hpstate = val;
679  break;
680  case MISCREG_HTSTATE:
681  htstate[tl-1] = val;
682  break;
683  case MISCREG_HINTP:
684  hintp = val;
685  break;
686  case MISCREG_HTBA:
687  htba = val;
688  break;
691  break;
692  case MISCREG_HSTICK_CMPR:
693  hstick_cmpr = val;
694  break;
695 
697  case MISCREG_FSR:
698  fsr = val;
699  DPRINTF(MiscRegs, "FSR written with: %#x\n", fsr);
700  break;
701 
703  priContext = val;
704  break;
706  secContext = val;
707  break;
708  case MISCREG_MMU_PART_ID:
709  partId = val;
710  break;
712  lsuCtrlReg = val;
713  break;
714 
716  scratchPad[0] = val;
717  break;
719  scratchPad[1] = val;
720  break;
722  scratchPad[2] = val;
723  break;
725  scratchPad[3] = val;
726  break;
728  scratchPad[4] = val;
729  break;
731  scratchPad[5] = val;
732  break;
734  scratchPad[6] = val;
735  break;
737  scratchPad[7] = val;
738  break;
741  break;
744  break;
747  break;
750  break;
753  break;
756  break;
759  break;
762  break;
763  default:
764  panic("Miscellaneous register %d not implemented\n", idx);
765  }
766 }
767 
768 void
770 {
771  RegVal new_val = val;
772 
773  switch (idx) {
774  case MISCREG_ASI:
775  tc->getDecoderPtr()->as<Decoder>().setContext(val);
776  break;
777  case MISCREG_STICK:
778  case MISCREG_TICK:
779  // stick and tick are same thing on niagra
780  // use stick for offset and tick for holding intrrupt bit
781  stick = mbits(val,62,0) - tc->getCpuPtr()->instCount();
782  tick = mbits(val,63,63);
783  DPRINTF(Timer, "Writing TICK=%#X\n", val);
784  break;
785  case MISCREG_FPRS:
786  // Configure the fpu based on the fprs
787  break;
788  case MISCREG_PCR:
789  // Set up performance counting based on pcr value
790  break;
791  case MISCREG_PSTATE:
792  pstate = val & PstateMask;
793  return;
794  case MISCREG_TL:
795  {
796  tl = val;
797  if (hpstate.tlz && tl == 0 && !hpstate.hpriv)
799  else
801  return;
802  }
803  case MISCREG_CWP:
804  new_val = val >= NWindows ? NWindows - 1 : val;
805  if (val >= NWindows)
806  new_val = NWindows - 1;
807 
809  installWindow(new_val - 1, NextWindowOffset);
810  installWindow(new_val + 1, PreviousWindowOffset);
811  break;
812  case MISCREG_GL:
816  break;
817  case MISCREG_PIL:
818  case MISCREG_SOFTINT:
819  case MISCREG_SOFTINT_SET:
820  case MISCREG_SOFTINT_CLR:
821  case MISCREG_TICK_CMPR:
822  case MISCREG_STICK_CMPR:
823  case MISCREG_HINTP:
824  case MISCREG_HTSTATE:
825  case MISCREG_HTBA:
826  case MISCREG_HVER:
828  case MISCREG_HSTICK_CMPR:
837  case MISCREG_HPSTATE:
838  setFSReg(idx, val);
839  return;
840  }
841  setMiscRegNoEffect(idx, new_val);
842 }
843 
844 void
846 {
885 
886  Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
888  tick_cmp = tickCompare->when();
890  stick_cmp = sTickCompare->when();
892  hstick_cmp = hSTickCompare->when();
893 
894  SERIALIZE_SCALAR(tick_cmp);
895  SERIALIZE_SCALAR(stick_cmp);
896  SERIALIZE_SCALAR(hstick_cmp);
897 }
898 
899 void
901 {
915  {
916  uint16_t pstate;
918  this->pstate = pstate;
919  }
924  reloadRegMap();
925  {
926  uint64_t hpstate;
928  this->hpstate = hpstate;
929  }
949 
950  Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
951  UNSERIALIZE_SCALAR(tick_cmp);
952  UNSERIALIZE_SCALAR(stick_cmp);
953  UNSERIALIZE_SCALAR(hstick_cmp);
954 
955  if (tick_cmp) {
956  tickCompare = new TickCompareEvent(*this);
957  schedule(tickCompare, tick_cmp);
958  }
959  if (stick_cmp) {
960  sTickCompare = new STickCompareEvent(*this);
961  schedule(sTickCompare, stick_cmp);
962  }
963  if (hstick_cmp) {
964  hSTickCompare = new HSTickCompareEvent(*this);
965  schedule(hSTickCompare, hstick_cmp);
966  }
967 }
968 
969 } // namespace SparcISA
970 } // namespace gem5
gem5::SparcISA::Decoder
Definition: decoder.hh:47
gem5::SparcISA::MISCREG_ASI
@ MISCREG_ASI
Ancillary State Registers.
Definition: misc.hh:47
gem5::SparcISA::MISCREG_TICK_CMPR
@ MISCREG_TICK_CMPR
Definition: misc.hh:56
gem5::SparcISA::miscRegClass
constexpr RegClass miscRegClass(MiscRegClass, MiscRegClassName, NumMiscRegs, debug::MiscRegs)
gem5::SparcISA::ISA::TotalWindowed
static const int TotalWindowed
Definition: isa.hh:151
gem5::SparcISA::ISA::fsr
uint64_t fsr
Floating point misc registers.
Definition: isa.hh:103
gem5::SparcISA::ISA::CurrentWindowOffset
@ CurrentWindowOffset
Definition: isa.hh:156
gem5::Event::when
Tick when() const
Get the time that the event is scheduled.
Definition: eventq.hh:501
misc.hh
gem5::BaseISA::tc
ThreadContext * tc
Definition: isa.hh:66
gem5::RegVal
uint64_t RegVal
Definition: types.hh:173
gem5::SparcISA::ISA::nres_error_head
uint64_t nres_error_head
Definition: isa.hh:119
gem5::SparcISA::ISA::installWindow
void installWindow(int cwp, int offset)
Definition: isa.cc:296
gem5::SparcISA::ISA::strandStatusReg
uint64_t strandStatusReg
Definition: isa.hh:100
gem5::SparcISA::intRegClass
constexpr RegClass intRegClass
Definition: int.hh:78
UNSERIALIZE_SCALAR
#define UNSERIALIZE_SCALAR(scalar)
Definition: serialize.hh:575
gem5::SparcISA::ISA::asi
uint8_t asi
Definition: isa.hh:62
gem5::VecElemClass
@ VecElemClass
Vector Register Native Elem lane.
Definition: reg_class.hh:65
gem5::VecRegClassName
constexpr char VecRegClassName[]
Definition: reg_class.hh:76
gem5::SparcISA::MISCREG_TT
@ MISCREG_TT
Definition: misc.hh:64
gem5::SparcISA::IT_TRAP_LEVEL_ZERO
@ IT_TRAP_LEVEL_ZERO
Definition: interrupts.hh:48
gem5::SparcISA::ISA::setFSReg
void setFSReg(int miscReg, RegVal val)
Definition: ua2005.cc:92
gem5::ThreadContext::getReg
virtual RegVal getReg(const RegId &reg) const
Definition: thread_context.cc:180
gem5::SparcISA::ISA::tnpc
uint64_t tnpc[MaxTL]
Definition: isa.hh:75
gem5::InstDecoder::as
Type & as()
Definition: decoder.hh:71
gem5::SparcISA::MISCREG_QUEUE_DEV_MONDO_HEAD
@ MISCREG_QUEUE_DEV_MONDO_HEAD
Definition: misc.hh:109
gem5::CCRegClass
@ CCRegClass
Condition-code register.
Definition: reg_class.hh:68
gem5::CheckpointIn
Definition: serialize.hh:68
gem5::ThreadContext::pcState
virtual const PCStateBase & pcState() const =0
gem5::SparcISA::ISA::stick
uint64_t stick
Definition: isa.hh:68
gem5::VecPredRegClassName
constexpr char VecPredRegClassName[]
Definition: reg_class.hh:78
gem5::SparcISA::ISA::hSTickCompare
HSTickCompareEvent * hSTickCompare
Definition: isa.hh:143
gem5::SparcISA::int_reg::NumRegs
const int NumRegs
Definition: int.hh:67
gem5::SparcISA::MISCREG_STICK
@ MISCREG_STICK
Definition: misc.hh:57
gem5::X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:776
gem5::SparcISA::MISCREG_QUEUE_NRES_ERROR_HEAD
@ MISCREG_QUEUE_NRES_ERROR_HEAD
Definition: misc.hh:113
gem5::SparcISA::ISA::NextGlobalsOffset
@ NextGlobalsOffset
Definition: isa.hh:158
gem5::SparcISA::ISA::readFSReg
RegVal readFSReg(int miscReg)
Definition: ua2005.cc:248
gem5::SparcISA::MISCREG_SOFTINT_SET
@ MISCREG_SOFTINT_SET
Definition: misc.hh:53
gem5::SparcISA::ISA::tl
uint8_t tl
Definition: isa.hh:83
gem5::SparcISA::ISA::PreviousGlobalsOffset
@ PreviousGlobalsOffset
Definition: isa.hh:160
gem5::EventManager::schedule
void schedule(Event &event, Tick when)
Definition: eventq.hh:1012
gem5::SparcISA::ISA::cwp
uint8_t cwp
Definition: isa.hh:85
gem5::SparcISA::ISA::tt
uint16_t tt[MaxTL]
Definition: isa.hh:78
gem5::SparcISA::ISA::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: isa.cc:845
gem5::SparcISA::ISA::CurrentGlobalsOffset
@ CurrentGlobalsOffset
Definition: isa.hh:155
gem5::mbits
constexpr T mbits(T val, unsigned first, unsigned last)
Mask off the given bits in place like bits() but without shifting.
Definition: bitfield.hh:103
gem5::SparcISA::ISA::copyRegsFrom
void copyRegsFrom(ThreadContext *src) override
Definition: isa.cc:232
gem5::SparcISA::MaxTL
const int MaxTL
Definition: sparc_traits.hh:39
gem5::SparcISA::ISA::tpc
uint64_t tpc[MaxTL]
Definition: isa.hh:73
gem5::SparcISA::ISA::hstick_cmpr
uint64_t hstick_cmpr
Definition: isa.hh:98
gem5::BaseCPU::instCount
Tick instCount()
Definition: base.hh:221
gem5::SparcISA::MISCREG_HVER
@ MISCREG_HVER
Definition: misc.hh:83
gem5::SparcISA::MISCREG_HPSTATE
@ MISCREG_HPSTATE
Hyper privileged registers.
Definition: misc.hh:79
gem5::SparcISA::ISA::res_error_head
uint64_t res_error_head
Definition: isa.hh:117
gem5::SparcISA::ISA::installGlobals
void installGlobals(int gl, int offset)
Definition: isa.cc:306
gem5::ArmISA::i
Bitfield< 7 > i
Definition: misc_types.hh:67
gem5::SparcISA::MISCREG_FPRS
@ MISCREG_FPRS
Definition: misc.hh:49
gem5::SparcISA::MISCREG_HINTP
@ MISCREG_HINTP
Definition: misc.hh:81
gem5::SparcISA::ISA::lsuCtrlReg
uint64_t lsuCtrlReg
Definition: isa.hh:109
gem5::SparcISA::ISA::scratchPad
uint64_t scratchPad[8]
Definition: isa.hh:111
gem5::VecPredRegClass
@ VecPredRegClass
Definition: reg_class.hh:66
gem5::mask
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
Definition: bitfield.hh:63
gem5::SparcISA::ISA::NumGlobalRegs
static const int NumGlobalRegs
Definition: isa.hh:145
gem5::SparcISA::MISCREG_SCRATCHPAD_R4
@ MISCREG_SCRATCHPAD_R4
Definition: misc.hh:101
gem5::SparcISA::ISA::res_error_tail
uint64_t res_error_tail
Definition: isa.hh:118
gem5::SparcISA::ISA::tstate
uint64_t tstate[MaxTL]
Definition: isa.hh:77
gem5::SparcISA::ISA::htba
uint64_t htba
Definition: isa.hh:97
gem5::SparcISA::ISA::nres_error_tail
uint64_t nres_error_tail
Definition: isa.hh:120
gem5::SparcISA::MISCREG_HSTICK_CMPR
@ MISCREG_HSTICK_CMPR
Definition: misc.hh:85
gem5::SparcISA::ISA::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: isa.cc:900
gem5::SparcISA::ISA::fprs
uint8_t fprs
Definition: isa.hh:64
gem5::SparcISA::ISA::clear
void clear() override
Definition: isa.cc:316
gem5::SparcISA::ISA::PreviousWindowOffset
@ PreviousWindowOffset
Definition: isa.hh:161
gem5::SparcISA::ISA::HSTickCompareEvent
MemberEventWrapper<&ISA::processHSTickCompare > HSTickCompareEvent
Definition: isa.hh:142
gem5::SparcISA::MISCREG_SCRATCHPAD_R1
@ MISCREG_SCRATCHPAD_R1
Definition: misc.hh:98
gem5::BaseISA::_regClasses
RegClasses _regClasses
Definition: isa.hh:68
gem5::SparcISA::ISA::gsr
uint64_t gsr
Definition: isa.hh:65
gem5::SparcISA::MISCREG_MMU_PART_ID
@ MISCREG_MMU_PART_ID
Definition: misc.hh:93
gem5::SparcISA::MISCREG_PRIVTICK
@ MISCREG_PRIVTICK
Definition: misc.hh:65
gem5::SparcISA::ISA::readMiscRegNoEffect
RegVal readMiscRegNoEffect(RegIndex idx) const override
Definition: isa.cc:379
gem5::SparcISA::ISA::gl
uint8_t gl
Definition: isa.hh:91
bitfield.hh
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
gem5::VegaISA::p
Bitfield< 54 > p
Definition: pagetable.hh:70
gem5::MatRegClass
@ MatRegClass
Matrix Register.
Definition: reg_class.hh:67
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:210
gem5::SparcISA::ISA::RegsPerWindow
static const int RegsPerWindow
Definition: isa.hh:150
gem5::SparcISA::MISCREG_TL
@ MISCREG_TL
Definition: misc.hh:68
gem5::ThreadContext::getDecoderPtr
virtual InstDecoder * getDecoderPtr()=0
asi.hh
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::VegaISA::x
Bitfield< 4 > x
Definition: pagetable.hh:61
gem5::SparcISA::MISCREG_MMU_S_CONTEXT
@ MISCREG_MMU_S_CONTEXT
Definition: misc.hh:92
gem5::SparcISA::MISCREG_QUEUE_DEV_MONDO_TAIL
@ MISCREG_QUEUE_DEV_MONDO_TAIL
Definition: misc.hh:110
gem5::SparcISA::ISA::readMiscReg
RegVal readMiscReg(RegIndex idx) override
Definition: isa.cc:540
gem5::BaseCPU::clearInterrupt
void clearInterrupt(ThreadID tid, int int_num, int index)
Definition: base.hh:242
gem5::SparcISA::MISCREG_TSTATE
@ MISCREG_TSTATE
Definition: misc.hh:63
gem5::SparcISA::MISCREG_SCRATCHPAD_R7
@ MISCREG_SCRATCHPAD_R7
Definition: misc.hh:104
gem5::SparcISA::int_reg::NumArchRegs
@ NumArchRegs
Definition: int.hh:52
gem5::SparcISA::copyMiscRegs
static void copyMiscRegs(ThreadContext *src, ThreadContext *dest)
Definition: isa.cc:97
float.hh
gem5::SparcISA::MISCREG_QUEUE_CPU_MONDO_TAIL
@ MISCREG_QUEUE_CPU_MONDO_TAIL
Definition: misc.hh:108
gem5::MatRegClassName
constexpr char MatRegClassName[]
Definition: reg_class.hh:79
gem5::SparcISA::ISA::tickCompare
TickCompareEvent * tickCompare
Definition: isa.hh:137
gem5::ArmISA::offset
Bitfield< 23, 0 > offset
Definition: types.hh:144
int.hh
gem5::SparcISA::MISCREG_QUEUE_RES_ERROR_HEAD
@ MISCREG_QUEUE_RES_ERROR_HEAD
Definition: misc.hh:111
gem5::bits
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition: bitfield.hh:76
SERIALIZE_ARRAY
#define SERIALIZE_ARRAY(member, size)
Definition: serialize.hh:610
gem5::SparcISA::ISA::hpstate
HPSTATE hpstate
Hyperprivileged Registers.
Definition: isa.hh:94
gem5::ThreadContext::readMiscRegNoEffect
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
gem5::VecElemClassName
constexpr char VecElemClassName[]
Definition: reg_class.hh:77
gem5::BaseCPU::postInterrupt
void postInterrupt(ThreadID tid, int int_num, int index)
Definition: base.cc:231
gem5::SparcISA::ISA::dev_mondo_head
uint64_t dev_mondo_head
Definition: isa.hh:115
gem5::SparcISA::ISA::ISA
ISA(const Params &p)
Definition: isa.cc:82
gem5::SparcISA::ISA::tba
uint64_t tba
Definition: isa.hh:80
gem5::SparcISA::MISCREG_PCR
@ MISCREG_PCR
Definition: misc.hh:50
gem5::RegClass
Definition: reg_class.hh:184
gem5::SparcISA::ISA::secContext
uint16_t secContext
Definition: isa.hh:107
gem5::SparcISA::ISA::softint
uint64_t softint
Definition: isa.hh:66
SERIALIZE_SCALAR
#define SERIALIZE_SCALAR(scalar)
Definition: serialize.hh:568
gem5::SparcISA::ISA::priContext
uint16_t priContext
MMU Internal Registers.
Definition: isa.hh:106
gem5::SparcISA::MISCREG_SCRATCHPAD_R5
@ MISCREG_SCRATCHPAD_R5
Definition: misc.hh:102
gem5::CCRegClassName
constexpr char CCRegClassName[]
Definition: reg_class.hh:80
gem5::ArmISA::vecRegClass
constexpr RegClass vecRegClass
Definition: vec.hh:101
gem5::SparcISA::flatIntRegClass
constexpr RegClass flatIntRegClass
Definition: int.hh:83
gem5::SparcISA::ISA::TotalGlobals
static const int TotalGlobals
Definition: isa.hh:149
gem5::SparcISA::ISA::hintp
uint64_t hintp
Definition: isa.hh:96
gem5::X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:92
gem5::SparcISA::MISCREG_QUEUE_CPU_MONDO_HEAD
@ MISCREG_QUEUE_CPU_MONDO_HEAD
Definition: misc.hh:107
gem5::SparcISA::MISCREG_QUEUE_NRES_ERROR_TAIL
@ MISCREG_QUEUE_NRES_ERROR_TAIL
Definition: misc.hh:114
gem5::SparcISA::ISA::NextWindowOffset
@ NextWindowOffset
Definition: isa.hh:159
gem5::SparcISA::ISA::TickCompareEvent
MemberEventWrapper<&ISA::processTickCompare > TickCompareEvent
Definition: isa.hh:136
gem5::SparcISA::MISCREG_GSR
@ MISCREG_GSR
Definition: misc.hh:52
gem5::SparcISA::NWindows
const int NWindows
Definition: sparc_traits.hh:44
gem5::SparcISA::MISCREG_HTBA
@ MISCREG_HTBA
Definition: misc.hh:82
gem5::SparcISA::MISCREG_TNPC
@ MISCREG_TNPC
Definition: misc.hh:62
gem5::SparcISA::ISA::reloadRegMap
void reloadRegMap()
Definition: isa.cc:282
gem5::SparcISA::ISA::pil
uint8_t pil
Definition: isa.hh:84
gem5::SparcISA::MISCREG_TICK
@ MISCREG_TICK
Definition: misc.hh:48
gem5::ArmISA::vecElemClass
constexpr RegClass vecElemClass
Definition: vec.hh:105
gem5::SparcISA::MISCREG_TBA
@ MISCREG_TBA
Definition: misc.hh:66
base.hh
UNSERIALIZE_ARRAY
#define UNSERIALIZE_ARRAY(member, size)
Definition: serialize.hh:618
gem5::SparcISA::MISCREG_FSR
@ MISCREG_FSR
Floating Point Status Register.
Definition: misc.hh:88
decoder.hh
gem5::ThreadContext::setMiscReg
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
gem5::SparcISA::MaxGL
const int MaxGL
Definition: sparc_traits.hh:40
gem5::MipsISA::tl
Bitfield< 23, 20 > tl
Definition: pra_constants.hh:254
interrupts.hh
gem5::SparcISA::MISCREG_PSTATE
@ MISCREG_PSTATE
Definition: misc.hh:67
gem5::SparcISA::ISA::tick_cmpr
uint64_t tick_cmpr
Definition: isa.hh:67
gem5::SparcISA::float_reg::NumArchRegs
const int NumArchRegs
Definition: float.hh:45
gem5::SparcISA::MISCREG_SCRATCHPAD_R3
@ MISCREG_SCRATCHPAD_R3
Definition: misc.hh:100
gem5::SparcISA::ISA::setMiscRegNoEffect
void setMiscRegNoEffect(RegIndex idx, RegVal val) override
Definition: isa.cc:588
gem5::SparcISA::ISA::dev_mondo_tail
uint64_t dev_mondo_tail
Definition: isa.hh:116
gem5::CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:66
gem5::SparcISA::ISA::partId
uint16_t partId
Definition: isa.hh:108
gem5::ThreadContext::getCpuPtr
virtual BaseCPU * getCpuPtr()=0
gem5::SparcISA::ISA::NumWindowedRegs
static const int NumWindowedRegs
Definition: isa.hh:146
gem5::SparcISA::MISCREG_TLB_DATA
@ MISCREG_TLB_DATA
Definition: misc.hh:117
gem5::SparcISA::MISCREG_SOFTINT_CLR
@ MISCREG_SOFTINT_CLR
Definition: misc.hh:54
trace.hh
gem5::SparcISA::MISCREG_HTSTATE
@ MISCREG_HTSTATE
Definition: misc.hh:80
gem5::SparcISA::ISA::stick_cmpr
uint64_t stick_cmpr
Definition: isa.hh:69
gem5::SparcISA::ISA::setMiscReg
void setMiscReg(RegIndex idx, RegVal val) override
Definition: isa.cc:769
gem5::SparcISA::MISCREG_PIL
@ MISCREG_PIL
Definition: misc.hh:69
gem5::SparcISA::MISCREG_STRAND_STS_REG
@ MISCREG_STRAND_STS_REG
Definition: misc.hh:84
gem5::VecRegClass
@ VecRegClass
Vector Register.
Definition: reg_class.hh:63
gem5::SparcISA::MISCREG_CWP
@ MISCREG_CWP
Definition: misc.hh:70
gem5::SparcISA::ISA::intRegMap
RegIndex intRegMap[TotalInstIntRegs]
Definition: isa.hh:165
gem5::ArmISA::vecPredRegClass
constexpr RegClass vecPredRegClass
Definition: vec.hh:109
gem5::BaseISA
Definition: isa.hh:58
gem5::RegIndex
uint16_t RegIndex
Definition: types.hh:176
gem5::SparcISA::ISA::tick
uint64_t tick
Definition: isa.hh:63
gem5::SparcISA::MISCREG_SCRATCHPAD_R6
@ MISCREG_SCRATCHPAD_R6
Definition: misc.hh:103
gem5::SparcISA::MISCREG_GL
@ MISCREG_GL
Definition: misc.hh:76
gem5::SparcISA::floatRegClass
constexpr RegClass floatRegClass(FloatRegClass, FloatRegClassName, float_reg::NumRegs, debug::FloatRegs)
gem5::SparcISA::MISCREG_TPC
@ MISCREG_TPC
Privilged Registers.
Definition: misc.hh:61
gem5::SparcISA::MISCREG_MMU_LSU_CTRL
@ MISCREG_MMU_LSU_CTRL
Definition: misc.hh:94
gem5::SparcISA::MISCREG_PIC
@ MISCREG_PIC
Definition: misc.hh:51
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::SparcISA::int_reg::NumMicroRegs
@ NumMicroRegs
Definition: int.hh:64
gem5::SparcISA::ISA::MicroIntOffset
@ MicroIntOffset
Definition: isa.hh:157
gem5::SparcISA::ISA::STickCompareEvent
MemberEventWrapper<&ISA::processSTickCompare > STickCompareEvent
Definition: isa.hh:139
gem5::ArmISA::matRegClass
constexpr RegClass matRegClass
Definition: mat.hh:92
gem5::SparcISA::ISA::sTickCompare
STickCompareEvent * sTickCompare
Definition: isa.hh:140
gem5::SparcISA::ISA::cpu_mondo_head
uint64_t cpu_mondo_head
Definition: isa.hh:113
gem5::SparcISA::PstateMask
static const PSTATE PstateMask
Definition: isa.cc:67
gem5::SparcISA::buildPstateMask
static PSTATE buildPstateMask()
Definition: isa.cc:53
sparc_traits.hh
gem5::SparcISA::MISCREG_STICK_CMPR
@ MISCREG_STICK_CMPR
Definition: misc.hh:58
gem5::SparcISA::ISA::pstate
PSTATE pstate
Definition: isa.hh:82
gem5::ArmISA::ccRegClass
constexpr RegClass ccRegClass
Definition: cc.hh:87
gem5::SparcISA::MISCREG_MMU_P_CONTEXT
@ MISCREG_MMU_P_CONTEXT
MMU Internal Registers.
Definition: misc.hh:91
gem5::SparcISA::ISA::cpu_mondo_tail
uint64_t cpu_mondo_tail
Definition: isa.hh:114
isa.hh
thread_context.hh
gem5::SparcISA::MISCREG_SOFTINT
@ MISCREG_SOFTINT
Definition: misc.hh:55
gem5::Event::scheduled
bool scheduled() const
Determine if the current event is scheduled.
Definition: eventq.hh:458
gem5::SparcISA::MISCREG_SCRATCHPAD_R0
@ MISCREG_SCRATCHPAD_R0
Scratchpad regiscers.
Definition: misc.hh:97
gem5::RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:92
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:188
gem5::SparcISA::MISCREG_SCRATCHPAD_R2
@ MISCREG_SCRATCHPAD_R2
Definition: misc.hh:99
gem5::ThreadContext::setMiscRegNoEffect
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
gem5::SparcISA::ISA::htstate
uint64_t htstate[MaxTL]
Definition: isa.hh:95
gem5::SparcISA::MISCREG_QUEUE_RES_ERROR_TAIL
@ MISCREG_QUEUE_RES_ERROR_TAIL
Definition: misc.hh:112
gem5::ThreadContext::setReg
virtual void setReg(const RegId &reg, RegVal val)
Definition: thread_context.cc:188
gem5::SparcISA::ISA::Params
SparcISAParams Params
Definition: isa.hh:203

Generated on Sun Jul 30 2023 01:56:46 for gem5 by doxygen 1.8.17