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
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef SC_SENSITIVE_H
00055 #define SC_SENSITIVE_H
00056
00057 #include "sysc/kernel/sc_process.h"
00058
00059 namespace sc_dt
00060 {
00061 class sc_logic;
00062 }
00063
00064 namespace sc_core {
00065
00066 class sc_process_handle;
00067 class sc_event;
00068 class sc_event_finder;
00069 class sc_interface;
00070 class sc_module;
00071 class sc_port_base;
00072 template <class T> class sc_in;
00073 template <class T> class sc_inout;
00074 template <class T> class sc_signal_in_if;
00075
00076
00077
00078
00079
00080
00081
00082
00083 class sc_sensitive
00084 {
00085 friend class sc_module;
00086
00087 public:
00088
00089
00090 typedef sc_signal_in_if<bool> in_if_b_type;
00091 typedef sc_signal_in_if<sc_dt::sc_logic> in_if_l_type;
00092 typedef sc_in<bool> in_port_b_type;
00093 typedef sc_in<sc_dt::sc_logic> in_port_l_type;
00094 typedef sc_inout<bool> inout_port_b_type;
00095 typedef sc_inout<sc_dt::sc_logic> inout_port_l_type;
00096
00097 private:
00098
00099
00100 explicit sc_sensitive( sc_module* );
00101
00102
00103 ~sc_sensitive();
00104
00105 public:
00106
00107
00108 sc_sensitive& operator << ( sc_process_handle );
00109 #if 0
00110 sc_sensitive& operator << ( sc_method_handle );
00111 sc_sensitive& operator << ( sc_thread_handle );
00112 #endif // 0
00113
00114 sc_sensitive& operator () ( const sc_event& );
00115 sc_sensitive& operator () ( const sc_interface& );
00116 sc_sensitive& operator () ( const sc_port_base& );
00117 sc_sensitive& operator () ( sc_event_finder& );
00118
00119 sc_sensitive& operator << ( const sc_event& );
00120 sc_sensitive& operator << ( const sc_interface& );
00121 sc_sensitive& operator << ( const sc_port_base& );
00122 sc_sensitive& operator << ( sc_event_finder& );
00123
00124 sc_sensitive& operator () ( sc_cthread_handle, sc_event_finder& );
00125 sc_sensitive& operator () ( sc_cthread_handle, const in_if_b_type& );
00126 sc_sensitive& operator () ( sc_cthread_handle, const in_if_l_type& );
00127 sc_sensitive& operator () ( sc_cthread_handle, const in_port_b_type& );
00128 sc_sensitive& operator () ( sc_cthread_handle, const in_port_l_type& );
00129 sc_sensitive& operator () ( sc_cthread_handle, const inout_port_b_type& );
00130 sc_sensitive& operator () ( sc_cthread_handle, const inout_port_l_type& );
00131
00132 static void make_static_sensitivity( sc_process_b*, const sc_event& );
00133 static void make_static_sensitivity( sc_process_b*, const sc_interface& );
00134 static void make_static_sensitivity( sc_process_b*, const sc_port_base&);
00135 static void make_static_sensitivity( sc_process_b*, sc_event_finder& );
00136
00137 void reset();
00138
00139 private:
00140
00141 sc_module* m_module;
00142 enum { SC_NONE_, SC_METHOD_, SC_THREAD_ } m_mode;
00143 sc_process_b* m_handle;
00144
00145 private:
00146
00147
00148
00149 sc_sensitive();
00150 sc_sensitive( const sc_sensitive& );
00151 sc_sensitive& operator = ( const sc_sensitive& );
00152 };
00153
00154
00155
00156
00157
00158
00159
00160
00161 class sc_sensitive_pos
00162 {
00163 friend class sc_module;
00164
00165 public:
00166
00167
00168 typedef sc_signal_in_if<bool> in_if_b_type;
00169 typedef sc_signal_in_if<sc_dt::sc_logic> in_if_l_type;
00170 typedef sc_in<bool> in_port_b_type;
00171 typedef sc_in<sc_dt::sc_logic> in_port_l_type;
00172 typedef sc_inout<bool> inout_port_b_type;
00173 typedef sc_inout<sc_dt::sc_logic> inout_port_l_type;
00174
00175 private:
00176
00177
00178 explicit sc_sensitive_pos( sc_module* );
00179
00180
00181 ~sc_sensitive_pos();
00182
00183 public:
00184
00185
00186 sc_sensitive_pos& operator << ( sc_process_handle );
00187 sc_sensitive_pos& operator << ( sc_method_handle );
00188 sc_sensitive_pos& operator << ( sc_thread_handle );
00189
00190 sc_sensitive_pos& operator () ( const in_if_b_type& );
00191 sc_sensitive_pos& operator () ( const in_if_l_type& );
00192 sc_sensitive_pos& operator () ( const in_port_b_type& );
00193 sc_sensitive_pos& operator () ( const in_port_l_type& );
00194 sc_sensitive_pos& operator () ( const inout_port_b_type& );
00195 sc_sensitive_pos& operator () ( const inout_port_l_type& );
00196
00197 sc_sensitive_pos& operator << ( const in_if_b_type& );
00198 sc_sensitive_pos& operator << ( const in_if_l_type& );
00199 sc_sensitive_pos& operator << ( const in_port_b_type& );
00200 sc_sensitive_pos& operator << ( const in_port_l_type& );
00201 sc_sensitive_pos& operator << ( const inout_port_b_type& );
00202 sc_sensitive_pos& operator << ( const inout_port_l_type& );
00203
00204 void reset();
00205
00206 private:
00207
00208 sc_module* m_module;
00209 enum { SC_NONE_, SC_METHOD_, SC_THREAD_ } m_mode;
00210 sc_process_b* m_handle;
00211
00212 private:
00213
00214
00215 sc_sensitive_pos();
00216 sc_sensitive_pos( const sc_sensitive_pos& );
00217 sc_sensitive_pos& operator = ( const sc_sensitive_pos& );
00218 };
00219
00220
00221
00222
00223
00224
00225
00226
00227 class sc_sensitive_neg
00228 {
00229 friend class sc_module;
00230
00231 public:
00232
00233
00234 typedef sc_signal_in_if<bool> in_if_b_type;
00235 typedef sc_signal_in_if<sc_dt::sc_logic> in_if_l_type;
00236 typedef sc_in<bool> in_port_b_type;
00237 typedef sc_in<sc_dt::sc_logic> in_port_l_type;
00238 typedef sc_inout<bool> inout_port_b_type;
00239 typedef sc_inout<sc_dt::sc_logic> inout_port_l_type;
00240
00241 private:
00242
00243
00244 explicit sc_sensitive_neg( sc_module* );
00245
00246
00247 ~sc_sensitive_neg();
00248
00249 public:
00250
00251
00252 sc_sensitive_neg& operator << ( sc_process_handle );
00253 sc_sensitive_neg& operator << ( sc_method_handle );
00254 sc_sensitive_neg& operator << ( sc_thread_handle );
00255
00256 sc_sensitive_neg& operator () ( const in_if_b_type& );
00257 sc_sensitive_neg& operator () ( const in_if_l_type& );
00258 sc_sensitive_neg& operator () ( const in_port_b_type& );
00259 sc_sensitive_neg& operator () ( const in_port_l_type& );
00260 sc_sensitive_neg& operator () ( const inout_port_b_type& );
00261 sc_sensitive_neg& operator () ( const inout_port_l_type& );
00262
00263 sc_sensitive_neg& operator << ( const in_if_b_type& );
00264 sc_sensitive_neg& operator << ( const in_if_l_type& );
00265 sc_sensitive_neg& operator << ( const in_port_b_type& );
00266 sc_sensitive_neg& operator << ( const in_port_l_type& );
00267 sc_sensitive_neg& operator << ( const inout_port_b_type& );
00268 sc_sensitive_neg& operator << ( const inout_port_l_type& );
00269
00270 void reset();
00271
00272 private:
00273
00274 sc_module* m_module;
00275 enum { SC_NONE_, SC_METHOD_, SC_THREAD_ } m_mode;
00276 sc_process_b* m_handle;
00277
00278 private:
00279
00280
00281 sc_sensitive_neg();
00282 sc_sensitive_neg( const sc_sensitive_neg& );
00283 sc_sensitive_neg& operator = ( const sc_sensitive_neg& );
00284 };
00285
00286 }
00287
00288 #endif
00289
00290