My Project
Public Types | Public Member Functions | List of all members
sc_during_if Class Referenceabstract
Inheritance diagram for sc_during_if:
Inheritance graph
[legend]

Public Types

enum  mode { seq, thread, pool, ondemand }
 

Public Member Functions

template<typename T >
std::function< void()> bind_this (void(T::*f)(void))
 
virtual void extra_time (const sc_core::sc_time &t)=0
 
virtual void extra_time (double time, sc_core::sc_time_unit unit)
 
virtual void catch_up (const sc_core::sc_time &t)=0
 
virtual void catch_up (double time, sc_core::sc_time_unit unit)
 
virtual void catch_up ()
 
virtual void sc_call (const std::function< void()> &f)=0
 
virtual void async_sc_call (const std::function< void()> &f)=0
 
virtual void during_done ()=0
 
virtual void during (const sc_core::sc_time &time, const std::function< void()> &routine)=0
 
virtual void during (double time, sc_core::sc_time_unit unit, const std::function< void()> &routine)
 
virtual mode get_mode ()=0
 

Detailed Description

Definition at line 19 of file during-if.h.

Member Function Documentation

◆ async_sc_call()

virtual void sc_during_if::async_sc_call ( const std::function< void()> &  f)
pure virtual

Call the function f in the context of SystemC. This function is similar to sc_call, except that after the function call is initiated, the during task does not wait for the completion of f rather it continues executing the other instructions in during task.

Implemented in sc_during_env, sc_during_ondemand, sc_during_thread, sc_during_pool, and sc_during_seq.

◆ bind_this()

template<typename T >
std::function<void()> sc_during_if::bind_this ( void(T::*)(void)  f)
inline

Convenience helper to call std::bind on methods of this object. Call

bind_this(&current_object::method, arg1, arg2)

instead of

std::bind(&current_object::method, this, arg1, arg2)

Definition at line 35 of file during-if.h.

◆ catch_up() [1/3]

virtual void sc_during_if::catch_up ( )
inlinevirtual

Convenience wrapper around catch_up() with SC_ZERO_TIME argument. This function blocks the task until the SystemC time reaches the end of the current during task.

Definition at line 74 of file during-if.h.

◆ catch_up() [2/3]

virtual void sc_during_if::catch_up ( const sc_core::sc_time &  t)
pure virtual

Blocks the current task until the SystemC time has reached the end of the task, minus t.

If t == 0, this means wait until the SystemC time has reached the end of this task.

Implemented in sc_during_env, sc_during_ondemand, sc_during_thread, sc_during_pool, and sc_during_seq.

◆ catch_up() [3/3]

virtual void sc_during_if::catch_up ( double  time,
sc_core::sc_time_unit  unit 
)
inlinevirtual

Convenience wrapper around catch_up(), allowing to use a time value and a time unit.

Definition at line 65 of file during-if.h.

◆ during() [1/2]

virtual void sc_during_if::during ( const sc_core::sc_time &  time,
const std::function< void()> &  routine 
)
pure virtual

Create a "during task" of duration time, executing the function routine.

The function routine may be executed as a separate OS thread, and is not allowed to execute SystemC primitives like wait or notify().

Implemented in sc_during_env, sc_during_ondemand, sc_during_thread, sc_during_seq, and sc_during_pool.

◆ during() [2/2]

virtual void sc_during_if::during ( double  time,
sc_core::sc_time_unit  unit,
const std::function< void()> &  routine 
)
inlinevirtual

Convenience wrapper around during(), allowing to use a time value and a time unit.

Definition at line 115 of file during-if.h.

◆ during_done()

virtual void sc_during_if::during_done ( )
pure virtual

Check if the during task is finished which should return the control to SystemC.

Implemented in sc_during_env, sc_during_ondemand, sc_during_thread, sc_during_pool, and sc_during_seq.

◆ extra_time() [1/2]

virtual void sc_during_if::extra_time ( const sc_core::sc_time &  t)
pure virtual

Increase duration of current task by t

Implemented in sc_during_env, sc_during_ondemand, sc_during_thread, sc_during_pool, and sc_during_seq.

◆ extra_time() [2/2]

virtual void sc_during_if::extra_time ( double  time,
sc_core::sc_time_unit  unit 
)
inlinevirtual

Convenience wrapper around extra_time(), allowing to use a time value and a time unit.

Definition at line 48 of file during-if.h.

◆ sc_call()

virtual void sc_during_if::sc_call ( const std::function< void()> &  f)
pure virtual

Call the function f in the context of SystemC. Unlike the during task, f is allowed to access shared variables without locking, to call SystemC primitives like notify() or wait().

Implemented in sc_during_env, sc_during_ondemand, sc_during_thread, sc_during_pool, and sc_during_seq.


The documentation for this class was generated from the following file:
sc_during_if::bind_this
std::function< void()> bind_this(void(T::*f)(void))
Definition: during-if.h:35