00001 // vim:set et sts=4 ts=4 tw=75 sw=4 ai ci cin cino=g0,t0: 00002 /* 00003 * Copyright (C) 2007, Technical Computer Science Group, 00004 * University of Bonn 00005 * 00006 * This file is part of the ReChannel library. 00007 * 00008 * The ReChannel library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU General Public License as 00010 * published by the Free Software Foundation; either version 2 of the 00011 * License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be 00014 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this library; see the file COPYING. If not, write to the 00020 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 00021 * Boston, MA 02110-1301, USA. 00022 * 00023 * Authors: Andreas Raabe and Armin Felke. Implementation by Armin Felke. 00024 * {raabe, felke}@cs.uni-bonn.de 00025 */ 00037 #ifndef RC_RESOLVED_PORTS_H_ 00038 #define RC_RESOLVED_PORTS_H_ 00039 00040 #include "ReChannel/core/rc_common_header.h" 00041 00042 namespace ReChannel { 00043 00047 class rc_in_resolved 00048 : public ::sc_core::sc_in_resolved 00049 { 00050 private: 00051 typedef ::sc_core::sc_in_resolved base_type; 00052 00053 public: 00054 typedef sc_signal_in_if<sc_dt::sc_logic> if_type; 00055 00056 public: 00057 rc_in_resolved() { } 00058 explicit rc_in_resolved(const char* name_) 00059 : base_type(name_) 00060 {} 00061 00062 virtual void end_of_elaboration() 00063 { sc_in<sc_dt::sc_logic>::end_of_elaboration(); } 00064 }; 00065 00069 class rc_inout_resolved 00070 : public ::sc_core::sc_inout_resolved 00071 { 00072 private: 00073 typedef rc_inout_resolved this_type; 00074 typedef ::sc_core::sc_inout_resolved base_type; 00075 00076 public: 00077 typedef sc_signal_inout_if<sc_dt::sc_logic> if_type; 00078 00079 public: 00080 rc_inout_resolved() { } 00081 explicit rc_inout_resolved(const char* name_) 00082 : base_type(name_) 00083 {} 00084 00085 this_type& operator= (const sc_dt::sc_logic& v) 00086 { base_type::operator=(v); return *this; } 00087 this_type& operator= (const sc_signal_in_if<sc_dt::sc_logic>& v) 00088 { base_type::operator=(v); return *this; } 00089 this_type& operator= (const sc_port<sc_signal_in_if<sc_dt::sc_logic>, 1>& v) 00090 { base_type::operator=(v); return *this; } 00091 this_type& operator= (const sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>& v) 00092 { base_type::operator=(v); return *this; } 00093 this_type& operator= (const rc_inout_resolved& v) 00094 { base_type::operator=(v); return *this; } 00095 00096 virtual void end_of_elaboration() 00097 { sc_inout<sc_dt::sc_logic>::end_of_elaboration(); } 00098 }; 00099 00103 class rc_out_resolved 00104 : public rc_inout_resolved 00105 { 00106 private: 00107 typedef rc_out_resolved this_type; 00108 typedef rc_inout_resolved base_type; 00109 00110 public: 00111 typedef sc_signal_out_if<sc_dt::sc_logic> if_type; 00112 00113 public: 00114 rc_out_resolved() { } 00115 explicit rc_out_resolved(const char* name_) 00116 : base_type(name_) 00117 {} 00118 00119 this_type& operator= (const sc_dt::sc_logic& v) 00120 { base_type::operator=(v); return *this; } 00121 this_type& operator= (const sc_signal_in_if<sc_dt::sc_logic>& v) 00122 { base_type::operator=(v); return *this; } 00123 this_type& operator= (const sc_port<sc_signal_in_if<sc_dt::sc_logic>, 1>& v) 00124 { base_type::operator=(v); return *this; } 00125 this_type& operator= (const sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>& v) 00126 { base_type::operator=(v); return *this; } 00127 this_type& operator= (const rc_inout_resolved& v) 00128 { base_type::operator=(v); return *this; } 00129 }; 00130 00131 } // namespace ReChannel 00132 00133 #endif // RC_RESOLVED_PORTS_H_ 00134 00135 // 00136 // $Id: rc_resolved_ports.h,v 1.5 2007/11/23 13:25:45 felke Exp $ 00137 // $Source: /var/cvs/projekte/ReChannel-v2/src/ReChannel/components/rc_resolved_ports.h,v $ 00138 // 00139