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.
Parameters:
name
Name of the clocked object.pri
Tick priority (default is kDefaultPri).
function name
Get the name of the clocked object.
Returns:
The name of clocked object.
function ~Clocked
Protected Attributes Documentation
variable name_
variable pri_
Protected Static Attributes Documentation
variable busy_
variable clocked_objs_map_
variable cur_tick_
Protected Functions Documentation
function HasPendingTasks [1/2]
Checks if any registered clocked objects have pending tasks at the current tick.
Returns:
True if there are pending tasks, false otherwise.
function Tick [1/2]
Global tick function that advances the simulation by one cycle.
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.
Parameters:
c
Pointer to the object that wants to be registered by <sim::Tick>.
function Unregister
Unregister a clocked object from tick-driven simulation.
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