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 #ifndef SC_SIGNAL_RESOLVED_PORTS_H
00028 #define SC_SIGNAL_RESOLVED_PORTS_H
00029
00030
00031 #include "sysc/communication/sc_signal_ports.h"
00032 #include "sysc/datatypes/bit/sc_logic.h"
00033
00034 namespace sc_core {
00035
00036
00042 class sc_in_resolved
00043 : public sc_in<sc_dt::sc_logic>
00044 {
00045 public:
00046
00047
00048
00049 typedef sc_dt::sc_logic data_type;
00050
00051 typedef sc_in_resolved this_type;
00052 typedef sc_in<data_type> base_type;
00053
00054 typedef base_type::in_if_type in_if_type;
00055 typedef base_type::in_port_type in_port_type;
00056 typedef base_type::inout_port_type inout_port_type;
00057
00058 public:
00059
00060
00061
00062 sc_in_resolved()
00063 : base_type()
00064 {}
00065
00066 explicit sc_in_resolved( const char* name_ )
00067 : base_type( name_ )
00068 {}
00069
00070 explicit sc_in_resolved( const in_if_type& interface_ )
00071 : base_type( interface_ )
00072 {}
00073
00074 sc_in_resolved( const char* name_, const in_if_type& interface_ )
00075 : base_type( name_, interface_ )
00076 {}
00077
00078 explicit sc_in_resolved( in_port_type& parent_ )
00079 : base_type( parent_ )
00080 {}
00081
00082 sc_in_resolved( const char* name_, in_port_type& parent_ )
00083 : base_type( name_, parent_ )
00084 {}
00085
00086 explicit sc_in_resolved( inout_port_type& parent_ )
00087 : base_type( parent_ )
00088 {}
00089
00090 sc_in_resolved( const char* name_, inout_port_type& parent_ )
00091 : base_type( name_, parent_ )
00092 {}
00093
00094 sc_in_resolved( this_type& parent_ )
00095 : base_type( parent_ )
00096 {}
00097
00098 sc_in_resolved( const char* name_, this_type& parent_ )
00099 : base_type( name_, parent_ )
00100 {}
00101
00102
00103
00104
00105 virtual ~sc_in_resolved()
00106 {}
00107
00108
00109
00110
00111
00112
00113 virtual void end_of_elaboration();
00114
00115 virtual const char* kind() const
00116 { return "sc_in_resolved"; }
00117
00118 private:
00119
00120
00121 sc_in_resolved( const this_type& );
00122 this_type& operator = ( const this_type& );
00123 };
00124
00125
00126
00132 class sc_inout_resolved
00133 : public sc_inout<sc_dt::sc_logic>
00134 {
00135 public:
00136
00137
00138
00139 typedef sc_dt::sc_logic data_type;
00140
00141 typedef sc_inout_resolved this_type;
00142 typedef sc_inout<data_type> base_type;
00143
00144 typedef base_type::in_if_type in_if_type;
00145 typedef base_type::in_port_type in_port_type;
00146 typedef base_type::inout_if_type inout_if_type;
00147 typedef base_type::inout_port_type inout_port_type;
00148
00149 public:
00150
00151
00152
00153 sc_inout_resolved()
00154 : base_type()
00155 {}
00156
00157 explicit sc_inout_resolved( const char* name_ )
00158 : base_type( name_ )
00159 {}
00160
00161 explicit sc_inout_resolved( inout_if_type& interface_ )
00162 : base_type( interface_ )
00163 {}
00164
00165 sc_inout_resolved( const char* name_, inout_if_type& interface_ )
00166 : base_type( name_, interface_ )
00167 {}
00168
00169 explicit sc_inout_resolved( inout_port_type& parent_ )
00170 : base_type( parent_ )
00171 {}
00172
00173 sc_inout_resolved( const char* name_, inout_port_type& parent_ )
00174 : base_type( name_, parent_ )
00175 {}
00176
00177 sc_inout_resolved( this_type& parent_ )
00178 : base_type( parent_ )
00179 {}
00180
00181 sc_inout_resolved( const char* name_, this_type& parent_ )
00182 : base_type( name_, parent_ )
00183 {}
00184
00185
00186
00187
00188 virtual ~sc_inout_resolved()
00189 {}
00190
00191
00192
00193
00194 this_type& operator = ( const data_type& value_ )
00195 { (*this)->write( value_ ); return *this; }
00196
00197 this_type& operator = ( const in_if_type& interface_ )
00198 { (*this)->write( interface_.read() ); return *this; }
00199
00200 this_type& operator = ( const in_port_type& port_ )
00201 { (*this)->write( port_->read() ); return *this; }
00202
00203 this_type& operator = ( const inout_port_type& port_ )
00204 { (*this)->write( port_->read() ); return *this; }
00205
00206 this_type& operator = ( const this_type& port_ )
00207 { (*this)->write( port_->read() ); return *this; }
00208
00209
00210
00211
00212
00213
00214 virtual void end_of_elaboration();
00215
00216 virtual const char* kind() const
00217 { return "sc_inout_resolved"; }
00218
00219 private:
00220
00221
00222 sc_inout_resolved( const this_type& );
00223 };
00224
00225
00226
00232
00233
00234
00235
00236 class sc_out_resolved
00237 : public sc_inout_resolved
00238 {
00239 public:
00240
00241
00242
00243 typedef sc_out_resolved this_type;
00244 typedef sc_inout_resolved base_type;
00245
00246 typedef base_type::data_type data_type;
00247
00248 typedef base_type::in_if_type in_if_type;
00249 typedef base_type::in_port_type in_port_type;
00250 typedef base_type::inout_if_type inout_if_type;
00251 typedef base_type::inout_port_type inout_port_type;
00252
00253 public:
00254
00255
00256
00257 sc_out_resolved()
00258 : base_type()
00259 {}
00260
00261 explicit sc_out_resolved( const char* name_ )
00262 : base_type( name_ )
00263 {}
00264
00265 explicit sc_out_resolved( inout_if_type& interface_ )
00266 : base_type( interface_ )
00267 {}
00268
00269 sc_out_resolved( const char* name_, inout_if_type& interface_ )
00270 : base_type( name_, interface_ )
00271 {}
00272
00273 explicit sc_out_resolved( inout_port_type& parent_ )
00274 : base_type( parent_ )
00275 {}
00276
00277 sc_out_resolved( const char* name_, inout_port_type& parent_ )
00278 : base_type( name_, parent_ )
00279 {}
00280
00281 sc_out_resolved( this_type& parent_ )
00282 : base_type( parent_ )
00283 {}
00284
00285 sc_out_resolved( const char* name_, this_type& parent_ )
00286 : base_type( name_, parent_ )
00287 {}
00288
00289
00290
00291
00292 virtual ~sc_out_resolved()
00293 {}
00294
00295
00296
00297
00298 this_type& operator = ( const data_type& value_ )
00299 { (*this)->write( value_ ); return *this; }
00300
00301 this_type& operator = ( const in_if_type& interface_ )
00302 { (*this)->write( interface_.read() ); return *this; }
00303
00304 this_type& operator = ( const in_port_type& port_ )
00305 { (*this)->write( port_->read() ); return *this; }
00306
00307 this_type& operator = ( const inout_port_type& port_ )
00308 { (*this)->write( port_->read() ); return *this; }
00309
00310 this_type& operator = ( const this_type& port_ )
00311 { (*this)->write( port_->read() ); return *this; }
00312
00313 virtual const char* kind() const
00314 { return "sc_out_resolved"; }
00315
00316 private:
00317
00318
00319 sc_out_resolved( const this_type& );
00320 };
00321
00322 }
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345 #endif
00346
00347