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