Skip to content

Class simtix::InstrPtr

ClassList > simtix > InstrPtr

Pointer to the <Instr> object. More...

  • #include <instr_ptr.h>

Public Functions

Type Name
void AddKonataLabel (std::string_view label)
Add a Konata label to this <InstrPtr> if it is valid.
InstrPtr DuplicateForWarp (Warp * warp) noexcept const
Explicit duplicate the instruction.
void Instantiate (uint32_t iword)
Instantiate the <Instr> object based on the given instruction word.
void Instantiate (riscv::Exceptions exception)
Instantiate the <Instr> object based on the given exception code.
InstrPtr ()
Default constructor that instantiate an invalid <InstrPtr>.
InstrPtr (Warp * warp, uint64_t wpc, std::optional< uint32_t > ssw)
Basic constructor.
InstrPtr (const InstrPtr &) = delete
InstrPtr (InstrPtr && other)
Move constructor.
Instr * instr () noexcept const
Instr * operator-> () noexcept const
-> operator is used to access the <Instr> and its public APIs.
InstrPtr & operator= (const InstrPtr &) = delete
InstrPtr & operator= (InstrPtr && other) noexcept
&operator= is used to aquire ownership from the other <InstrPtr>.
void set_flushed ()
std::optional< uint32_t > ssw () noexcept const
uint64_t unique_id () noexcept const
uint32_t wid () noexcept const
uint64_t wpc () noexcept const
~InstrPtr ()

Public Static Functions

Type Name
void set_first_stage_name (std::string_view first_stage_name)

Detailed Description

This class manages the Konata serial ID and the the ownership of an allocated <Instr> object. This class acts like a std::unique_ptr so it will automatically recycle the <Instr> object back to pool during destruction.

Public Functions Documentation

function AddKonataLabel

Add a Konata label to this <InstrPtr> if it is valid.

inline void simtix::InstrPtr::AddKonataLabel (
    std::string_view label
) 

Parameters:

  • label The label to add.

function DuplicateForWarp

Explicit duplicate the instruction.

InstrPtr simtix::InstrPtr::DuplicateForWarp (
    Warp * warp
) noexcept const

This function instantiate another <InstrPtr> object and copy all fileds except the <Warp> pointer, and allocate an identical <Instr> from the same pool.

Parameters:

  • warp The warp for the duplicated instruction to bind with.

Returns:

An <InstrPtr> object.


function Instantiate [1/2]

Instantiate the <Instr> object based on the given instruction word.

void simtix::InstrPtr::Instantiate (
    uint32_t iword
) 

This fucntion determines the <InstrPool> to allocate an instruction from.

Parameters:

  • iword The instruction word of this instruction.

function Instantiate [2/2]

Instantiate the <Instr> object based on the given exception code.

void simtix::InstrPtr::Instantiate (
    riscv::Exceptions exception
) 

This fucntion determines the <InstrPool> to allocate an instruction from.

Parameters:

  • exception The exception code of this instruction.

function InstrPtr [1/4]

Default constructor that instantiate an invalid <InstrPtr>.

simtix::InstrPtr::InstrPtr () 


function InstrPtr [2/4]

Basic constructor.

explicit simtix::InstrPtr::InstrPtr (
    Warp * warp,
    uint64_t wpc,
    std::optional< uint32_t > ssw
) 

Basic constructor that instantiate an <InstrPtr> and assign an Konata serial ID to it.

Parameters:

  • warp Pointer to the <Warp> that the warp instruction is associated to.
  • wpc The PC of the warp instruction.
  • ssw The spatial sub-warp id.

function InstrPtr [3/4]

explicit simtix::InstrPtr::InstrPtr (
    const InstrPtr &
) = delete

function InstrPtr [4/4]

Move constructor.

simtix::InstrPtr::InstrPtr (
    InstrPtr && other
) 

Move constructor that aquire the instruction's ownership from the other <InstrPtr> object.

Parameters:

  • other The R-value reference to the other <InstrPtr>.

function instr

inline Instr * simtix::InstrPtr::instr () noexcept const

function operator->

-> operator is used to access the <Instr> and its public APIs.

inline Instr * simtix::InstrPtr::operator-> () noexcept const

Returns:

The pointer to the <Instr> object.


function operator=

InstrPtr & simtix::InstrPtr::operator= (
    const InstrPtr &
) = delete

function operator=

&operator= is used to aquire ownership from the other <InstrPtr>.

InstrPtr & simtix::InstrPtr::operator= (
    InstrPtr && other
) noexcept

Parameters:

  • other The R-value reference to the other <InstrPtr>.

Returns:

The reference to this.


function set_flushed

inline void simtix::InstrPtr::set_flushed () 

Mark this instruction as flushed.


function ssw

inline std::optional< uint32_t > simtix::InstrPtr::ssw () noexcept const

function unique_id

inline uint64_t simtix::InstrPtr::unique_id () noexcept const

function wid

inline uint32_t simtix::InstrPtr::wid () noexcept const

function wpc

inline uint64_t simtix::InstrPtr::wpc () noexcept const

function ~InstrPtr

simtix::InstrPtr::~InstrPtr () 

Public Static Functions Documentation

function set_first_stage_name

static inline void simtix::InstrPtr::set_first_stage_name (
    std::string_view first_stage_name
) 


The documentation for this class was generated from the following file projects/simtix/src/simtix/sm/instr_ptr.h