sc_inout_rv.hh revision 12841
15647Sgblack@eecs.umich.edu/* 29544Sandreas.hansson@arm.com * Copyright 2018 Google, Inc. 38922Swilliam.wang@arm.com * 48922Swilliam.wang@arm.com * Redistribution and use in source and binary forms, with or without 58922Swilliam.wang@arm.com * modification, are permitted provided that the following conditions are 68922Swilliam.wang@arm.com * met: redistributions of source code must retain the above copyright 78922Swilliam.wang@arm.com * notice, this list of conditions and the following disclaimer; 88922Swilliam.wang@arm.com * redistributions in binary form must reproduce the above copyright 98922Swilliam.wang@arm.com * notice, this list of conditions and the following disclaimer in the 108922Swilliam.wang@arm.com * documentation and/or other materials provided with the distribution; 118922Swilliam.wang@arm.com * neither the name of the copyright holders nor the names of its 128922Swilliam.wang@arm.com * contributors may be used to endorse or promote products derived from 138922Swilliam.wang@arm.com * this software without specific prior written permission. 145647Sgblack@eecs.umich.edu * 155647Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 165647Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 177087Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 187087Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 197087Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 207087Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 217087Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 227087Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 237087Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 247087Snate@binkert.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 255647Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 267087Snate@binkert.org * 277087Snate@binkert.org * Authors: Gabe Black 287087Snate@binkert.org */ 297087Snate@binkert.org 307087Snate@binkert.org#ifndef __SYSTEMC_EXT_CHANNEL_SC_INOUT_RV_HH__ 317087Snate@binkert.org#define __SYSTEMC_EXT_CHANNEL_SC_INOUT_RV_HH__ 327087Snate@binkert.org 337087Snate@binkert.org#include "../core/sc_port.hh" 345647Sgblack@eecs.umich.edu#include "sc_signal_in_if.hh" 357087Snate@binkert.org#include "sc_signal_inout_if.hh" 365647Sgblack@eecs.umich.edu#include "warn_unimpl.hh" 375647Sgblack@eecs.umich.edu 385647Sgblack@eecs.umich.edunamespace sc_dt 395647Sgblack@eecs.umich.edu{ 405647Sgblack@eecs.umich.edu 415647Sgblack@eecs.umich.edutemplate <int W> 425647Sgblack@eecs.umich.educlass sc_lv; 435647Sgblack@eecs.umich.edu 445647Sgblack@eecs.umich.edu} // namespace sc_dt 455647Sgblack@eecs.umich.edu 465647Sgblack@eecs.umich.edunamespace sc_core 475647Sgblack@eecs.umich.edu{ 485647Sgblack@eecs.umich.edu 495647Sgblack@eecs.umich.edutemplate <int W> 505647Sgblack@eecs.umich.educlass sc_inout_rv : public sc_inout<sc_dt::sc_lv<W>> 515647Sgblack@eecs.umich.edu{ 5211793Sbrandon.potter@amd.com public: 5311793Sbrandon.potter@amd.com sc_inout_rv() : sc_inout<sc_dt::sc_lv<W>>() {} 5410474Sandreas.hansson@arm.com explicit sc_inout_rv(const char *name) : sc_inout<sc_dt::sc_lv<W>>(name) {} 5510474Sandreas.hansson@arm.com virtual ~sc_inout_rv() {} 5611793Sbrandon.potter@amd.com 578229Snate@binkert.org sc_inout_rv<W> & 585647Sgblack@eecs.umich.edu operator = (const sc_dt::sc_lv<W> &) 598232Snate@binkert.org { 606137Sgblack@eecs.umich.edu sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 616137Sgblack@eecs.umich.edu return *this; 626137Sgblack@eecs.umich.edu } 635654Sgblack@eecs.umich.edu sc_inout_rv<W> & 6411793Sbrandon.potter@amd.com operator = (const sc_signal_in_if<sc_dt::sc_lv<W>> &) 656046Sgblack@eecs.umich.edu { 665647Sgblack@eecs.umich.edu sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 675648Sgblack@eecs.umich.edu return *this; 685648Sgblack@eecs.umich.edu } 695647Sgblack@eecs.umich.edu sc_inout_rv<W> & 705647Sgblack@eecs.umich.edu operator = (const sc_port<sc_signal_in_if<sc_dt::sc_lv<W>>, 1> &) 715647Sgblack@eecs.umich.edu { 725647Sgblack@eecs.umich.edu sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 735647Sgblack@eecs.umich.edu return *this; 745647Sgblack@eecs.umich.edu } 755647Sgblack@eecs.umich.edu sc_inout_rv<W> & 765647Sgblack@eecs.umich.edu operator = (const sc_port<sc_signal_inout_if<sc_dt::sc_lv<W>>, 1> &) 775647Sgblack@eecs.umich.edu { 785648Sgblack@eecs.umich.edu sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 795647Sgblack@eecs.umich.edu return *this; 805648Sgblack@eecs.umich.edu } 815648Sgblack@eecs.umich.edu sc_inout_rv<W> & 825648Sgblack@eecs.umich.edu operator = (const sc_inout_rv<W> &) 835648Sgblack@eecs.umich.edu { 845648Sgblack@eecs.umich.edu sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 855648Sgblack@eecs.umich.edu return *this; 865648Sgblack@eecs.umich.edu } 875648Sgblack@eecs.umich.edu 885648Sgblack@eecs.umich.edu virtual void end_of_elaboration() {}; 895648Sgblack@eecs.umich.edu 905648Sgblack@eecs.umich.edu virtual const char *kind() const { return "sc_inout_rv"; } 915648Sgblack@eecs.umich.edu}; 925648Sgblack@eecs.umich.edu 935648Sgblack@eecs.umich.edu} // namespace sc_core 945648Sgblack@eecs.umich.edu 955648Sgblack@eecs.umich.edu#endif //__SYSTEMC_EXT_CHANNEL_SC_INOUT_RV_HH__ 965648Sgblack@eecs.umich.edu