⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sc_module.h

📁 system C源码 一种替代verilog的语言
💻 H
📖 第 1 页 / 共 2 页
字号:
        { ::sc_core::wait( t, el, simcontext() ); }    void wait( double v, sc_time_unit tu, sc_event_or_list& el )        { ::sc_core::wait( sc_time( v, tu, simcontext() ), el, simcontext() ); }    void wait( const sc_time& t, sc_event_and_list& el )        { ::sc_core::wait( t, el, simcontext() ); }    void wait( double v, sc_time_unit tu, sc_event_and_list& el )        { ::sc_core::wait( sc_time( v, tu, simcontext() ), el, simcontext() ); }    // static sensitivity for SC_METHODs    void next_trigger()	{ ::sc_core::next_trigger( simcontext() ); }    // dynamic sensitivty for SC_METHODs    void next_trigger( const sc_event& e )        { ::sc_core::next_trigger( e, simcontext() ); }    void next_trigger( sc_event_or_list& el )        { ::sc_core::next_trigger( el, simcontext() ); }    void next_trigger( sc_event_and_list& el )        { ::sc_core::next_trigger( el, simcontext() ); }    void next_trigger( const sc_time& t )        { ::sc_core::next_trigger( t, simcontext() ); }    void next_trigger( double v, sc_time_unit tu )        { ::sc_core::next_trigger( 	    sc_time( v, tu, simcontext() ), simcontext() ); }    void next_trigger( const sc_time& t, const sc_event& e )        { ::sc_core::next_trigger( t, e, simcontext() ); }    void next_trigger( double v, sc_time_unit tu, const sc_event& e )        { ::sc_core::next_trigger( 		sc_time( v, tu, simcontext() ), e, simcontext() ); }    void next_trigger( const sc_time& t, sc_event_or_list& el )        { ::sc_core::next_trigger( t, el, simcontext() ); }    void next_trigger( double v, sc_time_unit tu, sc_event_or_list& el )        { ::sc_core::next_trigger( 	    sc_time( v, tu, simcontext() ), el, simcontext() ); }    void next_trigger( const sc_time& t, sc_event_and_list& el )        { ::sc_core::next_trigger( t, el, simcontext() ); }    void next_trigger( double v, sc_time_unit tu, sc_event_and_list& el )        { ::sc_core::next_trigger( 	    sc_time( v, tu, simcontext() ), el, simcontext() ); }    // for SC_METHODs and SC_THREADs and SC_CTHREADs    bool timed_out()        { return ::sc_core::timed_out(); }    // for SC_CTHREADs    void halt()        { ::sc_core::halt( simcontext() ); }    void wait( int n )        { ::sc_core::wait( n, simcontext() ); }    void at_posedge( const sc_signal_in_if<bool>& s )	{ ::sc_core::at_posedge( s, simcontext() ); }    void at_posedge( const sc_signal_in_if<sc_dt::sc_logic>& s )	{ ::sc_core::at_posedge( s, simcontext() ); }    void at_negedge( const sc_signal_in_if<bool>& s )	{ ::sc_core::at_negedge( s, simcontext() ); }    void at_negedge( const sc_signal_in_if<sc_dt::sc_logic>& s )	{ ::sc_core::at_negedge( s, simcontext() ); }    // Catch uses of watching:    void watching( bool expr )        { SC_REPORT_ERROR(SC_ID_WATCHING_NOT_ALLOWED_,""); }    // These are protected so that user derived classes can refer to them.    sc_sensitive     sensitive;    sc_sensitive_pos sensitive_pos;    sc_sensitive_neg sensitive_neg;    // Function to set the stack size of the current (c)thread process.    void set_stack_size( std::size_t );    int append_port( sc_port_base* );private:    sc_module( const sc_module& );private:    bool                        m_end_module_called;    std::vector<sc_port_base*>* m_port_vec;    int                         m_port_index;    sc_name_gen*                m_name_gen;    std::vector<sc_object*>     m_child_objects;    sc_module_name*             m_module_name_p;public:    void defunct() { }    // positional binding methods (cont'd)    void operator () ( const sc_bind_proxy& p001,		       const sc_bind_proxy& p002 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p003 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p004 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p005 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p006 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p007 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p008 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p009 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p010 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p011 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p012 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p013 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p014 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p015 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p016 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p017 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p018 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p019 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p020 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p021 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p022 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p023 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p024 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p025 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p026 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p027 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p028 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p029 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p030 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p031 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p032 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p033 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p034 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p035 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p036 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p037 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p038 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p039 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p040 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p041 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p042 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p043 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p044 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p045 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p046 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p047 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p048 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p049 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p050 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p051 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p052 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p053 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p054 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p055 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p056 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p057 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p058 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p059 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p060 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p061 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p062 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p063 = SC_BIND_PROXY_NIL,		       const sc_bind_proxy& p064 = SC_BIND_PROXY_NIL );};extern sc_module* sc_module_dynalloc(sc_module*);#define SC_NEW(x)  ::sc_core::sc_module_dynalloc(new x);// -----------------------------------------------------------------------------// SOME MACROS TO SIMPLIFY SYNTAX:// -----------------------------------------------------------------------------#define SC_MODULE(user_module_name)                                           \    struct user_module_name : ::sc_core::sc_module#define SC_CTOR(user_module_name)                                             \    typedef user_module_name SC_CURRENT_USER_MODULE;                          \    user_module_name( ::sc_core::sc_module_name )// the SC_HAS_PROCESS macro call must be followed by a ;#define SC_HAS_PROCESS(user_module_name)                                      \    typedef user_module_name SC_CURRENT_USER_MODULE// The this-> construct on sensitive operators in the macros below is// required for gcc 4.x when a templated class has a templated parent that is// derived from sc_module://// template<typename X>// class B : public sc_module;// template<typename X>// class A : public B<X>#define declare_method_process(handle, name, host_tag, func)        \    {		                                                    \        ::sc_core::sc_process_handle handle =                      \	    sc_core::sc_get_curr_simcontext()->create_method_process( \		name,  false, SC_MAKE_FUNC_PTR( host_tag, func ), \		this, 0 ); \        this->sensitive << handle;                                        \        this->sensitive_pos << handle;                                    \        this->sensitive_neg << handle;                                    \    }#define declare_thread_process(handle, name, host_tag, func)        \    {                                                               \        ::sc_core::sc_process_handle handle =                      \	     sc_core::sc_get_curr_simcontext()->create_thread_process( \                 name,  false,           \                 SC_MAKE_FUNC_PTR( host_tag, func ), this, 0 ); \        this->sensitive << handle;                                        \        this->sensitive_pos << handle;                                    \        this->sensitive_neg << handle;                                    \    }#define declare_cthread_process(handle, name, host_tag, func, edge) \    {                                                               \        ::sc_core::sc_process_handle handle =                     \	     sc_core::sc_get_curr_simcontext()->create_cthread_process( \            name,  false,          \                     SC_MAKE_FUNC_PTR( host_tag, func ), this, 0 ); \        this->sensitive.operator() ( handle, edge );\    }#define SC_CTHREAD(func, edge)                                                \    declare_cthread_process( func ## _handle,                                 \                             #func,                                           \                             SC_CURRENT_USER_MODULE,                          \                             func,                                            \                             edge )#define SC_METHOD(func)                                                       \    declare_method_process( func ## _handle,                                  \                            #func,                                            \                            SC_CURRENT_USER_MODULE,                           \                            func )#define SC_THREAD(func)                                                       \    declare_thread_process( func ## _handle,                                  \                            #func,                                            \                            SC_CURRENT_USER_MODULE,                           \                            func )// ----------------------------------------------------------------------------//  TYPEDEFS// ----------------------------------------------------------------------------typedef sc_module sc_channel;typedef sc_module sc_behavior;} // namespace sc_core#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -