Skip to content

Class simtix::pipelined::PipelinedSM

ClassList > simtix > pipelined > PipelinedSM

Inherits the following classes: simtix::BaseSM

Classes

Type Name
class Impl
Internal implementation wrapper for public PipelinedSM interface.
class Param
class ParamBuilder

Public Types inherited from simtix::BaseSM

See simtix::BaseSM

Type Name
enum uint8_t Status

Public Static Attributes

Type Name
const Param kDefaultParam = Param::Build()

Public Functions

Type Name
void AttachDCache (std::shared_ptr< mem::CacheInterface > dcache)
Attach a data cache to the SM.
virtual void AttachDMem (mem::MemoryInterface * dmem) override
Attach data memory to the SM.
void AttachICache (std::shared_ptr< mem::CacheInterface > icache)
Attach an instruction cache to the SM.
virtual void AttachIMem (mem::MemoryInterface * imem) override
Attach instruction memory to the SM.
PipelinedSM (const std::string & name, uint32_t cid, const ArchParam & p=kDefaultArchParam, const Param & pp=kDefaultParam)
Constructor of PipelinedSM .
virtual int Process (const opencl::WorkGroup & wg) override
Process a workgroup from the task dispatcher.
virtual void Reset () override
Reset the SM to its initial state.
virtual uint32_t cid () override const
Get the core ID of the SM.
virtual FaultStatus fault_status () override const
Get the fault status of the SM.
virtual uint64_t mcycle () override const
Get the cycle count (CSR mcycle) of the SM.
virtual const std::vector< uint64_t > & minstrets () override const
Get the instruction (CSR minstret) count of the SM.
virtual const std::shared_ptr< stat::Group > stat () override const
Get the statistics group of the SM.
virtual Status status () override const
Get the status of the SM.
~PipelinedSM ()

Public Functions inherited from simtix::BaseSM

See simtix::BaseSM

Type Name
virtual void AttachDMem (mem::MemoryInterface * dmem) = 0
Attach data memory to the SM.
virtual void AttachIMem (mem::MemoryInterface * imem) = 0
Attach instruction memory to the SM.
BaseSM (const std::string & name)
Constructor of BaseSM .
virtual int Process (const opencl::WorkGroup & wg) = 0
Process a workgroup from the task dispatcher.
virtual void Reset () = 0
Reset the SM to its initial state.
virtual uint32_t cid () const = 0
Get the core ID of the SM.
virtual FaultStatus fault_status () const = 0
Get the fault status of the SM.
virtual uint64_t mcycle () const = 0
Get the cycle count (CSR mcycle) of the SM.
virtual const std::vector< uint64_t > & minstrets () const = 0
Get the instruction (CSR minstret) count of the SM.
virtual const std::shared_ptr< stat::Group > stat () const = 0
Get the statistics group of the SM.
virtual Status status () const = 0
Get the status of the SM.
virtual ~BaseSM () = default

Public Functions inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
Clocked (const std::string & name, TickPri pri=kDefaultPri)
Constructor for clocled.
const std::string & name () const
Get the name of the clocked object.
virtual ~Clocked ()

Protected Attributes

Type Name
std::unique_ptr< Impl > impl_

Protected Attributes inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
std::string name_
TickPri pri_

Protected Static Attributes inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
bool busy_ = true
std::map< TickPri, std::vector< Clocked * > > clocked_objs_map_
uint64_t cur_tick_ = 0

Protected Functions

Type Name
virtual bool HasPendingTasks () override
Check if the PipelinedSM has pending tasks.
virtual void Tick () override
Perform PipelinedSM operation cycle.

Protected Functions inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
virtual bool HasPendingTasks () = 0
Checks if any registered clocked objects have pending tasks at the current tick.
virtual void Tick () = 0
Global tick function that advances the simulation by one cycle.

Protected Static Functions inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
void Register (Clocked * c)
Register a clocked object to participate in tick-driven simulation.
void Unregister (Clocked * c)
Unregister a clocked object from tick-driven simulation.

Public Static Attributes Documentation

variable kDefaultParam

const Param simtix::pipelined::PipelinedSM::kDefaultParam;

Public Functions Documentation

function AttachDCache

Attach a data cache to the SM.

void simtix::pipelined::PipelinedSM::AttachDCache (
    std::shared_ptr< mem::CacheInterface > dcache
) 

Parameters:

  • dcache Shared pointer to the data cache interface.

function AttachDMem

Attach data memory to the SM.

virtual void simtix::pipelined::PipelinedSM::AttachDMem (
    mem::MemoryInterface * dmem
) override

Parameters:

  • dmem Pointer to the data memory interface.

Implements simtix::BaseSM::AttachDMem


function AttachICache

Attach an instruction cache to the SM.

void simtix::pipelined::PipelinedSM::AttachICache (
    std::shared_ptr< mem::CacheInterface > icache
) 

Parameters:

  • icache Shared pointer to the instruction cache interface.

function AttachIMem

Attach instruction memory to the SM.

virtual void simtix::pipelined::PipelinedSM::AttachIMem (
    mem::MemoryInterface * imem
) override

Parameters:

  • imem Pointer to the instruction memory interface.

Implements simtix::BaseSM::AttachIMem


function PipelinedSM

Constructor of PipelinedSM .

explicit simtix::pipelined::PipelinedSM::PipelinedSM (
    const std::string & name,
    uint32_t cid,
    const ArchParam & p=kDefaultArchParam,
    const Param & pp=kDefaultParam
) 

Parameters:

  • name Name of the SM.
  • cid Core ID of the SM.
  • p Architecture parameters from param.h.
  • pp Pipeline configuration parameters from pipeline.h..

function Process

Process a workgroup from the task dispatcher.

virtual int simtix::pipelined::PipelinedSM::Process (
    const opencl::WorkGroup & wg
) override

Parameters:

  • wg Workgroup to process.

Returns:

0 if successful, -1 if failed.

Accept a work-group from task dispatcher and initialize all the threads. Implementation should override this method and determine how a work-group

Implements simtix::BaseSM::Process


function Reset

Reset the SM to its initial state.

virtual void simtix::pipelined::PipelinedSM::Reset () override

This method is called when the SM transitions to kCompleted or kFault.

Implements simtix::BaseSM::Reset


function cid

Get the core ID of the SM.

virtual uint32_t simtix::pipelined::PipelinedSM::cid () override const

Returns:

Core ID.

Implements simtix::BaseSM::cid


function fault_status

Get the fault status of the SM.

virtual FaultStatus simtix::pipelined::PipelinedSM::fault_status () override const

Returns:

Fault status of the SM.

Implements simtix::BaseSM::fault_status


function mcycle

Get the cycle count (CSR mcycle) of the SM.

virtual uint64_t simtix::pipelined::PipelinedSM::mcycle () override const

Returns:

Cycle count.

Implements simtix::BaseSM::mcycle


function minstrets

Get the instruction (CSR minstret) count of the SM.

virtual const std::vector< uint64_t > & simtix::pipelined::PipelinedSM::minstrets () override const

Returns:

Instruction count.

Implements simtix::BaseSM::minstrets


function stat

Get the statistics group of the SM.

virtual const std::shared_ptr< stat::Group > simtix::pipelined::PipelinedSM::stat () override const

Returns:

Pointer to the statistics group.

Implements simtix::BaseSM::stat


function status

Get the status of the SM.

virtual Status simtix::pipelined::PipelinedSM::status () override const

Returns:

Status of the SM.

Implements simtix::BaseSM::status


function ~PipelinedSM

simtix::pipelined::PipelinedSM::~PipelinedSM () 

Protected Attributes Documentation

variable impl_

std::unique_ptr<Impl> simtix::pipelined::PipelinedSM::impl_;

Protected Functions Documentation

function HasPendingTasks

Check if the PipelinedSM has pending tasks.

virtual bool simtix::pipelined::PipelinedSM::HasPendingTasks () override

Returns:

True if there are pending tasks, false otherwise.

Implements simtix::sim::Clocked::HasPendingTasks


function Tick

Perform PipelinedSM operation cycle.

virtual void simtix::pipelined::PipelinedSM::Tick () override

Implements simtix::sim::Clocked::Tick



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