Skip to content

Class simtix::sim::Clocked

ClassList > simtix > sim > Clocked

Abstract base class for tick-driven simulation objects. More...

  • #include <clocked.h>

Inherited by the following classes: simtix::sim::GenericDelayQueue, simtix::sim::GenericDelayQueue, simtix::AtomicLoadStoreUnit, simtix::BaseSM, simtix::CoalescingLoadStoreUnit, simtix::mem::MemoryInterface, simtix::sim::GenericDelayQueue, simtix::system::TaskDispatcher, simtix::trace::KonataRetireReporter, simtix::uvm::FrontendGolden

Public Functions

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::string name_
TickPri pri_

Protected Static Attributes

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 () = 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

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.

Detailed Description

Classes that inherit from clocked must implement <Tick> function to specify the operation to perform on every tick.

Public Functions Documentation

function Clocked

Constructor for clocled.

explicit simtix::sim::Clocked::Clocked (
    const std::string & name,
    TickPri pri=kDefaultPri
) 

Parameters:

  • name Name of the clocked object.
  • pri Tick priority (default is kDefaultPri).

function name

Get the name of the clocked object.

inline const std::string & simtix::sim::Clocked::name () const

Returns:

The name of clocked object.


function ~Clocked

virtual simtix::sim::Clocked::~Clocked () 

Protected Attributes Documentation

variable name_

std::string simtix::sim::Clocked::name_;

variable pri_

TickPri simtix::sim::Clocked::pri_;

Protected Static Attributes Documentation

variable busy_

bool simtix::sim::Clocked::busy_;

variable clocked_objs_map_

std::map<TickPri, std::vector<Clocked *> > simtix::sim::Clocked::clocked_objs_map_;

variable cur_tick_

uint64_t simtix::sim::Clocked::cur_tick_;

Protected Functions Documentation

function HasPendingTasks [1/2]

Checks if any registered clocked objects have pending tasks at the current tick.

virtual bool simtix::sim::Clocked::HasPendingTasks () = 0

Returns:

True if there are pending tasks, false otherwise.


function Tick [1/2]

Global tick function that advances the simulation by one cycle.

virtual void simtix::sim::Clocked::Tick () = 0

Call this function to drive all registered tick-driven objects.


Protected Static Functions Documentation

function Register

Register a clocked object to participate in tick-driven simulation.

static void simtix::sim::Clocked::Register (
    Clocked * c
) 

Parameters:

  • c Pointer to the object that wants to be registered by <sim::Tick>.

function Unregister

Unregister a clocked object from tick-driven simulation.

static void simtix::sim::Clocked::Unregister (
    Clocked * c
) 

Parameters:

  • c Pointer to the clocked object that wants to be unregistered by <sim::Tick>.


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