Go to the documentation of this file.
28 #ifndef __SYSTEMC_EXT_CORE_SC_SPAWN_HH__
29 #define __SYSTEMC_EXT_CORE_SC_SPAWN_HH__
40 class sc_spawn_options;
59 template <
typename T,
typename R>
71 const ::sc_core::sc_spawn_options *);
85 class sc_signal_in_if;
88 class sc_event_finder;
132 template <
typename T>
152 template <
typename T>
157 auto func = new ::sc_gem5::ProcessObjFuncWrapper<T>(
object);
162 template <
typename T>
164 sc_spawn(
typename T::result_type *r_p, T
object,
const char *name_p=
nullptr,
167 auto func = new ::sc_gem5::ProcessObjRetFuncWrapper<
168 T,
typename T::result_type>(object, r_p);
175 ::sc_core::sc_process_handle forkees[] = {
179 ::sc_core::sc_join join; \
180 for (int i = 0; i < sizeof(forkees) / sizeof(forkees[0]); i++) \
181 join.add_process(forkees[i]); \
188 ::sc_core::sc_join join; \
189 for (int i = 0; i < sizeof(forkees) / sizeof(forkees[0]); i++) \
190 join.add_process(forkees[i]); \
191 join.wait_clocked(); \
197 template <
typename F,
typename... Args>
199 decltype(std::bind(std::forward<F>(
f), std::forward<Args>(args)...))
201 return std::bind(std::forward<F>(
f), std::forward<Args>(args)...);
204 template <
typename T>
205 auto sc_ref(T &&
v) -> decltype(std::ref(std::forward<T>(
v)))
207 return std::ref(std::forward<T>(
v));
210 template <
typename T>
211 auto sc_cref(T &&
v) -> decltype(std::cref(std::forward<T>(
v)))
213 return std::cref(std::forward<T>(
v));
225 using namespace std::placeholders;
229 #endif //__SYSTEMC_EXT_CORE_SC_SPAWN_HH__
std::vector< Reset< const sc_signal_in_if< bool > > > _if_resets
std::vector< const sc_event * > _events
void async_reset_signal_is(const sc_in< bool > &, bool)
void set_sensitivity(const sc_event *)
void reset_signal_is(const sc_in< bool > &, bool)
Process * spawnWork(ProcessFuncWrapper *func, const char *name, const ::sc_core::sc_spawn_options *opts)
Reset(T *t, bool v, bool s)
std::vector< Reset< const sc_inout< bool > > > _inout_resets
std::vector< Reset< const sc_out< bool > > > _out_resets
std::vector< Reset< const sc_in< bool > > > _in_resets
ProcessObjFuncWrapper(T t)
std::vector< sc_event_finder * > _finders
ProcessObjRetFuncWrapper(T t, R *r)
std::vector< sc_port_base * > _ports
std::vector< sc_export_base * > _exports
const std::string & name()
auto sc_cref(T &&v) -> decltype(std::cref(std::forward< T >(v)))
auto sc_ref(T &&v) -> decltype(std::ref(std::forward< T >(v)))
sc_process_handle sc_spawn(T object, const char *name_p=nullptr, const sc_spawn_options *opt_p=nullptr)
sc_spawn_options & operator=(const sc_spawn_options &)
std::vector< sc_interface * > _interfaces
auto sc_bind(F &&f, Args &&...args) -> decltype(std::bind(std::forward< F >(f), std::forward< Args >(args)...))
sc_spawn_options(const sc_spawn_options &)
Generated on Wed Sep 30 2020 14:02:15 for gem5 by doxygen 1.8.17