Skip to content

Class simtix::pipelined::PCGenStage

ClassList > simtix > pipelined > PCGenStage

Fetch request generation stage.

  • #include <pc_gen_stage.h>

Public Functions

Type Name
void NotifyFill (uint64_t pc)
Notify the stage that a fetch request is completed.
void NotifyIssue (uint32_t wid, std::optional< uint32_t > ssw)
Notify the stage that a warp is issued.
void PCGen ()
Generate fetch requests and store them in fetch buffer.
PCGenStage (PipelinedSMImpl * sm, const PipelinedSM::Param & p)
Constructor of PCGenStage .
bool Ready ()
Check if PCGenStage can generate fetch request.
void Reset ()
~PCGenStage () = default

Protected Types

Type Name
typedef std::array< bool, 3 > SswValidBits
Represents the validity status of a warp.

Protected Attributes

Type Name
std::vector< FetchFilterEntry > fetch_filter_
std::deque< uint32_t > free_entry_ids_
std::vector< SswValidBits > issuing_leader_warps_
const uint32_t kFetchWidth
const uint32_t kLeaderWarps
const uint32_t kOutstandingInstrFetches
const uint32_t kWarpsPerWarpGroup
uint32_t prioritized_leader_wid_
PipelinedSMImpl *const sm_
std::vector< SswValidBits > starving_leader_warps_
std::vector< std::vector< SswValidBits > * > warp_lists_

Protected Functions

Type Name
void GenerateFetchRequest (uint32_t wid, std::optional< uint32_t > ssw)
Insert a fetch request to fetch filter.
void NotifyEmpty (uint32_t wid, std::optional< uint32_t > ssw)
Notify that a warp has become empty.
constexpr uint64_t ToFetchAddress (uint64_t addr) const
Convert an address to a fetch address.

Public Functions Documentation

function NotifyFill

Notify the stage that a fetch request is completed.

void simtix::pipelined::PCGenStage::NotifyFill (
    uint64_t pc
) 

Parameters:

This function is called when an instruction is fetched, decoded, and written back to the instruction buffer. It frees the corresponding space to allow new fetch requests.


function NotifyIssue

Notify the stage that a warp is issued.

void simtix::pipelined::PCGenStage::NotifyIssue (
    uint32_t wid,
    std::optional< uint32_t > ssw
) 

Parameters:

  • wid Warp ID.
  • ssw Spatial sub warp ID.

This function is called whan a warp is scheduled.


function PCGen

Generate fetch requests and store them in fetch buffer.

void simtix::pipelined::PCGenStage::PCGen () 


function PCGenStage

Constructor of PCGenStage .

explicit simtix::pipelined::PCGenStage::PCGenStage (
    PipelinedSMImpl * sm,
    const PipelinedSM::Param & p
) 

Parameters:

  • sm Pointer to the PipelinedSMImpl instance.
  • p Pipeline configuration parameters from pipeline.h.

function Ready

Check if PCGenStage can generate fetch request.

bool simtix::pipelined::PCGenStage::Ready () 

Returns:

True if PCGenStage can generate fetch request.


function Reset

void simtix::pipelined::PCGenStage::Reset () 

function ~PCGenStage

simtix::pipelined::PCGenStage::~PCGenStage () = default

Protected Types Documentation

typedef SswValidBits

Represents the validity status of a warp.

using simtix::pipelined::PCGenStage::SswValidBits =  std::array<bool, 3>;

Contains three flags indicating whether a warp is: * Non-diverging. * Diverging with spatial sub-warp 0. * Diverging with spatial sub-warp 1.


Protected Attributes Documentation

variable fetch_filter_

std::vector<FetchFilterEntry> simtix::pipelined::PCGenStage::fetch_filter_;

variable free_entry_ids_

std::deque<uint32_t> simtix::pipelined::PCGenStage::free_entry_ids_;

variable issuing_leader_warps_

std::vector<SswValidBits> simtix::pipelined::PCGenStage::issuing_leader_warps_;

variable kFetchWidth

const uint32_t simtix::pipelined::PCGenStage::kFetchWidth;

variable kLeaderWarps

const uint32_t simtix::pipelined::PCGenStage::kLeaderWarps;

variable kOutstandingInstrFetches

const uint32_t simtix::pipelined::PCGenStage::kOutstandingInstrFetches;

variable kWarpsPerWarpGroup

const uint32_t simtix::pipelined::PCGenStage::kWarpsPerWarpGroup;

variable prioritized_leader_wid_

uint32_t simtix::pipelined::PCGenStage::prioritized_leader_wid_;

variable sm_

PipelinedSMImpl* const simtix::pipelined::PCGenStage::sm_;

variable starving_leader_warps_

std::vector<SswValidBits> simtix::pipelined::PCGenStage::starving_leader_warps_;

variable warp_lists_

std::vector<std::vector<SswValidBits> *> simtix::pipelined::PCGenStage::warp_lists_;

Protected Functions Documentation

function GenerateFetchRequest

Insert a fetch request to fetch filter.

void simtix::pipelined::PCGenStage::GenerateFetchRequest (
    uint32_t wid,
    std::optional< uint32_t > ssw
) 

If the fetch request is inflight, do nothing. Otherwise, allocate an entry for it.


function NotifyEmpty

Notify that a warp has become empty.

inline void simtix::pipelined::PCGenStage::NotifyEmpty (
    uint32_t wid,
    std::optional< uint32_t > ssw
) 

Parameters:

  • wid Warp ID.
  • ssw Spatial sub warp ID.

function ToFetchAddress

Convert an address to a fetch address.

inline constexpr uint64_t simtix::pipelined::PCGenStage::ToFetchAddress (
    uint64_t addr
) const

Parameters:

  • addr The original address.

Returns:

The aligned fetch address.


Friends Documentation

friend FrontendGoldenImpl

class simtix::pipelined::PCGenStage::FrontendGoldenImpl (
    uvm::FrontendGoldenImpl
) 


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