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_RV_PORTS_H_ 00038 #define RC_RV_PORTS_H_ 00039 00040 #include "ReChannel/core/rc_common_header.h" 00041 00042 namespace ReChannel { 00043 00047 template<int W> 00048 class rc_in_rv 00049 : public ::sc_core::sc_in_rv<W> 00050 { 00051 private: 00052 typedef typename ::sc_core::sc_in_rv<W> base_type; 00053 00054 public: 00055 typedef sc_signal_in_if<sc_dt::sc_lv<W> > if_type; 00056 00057 public: 00058 rc_in_rv() { } 00059 00060 explicit rc_in_rv(const char* name_) 00061 : base_type(name_) 00062 { } 00063 00064 virtual void end_of_elaboration() 00065 { sc_in<sc_dt::sc_lv<W> >::end_of_elaboration(); } 00066 }; 00067 00071 template<int W> 00072 class rc_inout_rv 00073 : public ::sc_core::sc_inout_rv<W> 00074 { 00075 private: 00076 typedef rc_inout_rv<W> this_type; 00077 typedef ::sc_core::sc_inout_rv<W> base_type; 00078 00079 public: 00080 typedef sc_signal_inout_if<sc_dt::sc_lv<W> > if_type; 00081 00082 public: 00083 rc_inout_rv() { } 00084 00085 explicit rc_inout_rv(const char* name_) 00086 : base_type(name_) 00087 { } 00088 00089 this_type& operator= (const sc_dt::sc_lv<W>& v) 00090 { base_type::operator=(v); return *this; } 00091 this_type& operator= (const sc_signal_in_if<sc_dt::sc_lv<W> >& v) 00092 { base_type::operator=(v); return *this; } 00093 this_type& operator= (const sc_port<sc_signal_in_if<sc_dt::sc_lv<W> >, 1>& v) 00094 { base_type::operator=(v); return *this; } 00095 this_type& operator= (const sc_port<sc_signal_inout_if<sc_dt::sc_lv<W> >, 1>& v) 00096 { base_type::operator=(v); return *this; } 00097 this_type& operator= (const rc_inout_rv<W>& v) 00098 { base_type::operator=(v); return *this; } 00099 00100 virtual void end_of_elaboration() 00101 { sc_inout<sc_dt::sc_lv<W> >::end_of_elaboration(); } 00102 }; 00103 00107 template<int W> 00108 class rc_out_rv 00109 : public ::sc_core::sc_out_rv<W> 00110 { 00111 private: 00112 typedef rc_out_rv<W> this_type; 00113 typedef ::sc_core::sc_out_rv<W> base_type; 00114 00115 public: 00116 typedef sc_signal_out_if<sc_dt::sc_lv<W> > if_type; 00117 00118 public: 00119 rc_out_rv() { } 00120 00121 explicit rc_out_rv(const char* name_) 00122 : base_type(name_) 00123 { } 00124 00125 this_type& operator= (const sc_dt::sc_lv<W>& v) 00126 { base_type::operator=(v); return *this; } 00127 this_type& operator= (const sc_signal_in_if<sc_dt::sc_lv<W> >& v) 00128 { base_type::operator=(v); return *this; } 00129 this_type& operator= (const sc_port<sc_signal_in_if<sc_dt::sc_lv<W> >, 1>& v) 00130 { base_type::operator=(v); return *this; } 00131 this_type& operator= (const sc_port<sc_signal_inout_if<sc_dt::sc_lv<W> >, 1>& v) 00132 { base_type::operator=(v); return *this; } 00133 this_type& operator= (const rc_inout_rv<W>& v) 00134 { base_type::operator=(v); return *this; } 00135 00136 virtual void end_of_elaboration() 00137 { sc_inout<sc_dt::sc_lv<W> >::end_of_elaboration(); } 00138 }; 00139 00140 } // namespace ReChannel 00141 00142 #endif // RC_RV_PORTS_H_ 00143 00144 // 00145 // $Id: rc_rv_ports.h,v 1.6 2007/11/23 13:25:45 felke Exp $ 00146 // $Source: /var/cvs/projekte/ReChannel-v2/src/ReChannel/components/rc_rv_ports.h,v $ 00147 // 00148