sc_out_resolved.cc revision 13201:200a488db61f
11817SN/A/* 21817SN/A * Copyright 2018 Google, Inc. 31817SN/A * 41817SN/A * Redistribution and use in source and binary forms, with or without 51817SN/A * modification, are permitted provided that the following conditions are 61817SN/A * met: redistributions of source code must retain the above copyright 71817SN/A * notice, this list of conditions and the following disclaimer; 81817SN/A * redistributions in binary form must reproduce the above copyright 91817SN/A * notice, this list of conditions and the following disclaimer in the 101817SN/A * documentation and/or other materials provided with the distribution; 111817SN/A * neither the name of the copyright holders nor the names of its 121817SN/A * contributors may be used to endorse or promote products derived from 131817SN/A * this software without specific prior written permission. 141817SN/A * 151817SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 161817SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 171817SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 181817SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 191817SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 201817SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 211817SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 221817SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 231817SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 241817SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 251817SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 261817SN/A * 272665Ssaidi@eecs.umich.edu * Authors: Gabe Black 283499Ssaidi@eecs.umich.edu */ 291817SN/A 301817SN/A#include "base/logging.hh" 311817SN/A#include "systemc/ext/channel/sc_out_resolved.hh" 321817SN/A 331817SN/Anamespace sc_core 341817SN/A{ 351817SN/A 361817SN/Asc_out_resolved::sc_out_resolved() : sc_inout_resolved() {} 371817SN/Asc_out_resolved::sc_out_resolved(const char *name) : sc_inout_resolved(name) {} 384762Snate@binkert.orgsc_out_resolved::~sc_out_resolved() {} 394762Snate@binkert.org 401817SN/Asc_out_resolved & 411817SN/Asc_out_resolved::operator = (const sc_dt::sc_logic &l) 425034Smilesck@eecs.umich.edu{ 434762Snate@binkert.org (*this)->write(l); 443348Sbinkertn@umich.edu return *this; 451817SN/A} 461817SN/A 473499Ssaidi@eecs.umich.edusc_out_resolved & 483499Ssaidi@eecs.umich.edusc_out_resolved::operator = (const sc_signal_in_if<sc_dt::sc_logic> &i) 491817SN/A{ 503499Ssaidi@eecs.umich.edu (*this)->write(i.read()); 513499Ssaidi@eecs.umich.edu return *this; 521817SN/A} 532539SN/A 541817SN/Asc_out_resolved & 552539SN/Asc_out_resolved::operator = ( 563814Ssaidi@eecs.umich.edu const sc_port<sc_signal_in_if<sc_dt::sc_logic>, 1> &p) 573814Ssaidi@eecs.umich.edu{ 583814Ssaidi@eecs.umich.edu (*this)->write(p->read()); 593814Ssaidi@eecs.umich.edu return *this; 603814Ssaidi@eecs.umich.edu} 611817SN/A 624762Snate@binkert.orgsc_out_resolved & 634762Snate@binkert.orgsc_out_resolved::operator = ( 644762Snate@binkert.org const sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1> &p) 654762Snate@binkert.org{ 664762Snate@binkert.org (*this)->write(p->read()); 674762Snate@binkert.org return *this; 681817SN/A} 691817SN/A 702539SN/Asc_out_resolved & 711817SN/Asc_out_resolved::operator = (const sc_out_resolved &p) 722539SN/A{ 731817SN/A (*this)->write(p->read()); 741817SN/A return *this; 751817SN/A} 762982Sstever@eecs.umich.edu 771817SN/A} // namespace sc_core 781817SN/A