sc_signal.hh revision 12945
112841Sgabeblack@google.com/* 212841Sgabeblack@google.com * Copyright 2018 Google, Inc. 312841Sgabeblack@google.com * 412841Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 512841Sgabeblack@google.com * modification, are permitted provided that the following conditions are 612841Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 712841Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 812841Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 912841Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 1012841Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 1112841Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 1212841Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 1312841Sgabeblack@google.com * this software without specific prior written permission. 1412841Sgabeblack@google.com * 1512841Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1612841Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1712841Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1812841Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1912841Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2012841Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2112841Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2212841Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2312841Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2412841Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2512841Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2612841Sgabeblack@google.com * 2712841Sgabeblack@google.com * Authors: Gabe Black 2812841Sgabeblack@google.com */ 2912841Sgabeblack@google.com 3012841Sgabeblack@google.com#ifndef __SYSTEMC_EXT_CHANNEL_SC_SIGNAL_HH__ 3112841Sgabeblack@google.com#define __SYSTEMC_EXT_CHANNEL_SC_SIGNAL_HH__ 3212841Sgabeblack@google.com 3312841Sgabeblack@google.com#include <iostream> 3412933Sgabeblack@google.com#include <string> 3512933Sgabeblack@google.com#include <vector> 3612841Sgabeblack@google.com 3713044Sgabeblack@google.com#include "../core/sc_module.hh" // for sc_gen_unique_name 3812841Sgabeblack@google.com#include "../core/sc_prim.hh" 3912841Sgabeblack@google.com#include "sc_signal_inout_if.hh" 4013044Sgabeblack@google.com#include "warn_unimpl.hh" // for warn_unimpl 4112841Sgabeblack@google.com 4212841Sgabeblack@google.comnamespace sc_core 4312841Sgabeblack@google.com{ 4412841Sgabeblack@google.com 4512841Sgabeblack@google.comclass sc_port_base; 4612841Sgabeblack@google.comclass sc_trace_file; 4712841Sgabeblack@google.com 4812933Sgabeblack@google.com// Nonstandard 4912933Sgabeblack@google.com// Despite having a warning "FOR INTERNAL USE ONLY!" in all caps above this 5012933Sgabeblack@google.com// class definition in the Accellera implementation, it appears in their 5112933Sgabeblack@google.com// examples and test programs, and so we need to have it here as well. 5212933Sgabeblack@google.comstruct sc_trace_params 5312933Sgabeblack@google.com{ 5412933Sgabeblack@google.com sc_trace_file *tf; 5512933Sgabeblack@google.com std::string name; 5612933Sgabeblack@google.com 5712933Sgabeblack@google.com sc_trace_params(sc_trace_file *tf, const std::string &name) : 5812933Sgabeblack@google.com tf(tf), name(name) 5912933Sgabeblack@google.com {} 6012933Sgabeblack@google.com}; 6112933Sgabeblack@google.comtypedef std::vector<sc_trace_params *> sc_trace_params_vec; 6212933Sgabeblack@google.com 6312933Sgabeblack@google.comtemplate <class T, sc_writer_policy WRITER_POLICY=SC_ONE_WRITER> 6412841Sgabeblack@google.comclass sc_signal : public sc_signal_inout_if<T>, 6512841Sgabeblack@google.com public sc_prim_channel 6612841Sgabeblack@google.com{ 6712841Sgabeblack@google.com public: 6812841Sgabeblack@google.com sc_signal() : sc_signal_inout_if<T>(), 6912841Sgabeblack@google.com sc_prim_channel(sc_gen_unique_name("signal")) 7012841Sgabeblack@google.com {} 7113044Sgabeblack@google.com explicit sc_signal(const char *name) : sc_signal_inout_if<T>(), 7213141Sgabeblack@google.com sc_prim_channel(name) 7312841Sgabeblack@google.com {} 7413044Sgabeblack@google.com explicit sc_signal(const char *name, const T &initial_value) : 7513044Sgabeblack@google.com sc_signal_inout_if<T>(), sc_prim_channel(name) 7613141Sgabeblack@google.com { 7712841Sgabeblack@google.com // Need to consume initial_value. 7812912Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 7913044Sgabeblack@google.com } 8013141Sgabeblack@google.com virtual ~sc_signal() {} 8113044Sgabeblack@google.com 8212841Sgabeblack@google.com virtual void 8312841Sgabeblack@google.com register_port(sc_port_base &, const char *) 8412841Sgabeblack@google.com { 8512841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 8612841Sgabeblack@google.com } 8712841Sgabeblack@google.com 8812841Sgabeblack@google.com virtual const T& 8912841Sgabeblack@google.com read() const 9013044Sgabeblack@google.com { 9113044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 9212841Sgabeblack@google.com return *(const T *)nullptr; 9312841Sgabeblack@google.com } 9412841Sgabeblack@google.com operator const T&() const 9512841Sgabeblack@google.com { 9612841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 9712841Sgabeblack@google.com return *(const T *)nullptr; 9812841Sgabeblack@google.com } 9913044Sgabeblack@google.com 10012841Sgabeblack@google.com virtual sc_writer_policy 10113044Sgabeblack@google.com get_writer_policy() const 10213044Sgabeblack@google.com { 10313044Sgabeblack@google.com return WRITER_POLICY; 10413044Sgabeblack@google.com } 10513044Sgabeblack@google.com virtual void 10612841Sgabeblack@google.com write(const T&) 10712841Sgabeblack@google.com { 10813044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 10912841Sgabeblack@google.com } 11013044Sgabeblack@google.com sc_signal<T, WRITER_POLICY> & 11112841Sgabeblack@google.com operator = (const T&) 11212841Sgabeblack@google.com { 11312841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 11413044Sgabeblack@google.com return *this; 11512841Sgabeblack@google.com } 11613044Sgabeblack@google.com sc_signal<T, WRITER_POLICY> & 11712841Sgabeblack@google.com operator = (const sc_signal<T, WRITER_POLICY> &) 11812841Sgabeblack@google.com { 11912841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 12012841Sgabeblack@google.com return *this; 12112841Sgabeblack@google.com } 12212841Sgabeblack@google.com 12313044Sgabeblack@google.com virtual const sc_event & 12412841Sgabeblack@google.com default_event() const 12512841Sgabeblack@google.com { 12612841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 12712841Sgabeblack@google.com return *(sc_event *)nullptr; 12813044Sgabeblack@google.com } 12912841Sgabeblack@google.com virtual const sc_event & 13012841Sgabeblack@google.com value_changed_event() const 13112841Sgabeblack@google.com { 13212841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 13313141Sgabeblack@google.com return *(sc_event *)nullptr; 13412841Sgabeblack@google.com } 13512841Sgabeblack@google.com virtual bool 13613044Sgabeblack@google.com event() const 13712841Sgabeblack@google.com { 13813044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 13912841Sgabeblack@google.com return false; 14013044Sgabeblack@google.com } 14113044Sgabeblack@google.com 14213044Sgabeblack@google.com virtual void 14312841Sgabeblack@google.com print(std::ostream & =std::cout) const 14412841Sgabeblack@google.com { 14512841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 14612841Sgabeblack@google.com } 14712841Sgabeblack@google.com virtual void 14812841Sgabeblack@google.com dump(std::ostream & =std::cout) const 14912841Sgabeblack@google.com { 15013044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 15113044Sgabeblack@google.com } 15213044Sgabeblack@google.com virtual const char *kind() const { return "sc_signal"; } 15313044Sgabeblack@google.com 15413205Sgabeblack@google.com protected: 15513205Sgabeblack@google.com virtual void 15613205Sgabeblack@google.com update() 15713205Sgabeblack@google.com { 15813205Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 15913205Sgabeblack@google.com } 16013205Sgabeblack@google.com 16113205Sgabeblack@google.com // These members which store the current and future value of the signal 16213141Sgabeblack@google.com // are not specified in the standard but are referred to directly by one 16313044Sgabeblack@google.com // of the tests. 16412841Sgabeblack@google.com T m_cur_val; 16512841Sgabeblack@google.com T m_new_val; 16612945Sgabeblack@google.com 16712945Sgabeblack@google.com private: 16812945Sgabeblack@google.com // Disabled 16912945Sgabeblack@google.com sc_signal(const sc_signal<T, WRITER_POLICY> &) : 17012945Sgabeblack@google.com sc_signal_inout_if<T>(), sc_prim_channel("") 17112945Sgabeblack@google.com {} 17212841Sgabeblack@google.com}; 17313044Sgabeblack@google.com 17413141Sgabeblack@google.comtemplate <class T, sc_writer_policy WRITER_POLICY> 17513044Sgabeblack@google.cominline std::ostream & 17612841Sgabeblack@google.comoperator << (std::ostream &os, const sc_signal<T, WRITER_POLICY> &) 17712841Sgabeblack@google.com{ 17812841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 17912841Sgabeblack@google.com return os; 18012841Sgabeblack@google.com} 18112841Sgabeblack@google.com 18212841Sgabeblack@google.comtemplate <sc_writer_policy WRITER_POLICY> 18312841Sgabeblack@google.comclass sc_signal<bool, WRITER_POLICY> : 18413142Sgabeblack@google.com public sc_signal_inout_if<bool>, public sc_prim_channel 18512841Sgabeblack@google.com{ 18613142Sgabeblack@google.com public: 18712841Sgabeblack@google.com sc_signal() 18812841Sgabeblack@google.com { 18912841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 19012841Sgabeblack@google.com } 19112841Sgabeblack@google.com explicit sc_signal(const char *) 19212841Sgabeblack@google.com { 19312841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 19412841Sgabeblack@google.com } 19513044Sgabeblack@google.com explicit sc_signal(const char *name, const bool &initial_value) : 19613044Sgabeblack@google.com sc_signal_inout_if<bool>(), sc_prim_channel(name) 19713141Sgabeblack@google.com { 19813141Sgabeblack@google.com // Need to consume initial_value. 19913044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 20013044Sgabeblack@google.com } 20113044Sgabeblack@google.com virtual ~sc_signal() 20213141Sgabeblack@google.com { 20313141Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 20413044Sgabeblack@google.com } 20512912Sgabeblack@google.com 20613044Sgabeblack@google.com virtual void 20713141Sgabeblack@google.com register_port(sc_port_base &, const char *) 20813141Sgabeblack@google.com { 20913044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 21013044Sgabeblack@google.com } 21112841Sgabeblack@google.com 21212841Sgabeblack@google.com virtual const bool & 21312841Sgabeblack@google.com read() const 21412841Sgabeblack@google.com { 21512841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 21612841Sgabeblack@google.com return *(const bool *)nullptr; 21712841Sgabeblack@google.com } 21813044Sgabeblack@google.com operator const bool &() const 21913044Sgabeblack@google.com { 22012841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 22112841Sgabeblack@google.com return *(const bool *)nullptr; 22212841Sgabeblack@google.com } 22312841Sgabeblack@google.com 22412841Sgabeblack@google.com virtual sc_writer_policy 22512841Sgabeblack@google.com get_writer_policy() const 22612841Sgabeblack@google.com { 22713044Sgabeblack@google.com return WRITER_POLICY; 22812841Sgabeblack@google.com } 22913044Sgabeblack@google.com virtual void 23013044Sgabeblack@google.com write(const bool &) 23113044Sgabeblack@google.com { 23213044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 23313044Sgabeblack@google.com } 23412841Sgabeblack@google.com sc_signal<bool, WRITER_POLICY> & 23512841Sgabeblack@google.com operator = (const bool &) 23613044Sgabeblack@google.com { 23712841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 23813044Sgabeblack@google.com return *this; 23912841Sgabeblack@google.com } 24012841Sgabeblack@google.com sc_signal<bool, WRITER_POLICY> & 24112841Sgabeblack@google.com operator = (const sc_signal<bool, WRITER_POLICY> &) 24213044Sgabeblack@google.com { 24312841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 24413044Sgabeblack@google.com return *this; 24512841Sgabeblack@google.com } 24612841Sgabeblack@google.com 24712841Sgabeblack@google.com virtual const sc_event & 24812841Sgabeblack@google.com default_event() const 24912841Sgabeblack@google.com { 25012841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 25113044Sgabeblack@google.com return *(sc_event *)nullptr; 25212841Sgabeblack@google.com } 25312841Sgabeblack@google.com 25412841Sgabeblack@google.com virtual const sc_event & 25512841Sgabeblack@google.com value_changed_event() const 25612841Sgabeblack@google.com { 25713044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 25812841Sgabeblack@google.com return *(sc_event *)nullptr; 25912841Sgabeblack@google.com } 26012841Sgabeblack@google.com virtual const sc_event & 26112841Sgabeblack@google.com posedge_event() const 26213044Sgabeblack@google.com { 26312841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 26412841Sgabeblack@google.com return *(sc_event *)nullptr; 26512841Sgabeblack@google.com } 26612841Sgabeblack@google.com virtual const sc_event & 26713044Sgabeblack@google.com negedge_event() const 26812841Sgabeblack@google.com { 26912841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 27012841Sgabeblack@google.com return *(sc_event *)nullptr; 27112841Sgabeblack@google.com } 27212841Sgabeblack@google.com 27313141Sgabeblack@google.com virtual bool 27412841Sgabeblack@google.com event() const 27512841Sgabeblack@google.com { 27612841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 27712841Sgabeblack@google.com return false; 27813141Sgabeblack@google.com } 27912841Sgabeblack@google.com virtual bool 28012841Sgabeblack@google.com posedge() const 28112841Sgabeblack@google.com { 28212841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 28313141Sgabeblack@google.com return false; 28412841Sgabeblack@google.com } 28512841Sgabeblack@google.com virtual bool 28613044Sgabeblack@google.com negedge() const 28712841Sgabeblack@google.com { 28813044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 28912841Sgabeblack@google.com return false; 29013044Sgabeblack@google.com } 29113044Sgabeblack@google.com 29213044Sgabeblack@google.com virtual void 29312841Sgabeblack@google.com print(std::ostream & =std::cout) const 29412841Sgabeblack@google.com { 29512841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 29612841Sgabeblack@google.com } 29712841Sgabeblack@google.com virtual void 29812841Sgabeblack@google.com dump(std::ostream & =std::cout) const 29912841Sgabeblack@google.com { 30013044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 30113044Sgabeblack@google.com } 30213044Sgabeblack@google.com virtual const char *kind() const { return "sc_signal"; } 30313044Sgabeblack@google.com 30413205Sgabeblack@google.com protected: 30513141Sgabeblack@google.com virtual void 30613205Sgabeblack@google.com update() 30713044Sgabeblack@google.com { 30813141Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 30913205Sgabeblack@google.com } 31013044Sgabeblack@google.com 31113141Sgabeblack@google.com private: 31212841Sgabeblack@google.com // Disabled 31312841Sgabeblack@google.com sc_signal(const sc_signal<bool, WRITER_POLICY> &) : 31413205Sgabeblack@google.com sc_signal_inout_if<bool>(), sc_prim_channel("") 31513205Sgabeblack@google.com {} 31613205Sgabeblack@google.com}; 31713205Sgabeblack@google.com 31813205Sgabeblack@google.comtemplate <sc_writer_policy WRITER_POLICY> 31913205Sgabeblack@google.comclass sc_signal<sc_dt::sc_logic, WRITER_POLICY> : 32013205Sgabeblack@google.com public sc_signal_inout_if<sc_dt::sc_logic>, public sc_prim_channel 32113044Sgabeblack@google.com{ 32213044Sgabeblack@google.com public: 32313044Sgabeblack@google.com sc_signal() 32412841Sgabeblack@google.com { 32513044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 32613044Sgabeblack@google.com } 32713044Sgabeblack@google.com explicit sc_signal(const char *) 32813044Sgabeblack@google.com { 32913141Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 33013141Sgabeblack@google.com } 33113141Sgabeblack@google.com explicit sc_signal(const char *name, 33213141Sgabeblack@google.com const sc_dt::sc_logic &initial_value) : 33312841Sgabeblack@google.com sc_signal_inout_if<sc_dt::sc_logic>(), sc_prim_channel(name) 33412841Sgabeblack@google.com { 33512841Sgabeblack@google.com // Need to consume initial_value. 33612841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 33712841Sgabeblack@google.com } 33812841Sgabeblack@google.com virtual ~sc_signal() 33912841Sgabeblack@google.com { 34012841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 34112841Sgabeblack@google.com } 34212841Sgabeblack@google.com 34312841Sgabeblack@google.com virtual void 34413044Sgabeblack@google.com register_port(sc_port_base &, const char *) 34513044Sgabeblack@google.com { 34613141Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 34713141Sgabeblack@google.com } 34813044Sgabeblack@google.com 34913044Sgabeblack@google.com virtual const sc_dt::sc_logic & 35013044Sgabeblack@google.com read() const 35113141Sgabeblack@google.com { 35213141Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 35313044Sgabeblack@google.com return *(const sc_dt::sc_logic *)nullptr; 35412912Sgabeblack@google.com } 35512912Sgabeblack@google.com operator const sc_dt::sc_logic &() const 35613044Sgabeblack@google.com { 35713141Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 35813141Sgabeblack@google.com return *(const sc_dt::sc_logic *)nullptr; 35913044Sgabeblack@google.com } 36013044Sgabeblack@google.com 36112841Sgabeblack@google.com virtual sc_writer_policy 36212841Sgabeblack@google.com get_writer_policy() const 36312841Sgabeblack@google.com { 36412841Sgabeblack@google.com return WRITER_POLICY; 36512841Sgabeblack@google.com } 36612841Sgabeblack@google.com virtual void 36712841Sgabeblack@google.com write(const sc_dt::sc_logic &) 36813044Sgabeblack@google.com { 36913044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 37012841Sgabeblack@google.com } 37112841Sgabeblack@google.com sc_signal<sc_dt::sc_logic, WRITER_POLICY> & 37212841Sgabeblack@google.com operator = (const sc_dt::sc_logic &) 37312841Sgabeblack@google.com { 37412841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 37512841Sgabeblack@google.com return *this; 37612841Sgabeblack@google.com } 37713044Sgabeblack@google.com sc_signal<sc_dt::sc_logic, WRITER_POLICY> & 37812841Sgabeblack@google.com operator = (const sc_signal<sc_dt::sc_logic, WRITER_POLICY> &) 37913044Sgabeblack@google.com { 38013044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 38113044Sgabeblack@google.com return *this; 38213044Sgabeblack@google.com } 38313044Sgabeblack@google.com 38412841Sgabeblack@google.com virtual const sc_event & 38512841Sgabeblack@google.com default_event() const 38613044Sgabeblack@google.com { 38712841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 38813044Sgabeblack@google.com return *(sc_event *)nullptr; 38912841Sgabeblack@google.com } 39012841Sgabeblack@google.com 39112841Sgabeblack@google.com virtual const sc_event & 39213044Sgabeblack@google.com value_changed_event() const 39312841Sgabeblack@google.com { 39413044Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 39512841Sgabeblack@google.com return *(sc_event *)nullptr; 39612841Sgabeblack@google.com } 39712841Sgabeblack@google.com virtual const sc_event & 39812841Sgabeblack@google.com posedge_event() const 39912841Sgabeblack@google.com { 40012841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 40113044Sgabeblack@google.com return *(sc_event *)nullptr; 40212841Sgabeblack@google.com } 40312841Sgabeblack@google.com virtual const sc_event & 40412841Sgabeblack@google.com negedge_event() const 40512841Sgabeblack@google.com { 40612841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 40713044Sgabeblack@google.com return *(sc_event *)nullptr; 40812841Sgabeblack@google.com } 40912841Sgabeblack@google.com 41012841Sgabeblack@google.com virtual bool 41112841Sgabeblack@google.com event() const 41213044Sgabeblack@google.com { 41312841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 41412841Sgabeblack@google.com return false; 41512841Sgabeblack@google.com } 41612841Sgabeblack@google.com virtual bool 41713044Sgabeblack@google.com posedge() const 41812841Sgabeblack@google.com { 41912841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 42012841Sgabeblack@google.com return false; 42112841Sgabeblack@google.com } 42212841Sgabeblack@google.com virtual bool 42313141Sgabeblack@google.com negedge() const 42412841Sgabeblack@google.com { 42512841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 42612841Sgabeblack@google.com return false; 42712841Sgabeblack@google.com } 42813141Sgabeblack@google.com 42912841Sgabeblack@google.com virtual void 43012841Sgabeblack@google.com print(std::ostream & =std::cout) const 43112841Sgabeblack@google.com { 43212841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 43313141Sgabeblack@google.com } 43412841Sgabeblack@google.com virtual void 43512841Sgabeblack@google.com dump(std::ostream & =std::cout) const 43613044Sgabeblack@google.com { 43712841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 43813044Sgabeblack@google.com } 43912841Sgabeblack@google.com virtual const char *kind() const { return "sc_signal"; } 44013044Sgabeblack@google.com 44113044Sgabeblack@google.com protected: 44213044Sgabeblack@google.com virtual void 44312841Sgabeblack@google.com update() 44412841Sgabeblack@google.com { 44512841Sgabeblack@google.com sc_channel_warn_unimpl(__PRETTY_FUNCTION__); 44612841Sgabeblack@google.com } 44712841Sgabeblack@google.com 44812841Sgabeblack@google.com private: 44912841Sgabeblack@google.com // Disabled 45013044Sgabeblack@google.com sc_signal(const sc_signal<sc_dt::sc_logic, WRITER_POLICY> &) : 45113044Sgabeblack@google.com sc_signal_inout_if<sc_dt::sc_logic>(), sc_prim_channel("") 45213044Sgabeblack@google.com {} 45313044Sgabeblack@google.com}; 45413205Sgabeblack@google.com 45513205Sgabeblack@google.com} // namespace sc_core 45613205Sgabeblack@google.com 45713205Sgabeblack@google.com#endif //__SYSTEMC_EXT_CHANNEL_SC_SIGNAL_HH__ 45813205Sgabeblack@google.com