The Sparta Modeling Framework
Loading...
Searching...
No Matches
core_example::ExampleInst Class Reference

Example instruction that flows through the example/CoreModel. More...

#include <ExampleInst.hpp>

Classes

struct  StaticInfo
 

Public Types

enum class  Status : std::uint16_t {
  FETCHED = 0 , __FIRST = FETCHED , DECODED , RENAMED ,
  SCHEDULED , COMPLETED , RETIRED , __LAST
}
 
enum class  TargetUnit : std::uint16_t {
  ALU0 , ALU1 , FPU , BR ,
  LSU , ROB , N_TARGET_UNITS
}
 
using SpartaPairDefinitionType = ExampleInstPairDef
 
using InstStatus = sparta::SharedData< Status >
 

Public Member Functions

 ExampleInst (const sparta::decode::DecoderBase &static_inst, TargetUnit unit, uint32_t execute_time, bool isStore, const sparta::Clock *clk, Status state)
 
 ExampleInst (const StaticInfo &info, const sparta::Clock *clk, Status state=Status::FETCHED)
 
const sparta::decode::DecoderBase & getStaticInst () const
 
const Status & getStatus () const
 
bool getCompletedStatus () const
 
void setStatus (Status status)
 
const TargetUnit & getUnit () const
 
void setLast (bool last, sparta::Scheduleable *rob_retire_event)
 
void setVAdr (uint64_t vaddr)
 
void setUniqueID (uint64_t uid)
 
uint64_t getUniqueID () const
 
void setSpeculative (bool spec)
 
const char * getMnemonic () const
 
uint32_t getOpCode () const
 
uint64_t getVAdr () const
 
uint64_t getRAdr () const
 
uint64_t getParentId () const
 
uint32_t getExecuteTime () const
 
bool isSpeculative () const
 
bool isStoreInst () const
 

Detailed Description

Example instruction that flows through the example/CoreModel.

Definition at line 28 of file ExampleInst.hpp.

Member Typedef Documentation

◆ InstStatus

Definition at line 62 of file ExampleInst.hpp.

◆ SpartaPairDefinitionType

Member Enumeration Documentation

◆ Status

enum class core_example::ExampleInst::Status : std::uint16_t
strong

Definition at line 34 of file ExampleInst.hpp.

◆ TargetUnit

enum class core_example::ExampleInst::TargetUnit : std::uint16_t
strong

Definition at line 45 of file ExampleInst.hpp.

Constructor & Destructor Documentation

◆ ExampleInst() [1/2]

core_example::ExampleInst::ExampleInst ( const sparta::decode::DecoderBase &  static_inst,
TargetUnit  unit,
uint32_t  execute_time,
bool  isStore,
const sparta::Clock clk,
Status  state 
)
inline

Definition at line 64 of file ExampleInst.hpp.

◆ ExampleInst() [2/2]

core_example::ExampleInst::ExampleInst ( const StaticInfo info,
const sparta::Clock clk,
Status  state = Status::FETCHED 
)
inline

Definition at line 77 of file ExampleInst.hpp.

Member Function Documentation

◆ getCompletedStatus()

bool core_example::ExampleInst::getCompletedStatus ( ) const
inline

Definition at line 96 of file ExampleInst.hpp.

◆ getExecuteTime()

uint32_t core_example::ExampleInst::getExecuteTime ( ) const
inline

Definition at line 145 of file ExampleInst.hpp.

◆ getMnemonic()

const char * core_example::ExampleInst::getMnemonic ( ) const
inline

Definition at line 140 of file ExampleInst.hpp.

◆ getOpCode()

uint32_t core_example::ExampleInst::getOpCode ( ) const
inline

Definition at line 141 of file ExampleInst.hpp.

◆ getParentId()

uint64_t core_example::ExampleInst::getParentId ( ) const
inline

Definition at line 144 of file ExampleInst.hpp.

◆ getRAdr()

uint64_t core_example::ExampleInst::getRAdr ( ) const
inline

Definition at line 143 of file ExampleInst.hpp.

◆ getStaticInst()

const sparta::decode::DecoderBase & core_example::ExampleInst::getStaticInst ( ) const
inline

Definition at line 88 of file ExampleInst.hpp.

◆ getStatus()

const Status & core_example::ExampleInst::getStatus ( ) const
inline

Definition at line 92 of file ExampleInst.hpp.

◆ getUniqueID()

uint64_t core_example::ExampleInst::getUniqueID ( ) const
inline

Definition at line 132 of file ExampleInst.hpp.

◆ getUnit()

const TargetUnit & core_example::ExampleInst::getUnit ( ) const
inline

Definition at line 110 of file ExampleInst.hpp.

◆ getVAdr()

uint64_t core_example::ExampleInst::getVAdr ( ) const
inline

Definition at line 142 of file ExampleInst.hpp.

◆ isSpeculative()

bool core_example::ExampleInst::isSpeculative ( ) const
inline

Definition at line 146 of file ExampleInst.hpp.

◆ isStoreInst()

bool core_example::ExampleInst::isStoreInst ( ) const
inline

Definition at line 147 of file ExampleInst.hpp.

◆ setLast()

void core_example::ExampleInst::setLast ( bool  last,
sparta::Scheduleable rob_retire_event 
)
inline

Definition at line 114 of file ExampleInst.hpp.

◆ setSpeculative()

void core_example::ExampleInst::setSpeculative ( bool  spec)
inline

Definition at line 136 of file ExampleInst.hpp.

◆ setStatus()

void core_example::ExampleInst::setStatus ( Status  status)
inline

Definition at line 100 of file ExampleInst.hpp.

◆ setUniqueID()

void core_example::ExampleInst::setUniqueID ( uint64_t  uid)
inline

Definition at line 127 of file ExampleInst.hpp.

◆ setVAdr()

void core_example::ExampleInst::setVAdr ( uint64_t  vaddr)
inline

Definition at line 123 of file ExampleInst.hpp.


The documentation for this class was generated from the following file: