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