gem5 v24.0.0.0
Loading...
Searching...
No Matches
sc_gem5::Process Class Referenceabstract

#include <process.hh>

Inheritance diagram for sc_gem5::Process:
sc_core::sc_process_b sc_gem5::ListNode sc_core::sc_object sc_gem5::Method sc_gem5::Thread sc_gem5::CThread

Public Member Functions

virtual::sc_core::sc_curr_proc_kind procKind () const =0
 
bool needsStart () const
 
void needsStart (bool ns)
 
bool dynamic () const
 
bool isUnwinding () const
 
void isUnwinding (bool v)
 
bool terminated () const
 
bool scheduled () const
 
void scheduled (bool new_val)
 
void forEachKid (const std::function< void(Process *)> &work)
 
bool suspended () const
 
bool disabled () const
 
void suspend (bool inc_kids)
 
void resume (bool inc_kids)
 
void disable (bool inc_kids)
 
void enable (bool inc_kids)
 
void kill (bool inc_kids)
 
void reset (bool inc_kids)
 
void throw_it (ExceptionWrapperBase &exc, bool inc_kids)
 
void injectException (ExceptionWrapperBase &exc)
 
void syncResetOn (bool inc_kids)
 
void syncResetOff (bool inc_kids)
 
void signalReset (bool set, bool sync)
 
void incref ()
 
void decref ()
 
::sc_core::sc_eventresetEvent ()
 
::sc_core::sc_eventterminatedEvent ()
 
void setStackSize (size_t size)
 
void run ()
 
void addStatic (StaticSensitivity *)
 
void setDynamic (DynamicSensitivity *)
 
void clearDynamic ()
 
void addReset (Reset *)
 
void setTimeout (::sc_core::sc_time t)
 
void cancelTimeout ()
 
void satisfySensitivity (Sensitivity *)
 
void ready ()
 
virtual gem5::Fiberfiber ()
 
void lastReport (::sc_core::sc_report *report)
 
::sc_core::sc_reportlastReport () const
 
bool hasStaticSensitivities ()
 
bool internal ()
 
bool timedOut ()
 
bool inReset ()
 
bool dontInitialize ()
 
void dontInitialize (bool di)
 
void joinWait (::sc_core::sc_join *join)
 
void waitCount (int count)
 
const char * uniqueName (const char *seed)
 
- Public Member Functions inherited from sc_core::sc_process_b
 sc_process_b (const char *name)
 
 sc_process_b ()
 
- Public Member Functions inherited from sc_core::sc_object
const char * name () const
 
const char * basename () const
 
virtual const char * kind () const
 
virtual void print (std::ostream &=std::cout) const
 
virtual void dump (std::ostream &=std::cout) const
 
virtual const std::vector< sc_object * > & get_child_objects () const
 
virtual const std::vector< sc_event * > & get_child_events () const
 
sc_objectget_parent_object () const
 
bool add_attribute (sc_attr_base &)
 
sc_attr_baseget_attribute (const std::string &)
 
sc_attr_baseremove_attribute (const std::string &)
 
void remove_all_attributes ()
 
int num_attributes () const
 
sc_attr_cltnattr_cltn ()
 
const sc_attr_cltnattr_cltn () const
 
sc_simcontextsimcontext () const
 
- Public Member Functions inherited from sc_gem5::ListNode
 ListNode ()
 
virtual ~ListNode ()
 
void popListNode ()
 

Static Public Member Functions

static Processnewest ()
 

Public Attributes

ExceptionWrapperBaseexcWrapper
 
ScEvent timeoutEvent
 
- Public Attributes inherited from sc_core::sc_process_b
const char * file
 
int lineno
 
- Public Attributes inherited from sc_gem5::ListNode
ListNodenextListNode
 
ListNodeprevListNode
 

Protected Member Functions

void timeout ()
 
 Process (const char *name, ProcessFuncWrapper *func, bool internal=false)
 
virtual ~Process ()
 
void terminate ()
 
- Protected Member Functions inherited from sc_core::sc_object
 sc_object ()
 
 sc_object (const char *)
 
 sc_object (const sc_object &)
 
sc_objectoperator= (const sc_object &)
 
virtual ~sc_object ()
 

Protected Attributes

InternalScEvent _resetEvent
 
InternalScEvent _terminatedEvent
 
ProcessFuncWrapperfunc
 
bool _internal
 
bool _timedOut
 
bool _dontInitialize
 
bool _needsStart
 
bool _dynamic
 
bool _isUnwinding
 
bool _terminated
 
bool _scheduled
 
bool _suspended
 
bool _suspendedReady
 
bool _disabled
 
bool _syncReset
 
int syncResetCount
 
int asyncResetCount
 
int _waitCount
 
int refCount
 
size_t stackSize
 
StaticSensitivities staticSensitivities
 
DynamicSensitivitydynamicSensitivity
 
std::vector< Reset * > resets
 
std::unique_ptr<::sc_core::sc_report_lastReport
 
std::vector<::sc_core::sc_join * > joinWaiters
 
UniqueNameGen nameGen
 

Static Protected Attributes

static Process_newest
 

Detailed Description

Definition at line 62 of file process.hh.

Constructor & Destructor Documentation

◆ Process()

sc_gem5::Process::Process ( const char * name,
ProcessFuncWrapper * func,
bool internal = false )
protected

Definition at line 378 of file process.cc.

References timeout().

◆ ~Process()

virtual sc_gem5::Process::~Process ( )
inlineprotectedvirtual

Member Function Documentation

◆ addReset()

void sc_gem5::Process::addReset ( Reset * reset)

Definition at line 298 of file process.cc.

References reset(), and resets.

Referenced by sc_gem5::Reset::install().

◆ addStatic()

void sc_gem5::Process::addStatic ( StaticSensitivity * s)

Definition at line 282 of file process.cc.

References staticSensitivities.

◆ cancelTimeout()

void sc_gem5::Process::cancelTimeout ( )

◆ clearDynamic()

void sc_gem5::Process::clearDynamic ( )
inline

Definition at line 110 of file process.hh.

References setDynamic().

Referenced by signalReset(), terminate(), and ~Process().

◆ decref()

void sc_gem5::Process::decref ( )
inline

◆ disable()

◆ disabled()

bool sc_gem5::Process::disabled ( ) const
inline

Definition at line 79 of file process.hh.

References _disabled.

Referenced by sc_gem5::Sensitivity::notify(), ready(), and timeout().

◆ dontInitialize() [1/2]

bool sc_gem5::Process::dontInitialize ( )
inline

Definition at line 133 of file process.hh.

References _dontInitialize.

Referenced by sc_gem5::ClockTick::createProcess(), and sc_gem5::spawnWork().

◆ dontInitialize() [2/2]

void sc_gem5::Process::dontInitialize ( bool di)
inline

Definition at line 134 of file process.hh.

References _dontInitialize.

◆ dynamic()

bool sc_gem5::Process::dynamic ( ) const
inline

Definition at line 68 of file process.hh.

References _dynamic.

Referenced by sc_core::sc_process_handle::dynamic().

◆ enable()

void sc_gem5::Process::enable ( bool inc_kids)

Definition at line 130 of file process.cc.

References _disabled, _terminated, and forEachKid().

Referenced by sc_core::sc_process_handle::enable().

◆ fiber()

virtual gem5::Fiber * sc_gem5::Process::fiber ( )
inlinevirtual

Reimplemented in sc_gem5::Thread.

Definition at line 121 of file process.hh.

References gem5::Fiber::primaryFiber().

Referenced by sc_gem5::Scheduler::yield().

◆ forEachKid()

void sc_gem5::Process::forEachKid ( const std::function< void(Process *)> & work)

◆ hasStaticSensitivities()

bool sc_gem5::Process::hasStaticSensitivities ( )
inline

Definition at line 128 of file process.hh.

References staticSensitivities.

◆ incref()

void sc_gem5::Process::incref ( )
inline

◆ injectException()

void sc_gem5::Process::injectException ( ExceptionWrapperBase & exc)

Definition at line 216 of file process.cc.

References excWrapper, sc_gem5::Scheduler::runNow(), and sc_gem5::scheduler.

Referenced by kill(), reset(), and throw_it().

◆ inReset()

bool sc_gem5::Process::inReset ( )
inline

Definition at line 131 of file process.hh.

References _syncReset, asyncResetCount, and syncResetCount.

Referenced by sc_gem5::Scheduler::yield().

◆ internal()

bool sc_gem5::Process::internal ( )
inline

Definition at line 129 of file process.hh.

References _internal.

◆ isUnwinding() [1/2]

bool sc_gem5::Process::isUnwinding ( ) const
inline

◆ isUnwinding() [2/2]

void sc_gem5::Process::isUnwinding ( bool v)
inline

Definition at line 70 of file process.hh.

References _isUnwinding.

◆ joinWait()

void sc_gem5::Process::joinWait ( ::sc_core::sc_join * join)
inline

Definition at line 136 of file process.hh.

References joinWaiters.

◆ kill()

◆ lastReport() [1/2]

sc_core::sc_report * sc_gem5::Process::lastReport ( ) const

Definition at line 376 of file process.cc.

References _lastReport.

◆ lastReport() [2/2]

◆ needsStart() [1/2]

bool sc_gem5::Process::needsStart ( ) const
inline

Definition at line 66 of file process.hh.

References _needsStart.

Referenced by run(), and sc_gem5::Scheduler::yield().

◆ needsStart() [2/2]

void sc_gem5::Process::needsStart ( bool ns)
inline

Definition at line 67 of file process.hh.

References _needsStart.

◆ newest()

◆ procKind()

virtual::sc_core::sc_curr_proc_kind sc_gem5::Process::procKind ( ) const
pure virtual

◆ ready()

void sc_gem5::Process::ready ( )

◆ reset()

◆ resetEvent()

::sc_core::sc_event & sc_gem5::Process::resetEvent ( )
inline

Definition at line 101 of file process.hh.

References _resetEvent.

Referenced by sc_core::sc_process_handle::reset_event(), and sc_gem5::Scheduler::yield().

◆ resume()

void sc_gem5::Process::resume ( bool inc_kids)

◆ run()

◆ satisfySensitivity()

void sc_gem5::Process::satisfySensitivity ( Sensitivity * s)

◆ scheduled() [1/2]

bool sc_gem5::Process::scheduled ( ) const
inline

Definition at line 73 of file process.hh.

References _scheduled.

Referenced by ready(), and sc_gem5::Scheduler::yield().

◆ scheduled() [2/2]

void sc_gem5::Process::scheduled ( bool new_val)
inline

Definition at line 74 of file process.hh.

References _scheduled.

◆ setDynamic()

void sc_gem5::Process::setDynamic ( DynamicSensitivity * s)

Definition at line 288 of file process.cc.

References sc_gem5::Sensitivity::clear(), and dynamicSensitivity.

Referenced by clearDynamic(), and timeout().

◆ setStackSize()

void sc_gem5::Process::setStackSize ( size_t size)
inline

Definition at line 104 of file process.hh.

References stackSize.

Referenced by sc_core::sc_module::set_stack_size().

◆ setTimeout()

void sc_gem5::Process::setTimeout ( ::sc_core::sc_time t)

◆ signalReset()

void sc_gem5::Process::signalReset ( bool set,
bool sync )

◆ suspend()

◆ suspended()

bool sc_gem5::Process::suspended ( ) const
inline

Definition at line 78 of file process.hh.

References _suspended.

Referenced by ready().

◆ syncResetOff()

void sc_gem5::Process::syncResetOff ( bool inc_kids)

Definition at line 232 of file process.cc.

References _syncReset, and forEachKid().

Referenced by sc_core::sc_process_handle::sync_reset_off().

◆ syncResetOn()

void sc_gem5::Process::syncResetOn ( bool inc_kids)

Definition at line 223 of file process.cc.

References _syncReset, and forEachKid().

Referenced by sc_core::sc_process_handle::sync_reset_on().

◆ terminate()

void sc_gem5::Process::terminate ( )
protected

◆ terminated()

bool sc_gem5::Process::terminated ( ) const
inline

Definition at line 71 of file process.hh.

References _terminated.

Referenced by sc_core::sc_process_handle::terminated().

◆ terminatedEvent()

::sc_core::sc_event & sc_gem5::Process::terminatedEvent ( )
inline

Definition at line 102 of file process.hh.

References _terminatedEvent.

Referenced by sc_core::sc_process_handle::terminated_event().

◆ throw_it()

◆ timedOut()

bool sc_gem5::Process::timedOut ( )
inline

Definition at line 130 of file process.hh.

References _timedOut.

◆ timeout()

void sc_gem5::Process::timeout ( )
protected

Definition at line 318 of file process.cc.

References _timedOut, disabled(), dynamicSensitivity, ready(), and setDynamic().

Referenced by Process().

◆ uniqueName()

const char * sc_gem5::Process::uniqueName ( const char * seed)
inline

Definition at line 140 of file process.hh.

References sc_gem5::UniqueNameGen::gen(), and nameGen.

◆ waitCount()

void sc_gem5::Process::waitCount ( int count)
inline

Definition at line 138 of file process.hh.

References _waitCount.

Referenced by signalReset().

Member Data Documentation

◆ _disabled

bool sc_gem5::Process::_disabled
protected

Definition at line 182 of file process.hh.

Referenced by disable(), disabled(), and enable().

◆ _dontInitialize

bool sc_gem5::Process::_dontInitialize
protected

Definition at line 170 of file process.hh.

Referenced by dontInitialize(), and dontInitialize().

◆ _dynamic

bool sc_gem5::Process::_dynamic
protected

Definition at line 173 of file process.hh.

Referenced by dynamic().

◆ _internal

bool sc_gem5::Process::_internal
protected

Definition at line 165 of file process.hh.

Referenced by internal().

◆ _isUnwinding

bool sc_gem5::Process::_isUnwinding
protected

Definition at line 174 of file process.hh.

Referenced by isUnwinding(), isUnwinding(), kill(), reset(), and run().

◆ _lastReport

std::unique_ptr<::sc_core::sc_report> sc_gem5::Process::_lastReport
protected

Definition at line 199 of file process.hh.

Referenced by lastReport(), and lastReport().

◆ _needsStart

bool sc_gem5::Process::_needsStart
protected

◆ _newest

Process * sc_gem5::Process::_newest
staticprotected

Definition at line 147 of file process.hh.

Referenced by newest().

◆ _resetEvent

InternalScEvent sc_gem5::Process::_resetEvent
protected

Definition at line 160 of file process.hh.

Referenced by reset(), and resetEvent().

◆ _scheduled

bool sc_gem5::Process::_scheduled
protected

Definition at line 176 of file process.hh.

Referenced by scheduled(), and scheduled().

◆ _suspended

bool sc_gem5::Process::_suspended
protected

Definition at line 180 of file process.hh.

Referenced by resume(), suspend(), suspended(), and terminate().

◆ _suspendedReady

bool sc_gem5::Process::_suspendedReady
protected

Definition at line 181 of file process.hh.

Referenced by ready(), reset(), resume(), suspend(), and terminate().

◆ _syncReset

bool sc_gem5::Process::_syncReset
protected

Definition at line 184 of file process.hh.

Referenced by inReset(), syncResetOff(), syncResetOn(), and terminate().

◆ _terminated

bool sc_gem5::Process::_terminated
protected

Definition at line 175 of file process.hh.

Referenced by disable(), enable(), kill(), reset(), resume(), suspend(), terminate(), terminated(), and throw_it().

◆ _terminatedEvent

InternalScEvent sc_gem5::Process::_terminatedEvent
protected

Definition at line 161 of file process.hh.

Referenced by terminate(), and terminatedEvent().

◆ _timedOut

bool sc_gem5::Process::_timedOut
protected

Definition at line 168 of file process.hh.

Referenced by satisfySensitivity(), timedOut(), and timeout().

◆ _waitCount

int sc_gem5::Process::_waitCount
protected

Definition at line 189 of file process.hh.

Referenced by satisfySensitivity(), and waitCount().

◆ asyncResetCount

int sc_gem5::Process::asyncResetCount
protected

Definition at line 187 of file process.hh.

Referenced by inReset(), and signalReset().

◆ dynamicSensitivity

DynamicSensitivity* sc_gem5::Process::dynamicSensitivity
protected

Definition at line 196 of file process.hh.

Referenced by satisfySensitivity(), setDynamic(), and timeout().

◆ excWrapper

ExceptionWrapperBase* sc_gem5::Process::excWrapper

Definition at line 91 of file process.hh.

Referenced by injectException(), and sc_gem5::Scheduler::yield().

◆ func

ProcessFuncWrapper* sc_gem5::Process::func
protected

Definition at line 163 of file process.hh.

Referenced by run(), and ~Process().

◆ joinWaiters

std::vector<::sc_core::sc_join *> sc_gem5::Process::joinWaiters
protected

Definition at line 201 of file process.hh.

Referenced by joinWait(), and terminate().

◆ nameGen

UniqueNameGen sc_gem5::Process::nameGen
protected

Definition at line 203 of file process.hh.

Referenced by uniqueName().

◆ refCount

int sc_gem5::Process::refCount
protected

Definition at line 191 of file process.hh.

Referenced by decref(), and incref().

◆ resets

std::vector<Reset *> sc_gem5::Process::resets
protected

Definition at line 197 of file process.hh.

Referenced by addReset().

◆ stackSize

size_t sc_gem5::Process::stackSize
protected

Definition at line 193 of file process.hh.

Referenced by sc_gem5::Thread::fiber(), and setStackSize().

◆ staticSensitivities

StaticSensitivities sc_gem5::Process::staticSensitivities
protected

Definition at line 195 of file process.hh.

Referenced by addStatic(), hasStaticSensitivities(), terminate(), and ~Process().

◆ syncResetCount

int sc_gem5::Process::syncResetCount
protected

Definition at line 186 of file process.hh.

Referenced by inReset(), and signalReset().

◆ timeoutEvent

ScEvent sc_gem5::Process::timeoutEvent

Definition at line 113 of file process.hh.

Referenced by cancelTimeout(), disable(), satisfySensitivity(), and setTimeout().


The documentation for this class was generated from the following files:

Generated on Tue Jun 18 2024 16:24:56 for gem5 by doxygen 1.11.0