gem5  v20.1.0.0
exec_context.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2014, 2016-2018, 2020 ARM Limited
3  * Copyright (c) 2013 Advanced Micro Devices, Inc.
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) 2002-2005 The Regents of The University of Michigan
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 
48 #ifndef __CPU_MINOR_EXEC_CONTEXT_HH__
49 #define __CPU_MINOR_EXEC_CONTEXT_HH__
50 
51 #include "cpu/exec_context.hh"
52 #include "cpu/minor/execute.hh"
53 #include "cpu/minor/pipeline.hh"
54 #include "cpu/base.hh"
55 #include "cpu/simple_thread.hh"
56 #include "mem/request.hh"
57 #include "debug/MinorExecute.hh"
58 
59 namespace Minor
60 {
61 
62 /* Forward declaration of Execute */
63 class Execute;
64 
69 class ExecContext : public ::ExecContext
70 {
71  public:
73 
76 
79 
82 
84  MinorCPU &cpu_,
85  SimpleThread &thread_, Execute &execute_,
86  MinorDynInstPtr inst_) :
87  cpu(cpu_),
88  thread(thread_),
89  execute(execute_),
90  inst(inst_)
91  {
92  DPRINTF(MinorExecute, "ExecContext setting PC: %s\n", inst->pc);
93  pcState(inst->pc);
94  setPredicate(inst->readPredicate());
95  setMemAccPredicate(inst->readMemAccPredicate());
97  }
98 
100  {
101  inst->setPredicate(readPredicate());
102  inst->setMemAccPredicate(readMemAccPredicate());
103  }
104 
105  Fault
106  initiateMemRead(Addr addr, unsigned int size,
107  Request::Flags flags,
108  const std::vector<bool>& byte_enable =
109  std::vector<bool>()) override
110  {
111  assert(byte_enable.empty() || byte_enable.size() == size);
112  return execute.getLSQ().pushRequest(inst, true /* load */, nullptr,
113  size, addr, flags, nullptr, nullptr, byte_enable);
114  }
115 
116  Fault
118  {
119  panic("ExecContext::initiateHtmCmd() not implemented on MinorCPU\n");
120  return NoFault;
121  }
122 
123  Fault
124  writeMem(uint8_t *data, unsigned int size, Addr addr,
125  Request::Flags flags, uint64_t *res,
126  const std::vector<bool>& byte_enable = std::vector<bool>())
127  override
128  {
129  assert(byte_enable.empty() || byte_enable.size() == size);
130  return execute.getLSQ().pushRequest(inst, false /* store */, data,
131  size, addr, flags, res, nullptr, byte_enable);
132  }
133 
134  Fault
135  initiateMemAMO(Addr addr, unsigned int size, Request::Flags flags,
136  AtomicOpFunctorPtr amo_op) override
137  {
138  // AMO requests are pushed through the store path
139  return execute.getLSQ().pushRequest(inst, false /* amo */, nullptr,
140  size, addr, flags, nullptr, std::move(amo_op));
141  }
142 
143  RegVal
144  readIntRegOperand(const StaticInst *si, int idx) override
145  {
146  const RegId& reg = si->srcRegIdx(idx);
147  assert(reg.isIntReg());
148  return thread.readIntReg(reg.index());
149  }
150 
151  RegVal
152  readFloatRegOperandBits(const StaticInst *si, int idx) override
153  {
154  const RegId& reg = si->srcRegIdx(idx);
155  assert(reg.isFloatReg());
156  return thread.readFloatReg(reg.index());
157  }
158 
160  readVecRegOperand(const StaticInst *si, int idx) const override
161  {
162  const RegId& reg = si->srcRegIdx(idx);
163  assert(reg.isVecReg());
164  return thread.readVecReg(reg);
165  }
166 
168  getWritableVecRegOperand(const StaticInst *si, int idx) override
169  {
170  const RegId& reg = si->destRegIdx(idx);
171  assert(reg.isVecReg());
172  return thread.getWritableVecReg(reg);
173  }
174 
176  readVecElemOperand(const StaticInst *si, int idx) const override
177  {
178  const RegId& reg = si->srcRegIdx(idx);
179  assert(reg.isVecElem());
180  return thread.readVecElem(reg);
181  }
182 
184  readVecPredRegOperand(const StaticInst *si, int idx) const override
185  {
186  const RegId& reg = si->srcRegIdx(idx);
187  assert(reg.isVecPredReg());
188  return thread.readVecPredReg(reg);
189  }
190 
192  getWritableVecPredRegOperand(const StaticInst *si, int idx) override
193  {
194  const RegId& reg = si->destRegIdx(idx);
195  assert(reg.isVecPredReg());
197  }
198 
199  void
200  setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
201  {
202  const RegId& reg = si->destRegIdx(idx);
203  assert(reg.isIntReg());
204  thread.setIntReg(reg.index(), val);
205  }
206 
207  void
208  setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
209  {
210  const RegId& reg = si->destRegIdx(idx);
211  assert(reg.isFloatReg());
212  thread.setFloatReg(reg.index(), val);
213  }
214 
215  void
216  setVecRegOperand(const StaticInst *si, int idx,
217  const TheISA::VecRegContainer& val) override
218  {
219  const RegId& reg = si->destRegIdx(idx);
220  assert(reg.isVecReg());
222  }
223 
224  void
226  const TheISA::VecPredRegContainer& val) override
227  {
228  const RegId& reg = si->destRegIdx(idx);
229  assert(reg.isVecPredReg());
231  }
232 
237  readVec8BitLaneOperand(const StaticInst *si, int idx) const
238  override
239  {
240  const RegId& reg = si->srcRegIdx(idx);
241  assert(reg.isVecReg());
242  return thread.readVec8BitLaneReg(reg);
243  }
244 
247  readVec16BitLaneOperand(const StaticInst *si, int idx) const
248  override
249  {
250  const RegId& reg = si->srcRegIdx(idx);
251  assert(reg.isVecReg());
253  }
254 
257  readVec32BitLaneOperand(const StaticInst *si, int idx) const
258  override
259  {
260  const RegId& reg = si->srcRegIdx(idx);
261  assert(reg.isVecReg());
263  }
264 
267  readVec64BitLaneOperand(const StaticInst *si, int idx) const
268  override
269  {
270  const RegId& reg = si->srcRegIdx(idx);
271  assert(reg.isVecReg());
273  }
274 
276  template <typename LD>
277  void
278  setVecLaneOperandT(const StaticInst *si, int idx, const LD& val)
279  {
280  const RegId& reg = si->destRegIdx(idx);
281  assert(reg.isVecReg());
282  return thread.setVecLane(reg, val);
283  }
284  virtual void
285  setVecLaneOperand(const StaticInst *si, int idx,
286  const LaneData<LaneSize::Byte>& val) override
287  {
288  setVecLaneOperandT(si, idx, val);
289  }
290  virtual void
291  setVecLaneOperand(const StaticInst *si, int idx,
292  const LaneData<LaneSize::TwoByte>& val) override
293  {
294  setVecLaneOperandT(si, idx, val);
295  }
296  virtual void
297  setVecLaneOperand(const StaticInst *si, int idx,
298  const LaneData<LaneSize::FourByte>& val) override
299  {
300  setVecLaneOperandT(si, idx, val);
301  }
302  virtual void
303  setVecLaneOperand(const StaticInst *si, int idx,
304  const LaneData<LaneSize::EightByte>& val) override
305  {
306  setVecLaneOperandT(si, idx, val);
307  }
310  void
311  setVecElemOperand(const StaticInst *si, int idx,
312  const TheISA::VecElem val) override
313  {
314  const RegId& reg = si->destRegIdx(idx);
315  assert(reg.isVecElem());
317  }
318 
319  bool
320  readPredicate() const override
321  {
322  return thread.readPredicate();
323  }
324 
325  void
326  setPredicate(bool val) override
327  {
329  }
330 
331  bool
332  readMemAccPredicate() const override
333  {
334  return thread.readMemAccPredicate();
335  }
336 
337  void
338  setMemAccPredicate(bool val) override
339  {
341  }
342 
343  // hardware transactional memory
344  uint64_t
345  getHtmTransactionUid() const override
346  {
347  panic("ExecContext::getHtmTransactionUid() not"
348  "implemented on MinorCPU\n");
349  return 0;
350  }
351 
352  uint64_t
353  newHtmTransactionUid() const override
354  {
355  panic("ExecContext::newHtmTransactionUid() not"
356  "implemented on MinorCPU\n");
357  return 0;
358  }
359 
360  bool
361  inHtmTransactionalState() const override
362  {
363  // ExecContext::inHtmTransactionalState() not
364  // implemented on MinorCPU
365  return false;
366  }
367 
368  uint64_t
369  getHtmTransactionalDepth() const override
370  {
371  panic("ExecContext::getHtmTransactionalDepth() not"
372  "implemented on MinorCPU\n");
373  return 0;
374  }
375 
377  pcState() const override
378  {
379  return thread.pcState();
380  }
381 
382  void
383  pcState(const TheISA::PCState &val) override
384  {
385  thread.pcState(val);
386  }
387 
388  RegVal
389  readMiscRegNoEffect(int misc_reg) const
390  {
391  return thread.readMiscRegNoEffect(misc_reg);
392  }
393 
394  RegVal
395  readMiscReg(int misc_reg) override
396  {
397  return thread.readMiscReg(misc_reg);
398  }
399 
400  void
401  setMiscReg(int misc_reg, RegVal val) override
402  {
403  thread.setMiscReg(misc_reg, val);
404  }
405 
406  RegVal
407  readMiscRegOperand(const StaticInst *si, int idx) override
408  {
409  const RegId& reg = si->srcRegIdx(idx);
410  assert(reg.isMiscReg());
411  return thread.readMiscReg(reg.index());
412  }
413 
414  void
415  setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
416  {
417  const RegId& reg = si->destRegIdx(idx);
418  assert(reg.isMiscReg());
419  return thread.setMiscReg(reg.index(), val);
420  }
421 
422  void syscall() override { thread.syscall(); }
423 
424  ThreadContext *tcBase() const override { return thread.getTC(); }
425 
426  /* @todo, should make stCondFailures persistent somewhere */
427  unsigned int readStCondFailures() const override { return 0; }
428  void setStCondFailures(unsigned int st_cond_failures) override {}
429 
431  /* ISA-specific (or at least currently ISA singleton) functions */
432 
433  /* X86: TLB twiddling */
434  void
435  demapPage(Addr vaddr, uint64_t asn) override
436  {
437  thread.getITBPtr()->demapPage(vaddr, asn);
438  thread.getDTBPtr()->demapPage(vaddr, asn);
439  }
440 
441  RegVal
442  readCCRegOperand(const StaticInst *si, int idx) override
443  {
444  const RegId& reg = si->srcRegIdx(idx);
445  assert(reg.isCCReg());
446  return thread.readCCReg(reg.index());
447  }
448 
449  void
450  setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
451  {
452  const RegId& reg = si->destRegIdx(idx);
453  assert(reg.isCCReg());
454  thread.setCCReg(reg.index(), val);
455  }
456 
457  void
458  demapInstPage(Addr vaddr, uint64_t asn)
459  {
460  thread.getITBPtr()->demapPage(vaddr, asn);
461  }
462 
463  void
464  demapDataPage(Addr vaddr, uint64_t asn)
465  {
466  thread.getDTBPtr()->demapPage(vaddr, asn);
467  }
468 
469  BaseCPU *getCpuPtr() { return &cpu; }
470 
471  public:
472  // monitor/mwait funtions
473  void armMonitor(Addr address) override
474  { getCpuPtr()->armMonitor(inst->id.threadId, address); }
475 
476  bool mwait(PacketPtr pkt) override
477  { return getCpuPtr()->mwait(inst->id.threadId, pkt); }
478 
479  void mwaitAtomic(ThreadContext *tc) override
480  { return getCpuPtr()->mwaitAtomic(inst->id.threadId, tc, thread.dtb); }
481 
483  { return getCpuPtr()->getCpuAddrMonitor(inst->id.threadId); }
484 };
485 
486 }
487 
488 #endif /* __CPU_MINOR_EXEC_CONTEXT_HH__ */
BaseCPU::mwait
bool mwait(ThreadID tid, PacketPtr pkt)
Definition: base.cc:212
AtomicOpFunctorPtr
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:239
Minor::ExecContext::readVec32BitLaneOperand
ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
Definition: exec_context.hh:257
SimpleThread::contextId
ContextID contextId() const override
Definition: simple_thread.hh:216
SimpleThread::pcState
TheISA::PCState pcState() const override
Definition: simple_thread.hh:517
SimpleThread::setMemAccPredicate
void setMemAccPredicate(bool val)
Definition: simple_thread.hh:571
Minor::ExecContext::getWritableVecRegOperand
TheISA::VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Gets destination vector register operand for modification.
Definition: exec_context.hh:168
SimpleThread::setVecReg
void setVecReg(const RegId &reg, const VecRegContainer &val) override
Definition: simple_thread.hh:478
data
const char data[]
Definition: circlebuf.test.cc:42
Minor::ExecContext::readIntRegOperand
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
Definition: exec_context.hh:144
ArmISA::VecRegContainer
VecReg::Container VecRegContainer
Definition: registers.hh:71
SimpleThread::readVecReg
const VecRegContainer & readVecReg(const RegId &reg) const override
Definition: simple_thread.hh:308
Minor::ExecContext::contextId
ContextID contextId()
Definition: exec_context.hh:430
Minor::ExecContext::readVecElemOperand
TheISA::VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Vector Elem Interfaces.
Definition: exec_context.hh:176
Minor::ExecContext::readCCRegOperand
RegVal readCCRegOperand(const StaticInst *si, int idx) override
Definition: exec_context.hh:442
Minor::ExecContext::readVec16BitLaneOperand
ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
Definition: exec_context.hh:247
Minor::ExecContext::inHtmTransactionalState
bool inHtmTransactionalState() const override
Definition: exec_context.hh:361
SimpleThread::getITBPtr
BaseTLB * getITBPtr() override
Definition: simple_thread.hh:219
StaticInst
Base, ISA-independent static instruction class.
Definition: static_inst.hh:85
SimpleThread::readVec8BitLaneReg
virtual ConstVecLane8 readVec8BitLaneReg(const RegId &reg) const override
Reads source vector 8bit operand.
Definition: simple_thread.hh:346
Flags< FlagsType >
Minor::ExecContext::newHtmTransactionUid
uint64_t newHtmTransactionUid() const override
Definition: exec_context.hh:353
Minor::ExecContext::inst
MinorDynInstPtr inst
Instruction for the benefit of memory operations and for PC.
Definition: exec_context.hh:81
Minor::ExecContext::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector operand.
Definition: exec_context.hh:285
ArmISA::si
Bitfield< 6 > si
Definition: miscregs_types.hh:766
ContextID
int ContextID
Globally unique thread context ID.
Definition: types.hh:231
SimpleThread::getWritableVecReg
VecRegContainer & getWritableVecReg(const RegId &reg) override
Definition: simple_thread.hh:319
Minor::ExecContext::setVecPredRegOperand
void setVecPredRegOperand(const StaticInst *si, int idx, const TheISA::VecPredRegContainer &val) override
Definition: exec_context.hh:225
SimpleThread::readMiscRegNoEffect
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
Definition: simple_thread.hh:533
SimpleThread::setPredicate
void setPredicate(bool val)
Definition: simple_thread.hh:530
Minor::ExecContext::readMiscRegNoEffect
RegVal readMiscRegNoEffect(int misc_reg) const
Definition: exec_context.hh:389
SimpleThread::readVec16BitLaneReg
virtual ConstVecLane16 readVec16BitLaneReg(const RegId &reg) const override
Reads source vector 16bit operand.
Definition: simple_thread.hh:353
BaseCPU::armMonitor
void armMonitor(ThreadID tid, Addr address)
Definition: base.cc:200
ArmISA::VecPredRegContainer
VecPredReg::Container VecPredRegContainer
Definition: registers.hh:77
Minor::ExecContext::mwaitAtomic
void mwaitAtomic(ThreadContext *tc) override
Definition: exec_context.hh:479
SimpleThread::setIntReg
void setIntReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:455
SimpleThread::setCCReg
void setCCReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:508
Minor::LSQ::pushRequest
Fault pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, AtomicOpFunctorPtr amo_op, const std::vector< bool > &byte_enable=std::vector< bool >())
Single interface for readMem/writeMem/amoMem to issue requests into the LSQ.
Definition: lsq.cc:1586
Minor::ExecContext::tcBase
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
Definition: exec_context.hh:424
SimpleThread::readVec64BitLaneReg
virtual ConstVecLane64 readVec64BitLaneReg(const RegId &reg) const override
Reads source vector 64bit operand.
Definition: simple_thread.hh:367
Minor::ExecContext::readVec64BitLaneOperand
ConstVecLane64 readVec64BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 64bit operand.
Definition: exec_context.hh:267
BaseCPU::mwaitAtomic
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseTLB *dtb)
Definition: base.cc:235
std::vector< bool >
Minor::ExecContext::setMiscReg
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
Definition: exec_context.hh:401
Minor::ExecContext::execute
Execute & execute
The execute stage so we can peek at its contents.
Definition: exec_context.hh:78
Minor::ExecContext::initiateMemRead
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
Initiate a timing memory read operation.
Definition: exec_context.hh:106
SimpleThread::readCCReg
RegVal readCCReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:443
Minor::ExecContext::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
Definition: exec_context.hh:291
X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:87
Minor
Definition: activity.cc:44
request.hh
execute.hh
AddressMonitor
Definition: base.hh:70
Minor::ExecContext::~ExecContext
~ExecContext()
Definition: exec_context.hh:99
RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:75
Minor::ExecContext::initiateHtmCmd
Fault initiateHtmCmd(Request::Flags flags) override
Initiate an HTM command, e.g.
Definition: exec_context.hh:117
SimpleThread
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
Definition: simple_thread.hh:89
SimpleThread::setMiscReg
void setMiscReg(RegIndex misc_reg, RegVal val) override
Definition: simple_thread.hh:551
Minor::ExecContext::setVecElemOperand
void setVecElemOperand(const StaticInst *si, int idx, const TheISA::VecElem val) override
Sets a vector register to a value.
Definition: exec_context.hh:311
Minor::ExecContext::readVec8BitLaneOperand
ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Vector Register Lane Interfaces.
Definition: exec_context.hh:237
Minor::ExecContext::setMiscRegOperand
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: exec_context.hh:415
Minor::ExecContext::setFloatRegOperandBits
void setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
Sets the bits of a floating point register of single width to a binary value.
Definition: exec_context.hh:208
Minor::ExecContext::setPredicate
void setPredicate(bool val) override
Definition: exec_context.hh:326
ArmISA::VecElem
uint32_t VecElem
Definition: registers.hh:68
Minor::ExecContext::ExecContext
ExecContext(MinorCPU &cpu_, SimpleThread &thread_, Execute &execute_, MinorDynInstPtr inst_)
Definition: exec_context.hh:83
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
Minor::ExecContext::setStCondFailures
void setStCondFailures(unsigned int st_cond_failures) override
Sets the number of consecutive store conditional failures.
Definition: exec_context.hh:428
SimpleThread::getTC
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
Definition: simple_thread.hh:169
VecLaneT
Vector Lane abstraction Another view of a container.
Definition: vec_reg.hh:262
MinorCPU
MinorCPU is an in-order CPU model with four fixed pipeline stages:
Definition: cpu.hh:77
Minor::ExecContext::pcState
TheISA::PCState pcState() const override
Definition: exec_context.hh:377
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
SimpleThread::getWritableVecPredReg
VecPredRegContainer & getWritableVecPredReg(const RegId &reg) override
Definition: simple_thread.hh:431
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
MipsISA::vaddr
vaddr
Definition: pra_constants.hh:275
Minor::ExecContext::mwait
bool mwait(PacketPtr pkt) override
Definition: exec_context.hh:476
pipeline.hh
ArmISA::ZeroReg
const int ZeroReg
Definition: registers.hh:118
SimpleThread::readMiscReg
RegVal readMiscReg(RegIndex misc_reg) override
Definition: simple_thread.hh:539
SimpleThread::readVec32BitLaneReg
virtual ConstVecLane32 readVec32BitLaneReg(const RegId &reg) const override
Reads source vector 32bit operand.
Definition: simple_thread.hh:360
Minor::ExecContext::readFloatRegOperandBits
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
Definition: exec_context.hh:152
Minor::ExecContext::readVecRegOperand
const TheISA::VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Vector Register Interfaces.
Definition: exec_context.hh:160
Minor::ExecContext::initiateMemAMO
Fault initiateMemAMO(Addr addr, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation)
Definition: exec_context.hh:135
SimpleThread::syscall
void syscall() override
Definition: simple_thread.hh:588
SimpleThread::setVecElem
void setVecElem(const RegId &reg, const VecElem &val) override
Definition: simple_thread.hh:488
BaseCPU::getCpuAddrMonitor
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
Definition: base.hh:599
SimpleThread::readMemAccPredicate
bool readMemAccPredicate()
Definition: simple_thread.hh:565
Minor::ExecContext::demapDataPage
void demapDataPage(Addr vaddr, uint64_t asn)
Definition: exec_context.hh:464
SimpleThread::readIntReg
RegVal readIntReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:286
Minor::ExecContext::readMemAccPredicate
bool readMemAccPredicate() const override
Definition: exec_context.hh:332
Minor::ExecContext::readVecPredRegOperand
const TheISA::VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
Definition: exec_context.hh:184
Minor::ExecContext::cpu
MinorCPU & cpu
Definition: exec_context.hh:72
X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:769
NoFault
constexpr decltype(nullptr) NoFault
Definition: types.hh:245
SimpleThread::setVecPredReg
void setVecPredReg(const RegId &reg, const VecPredRegContainer &val) override
Definition: simple_thread.hh:498
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
SimpleThread::readFloatReg
RegVal readFloatReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:297
Minor::ExecContext::getCpuPtr
BaseCPU * getCpuPtr()
Definition: exec_context.hh:469
Minor::ExecContext::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
Definition: exec_context.hh:297
Minor::ExecContext::writeMem
Fault writeMem(uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >()) override
For atomic-mode contexts, perform an atomic memory write operation.
Definition: exec_context.hh:124
SimpleThread::setFloatReg
void setFloatReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:465
SimpleThread::readVecPredReg
const VecPredRegContainer & readVecPredReg(const RegId &reg) const override
Definition: simple_thread.hh:420
Minor::Execute::getLSQ
LSQ & getLSQ()
To allow ExecContext to find the LSQ.
Definition: execute.hh:329
BaseCPU
Definition: cpu_dummy.hh:43
BaseTLB::demapPage
virtual void demapPage(Addr vaddr, uint64_t asn)=0
SimpleThread::getDTBPtr
BaseTLB * getDTBPtr() override
Definition: simple_thread.hh:221
simple_thread.hh
Minor::ExecContext::armMonitor
void armMonitor(Addr address) override
Definition: exec_context.hh:473
Minor::ExecContext::setMemAccPredicate
void setMemAccPredicate(bool val) override
Definition: exec_context.hh:338
Minor::ExecContext::readPredicate
bool readPredicate() const override
Definition: exec_context.hh:320
base.hh
Minor::ExecContext
ExecContext bears the exec_context interface for Minor.
Definition: exec_context.hh:69
MipsISA::PCState
GenericISA::DelaySlotPCState< MachInst > PCState
Definition: types.hh:41
Minor::ExecContext::readMiscReg
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
Definition: exec_context.hh:395
Minor::ExecContext::getAddrMonitor
AddressMonitor * getAddrMonitor() override
Definition: exec_context.hh:482
Minor::ExecContext::readMiscRegOperand
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Definition: exec_context.hh:407
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
SimpleThread::dtb
BaseTLB * dtb
Definition: simple_thread.hh:134
exec_context.hh
addr
ip6_addr_t addr
Definition: inet.hh:423
Minor::ExecContext::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
Definition: exec_context.hh:303
Minor::ExecContext::thread
SimpleThread & thread
ThreadState object, provides all the architectural state.
Definition: exec_context.hh:75
Minor::ExecContext::demapInstPage
void demapInstPage(Addr vaddr, uint64_t asn)
Definition: exec_context.hh:458
Minor::ExecContext::getHtmTransactionalDepth
uint64_t getHtmTransactionalDepth() const override
Definition: exec_context.hh:369
Minor::ExecContext::setCCRegOperand
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: exec_context.hh:450
RefCountingPtr< MinorDynInst >
Minor::ExecContext::setIntRegOperand
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
Definition: exec_context.hh:200
Minor::ExecContext::syscall
void syscall() override
Executes a syscall.
Definition: exec_context.hh:422
SimpleThread::setVecLane
virtual void setVecLane(const RegId &reg, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
Definition: simple_thread.hh:384
Minor::ExecContext::setVecRegOperand
void setVecRegOperand(const StaticInst *si, int idx, const TheISA::VecRegContainer &val) override
Definition: exec_context.hh:216
Minor::ExecContext::getHtmTransactionUid
uint64_t getHtmTransactionUid() const override
Definition: exec_context.hh:345
Minor::ExecContext::readStCondFailures
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition: exec_context.hh:427
SimpleThread::readVecElem
const VecElem & readVecElem(const RegId &reg) const override
Definition: simple_thread.hh:409
Minor::ExecContext::demapPage
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Definition: exec_context.hh:435
Minor::Execute
Execute stage.
Definition: execute.hh:60
LaneData
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
Definition: vec_reg.hh:458
Minor::ExecContext::setVecLaneOperandT
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
Definition: exec_context.hh:278
RegVal
uint64_t RegVal
Definition: types.hh:168
SimpleThread::readPredicate
bool readPredicate() const
Definition: simple_thread.hh:529
Minor::ExecContext::getWritableVecPredRegOperand
TheISA::VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
Definition: exec_context.hh:192
Minor::ExecContext::pcState
void pcState(const TheISA::PCState &val) override
Definition: exec_context.hh:383
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171

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