00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #if !defined(sc_spawn_options_h_INCLUDED)
00031 #define sc_spawn_options_h_INCLUDED
00032
00033 #include <vector>
00034 #include "sysc/communication/sc_export.h"
00035 #include "sysc/communication/sc_signal_ports.h"
00036
00037 namespace sc_core {
00038
00039 class sc_event;
00040 class sc_port_base;
00041 class sc_interface;
00042 class sc_event_finder;
00043 class sc_process_b;
00044 class sc_spawn_reset_base;
00045
00046
00047
00048
00049
00050 class sc_spawn_options {
00051 friend class sc_cthread_process;
00052 friend class sc_method_process;
00053 friend class sc_process_b;
00054 friend class sc_thread_process;
00055 public:
00056 sc_spawn_options() :
00057 m_dont_initialize(false), m_resets(), m_sensitive_events(),
00058 m_sensitive_event_finders(), m_sensitive_interfaces(),
00059 m_sensitive_port_bases(), m_spawn_method(false), m_stack_size(0)
00060 { }
00061
00062 ~sc_spawn_options();
00063
00064 void async_reset_signal_is( const sc_in<bool>&, bool level );
00065 void async_reset_signal_is( const sc_inout<bool>&, bool level );
00066 void async_reset_signal_is( const sc_out<bool>&, bool level );
00067 void async_reset_signal_is( const sc_signal_in_if<bool>&, bool level );
00068
00069 void reset_signal_is( const sc_in<bool>&, bool level );
00070 void reset_signal_is( const sc_inout<bool>&, bool level );
00071 void reset_signal_is( const sc_out<bool>&, bool level );
00072 void reset_signal_is( const sc_signal_in_if<bool>&, bool level );
00073
00074 void dont_initialize() { m_dont_initialize = true; }
00075
00076 bool is_method() const { return m_spawn_method; }
00077
00078 void set_stack_size(int stack_size) { m_stack_size = stack_size; }
00079
00080 void set_sensitivity(const sc_event* event)
00081 { m_sensitive_events.push_back(event); }
00082
00083 void set_sensitivity(sc_port_base* port_base)
00084 { m_sensitive_port_bases.push_back(port_base); }
00085
00086 void set_sensitivity(sc_interface* interface_p)
00087 { m_sensitive_interfaces.push_back(interface_p); }
00088
00089 void set_sensitivity(sc_export_base* export_base)
00090 { m_sensitive_interfaces.push_back(export_base->get_interface()); }
00091
00092 void set_sensitivity(sc_event_finder* event_finder)
00093 { m_sensitive_event_finders.push_back(event_finder); }
00094
00095 void spawn_method() { m_spawn_method = true; }
00096
00097 protected:
00098 void specify_resets() const;
00099
00100 private:
00101 sc_spawn_options( const sc_spawn_options& );
00102 const sc_spawn_options& operator = ( const sc_spawn_options& );
00103
00104 protected:
00105 bool m_dont_initialize;
00106 std::vector<sc_spawn_reset_base*> m_resets;
00107 std::vector<const sc_event*> m_sensitive_events;
00108 std::vector<sc_event_finder*> m_sensitive_event_finders;
00109 std::vector<sc_interface*> m_sensitive_interfaces;
00110 std::vector<sc_port_base*> m_sensitive_port_bases;
00111 bool m_spawn_method;
00112 int m_stack_size;
00113 };
00114
00115 }
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159 #endif // !defined(sc_spawn_options_h_INCLUDED)