90 , m_change_event_p( 0 )
100 virtual const char*
kind()
const
101 {
return "sc_signal_channel"; }
105 {
return value_changed_event(); }
112 {
return simcontext()->event_occurred(m_change_stamp); }
125 {
if( ev ) ev->notify_next_delta(); }
154template<
class T, sc_writer_policy POL >
182 virtual const char*
kind()
const
183 {
return "sc_signal"; }
219 operator const T& ()
const
225 {
write( a );
return *
this; }
252 virtual void print( ::std::ostream& = ::std::cout )
const;
253 virtual void dump( ::std::ostream& = ::std::cout )
const;
272template<
class T, sc_writer_policy POL >
276 ,
const char* if_typename_ )
278 bool is_output = std::string( if_typename_ ) ==
typeid(
if_type).name();
279 if( !policy_type::check_port(
this, &port_, is_output ) )
286template<
class T, sc_writer_policy POL >
292 bool value_changed = !( m_new_val == value_ );
293 if ( !policy_type::check_write(
this, value_changed) )
297 if( value_changed || policy_type::needs_update() ) {
303template<
class T, sc_writer_policy POL >
311template<
class T, sc_writer_policy POL >
315 os <<
" name = " << name() << ::std::endl;
316 os <<
" value = " << m_cur_val << ::std::endl;
317 os <<
"new value = " << m_new_val << ::std::endl;
321template<
class T, sc_writer_policy POL >
325 policy_type::update();
326 if( !( m_new_val == m_cur_val ) ) {
331template<
class T, sc_writer_policy POL >
335 base_type::do_update();
336 m_cur_val = m_new_val;
345template<
class T, sc_writer_policy POL = SC_DEFAULT_WRITER_POLICY >
374 using base_type::operator=;
396template< sc_writer_policy POL >
412 , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 ) , m_reset_p( 0 )
418 , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 ) , m_reset_p( 0 )
423 , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 ) , m_reset_p( 0 )
436 {
return ( this->event() && this->m_cur_val ); }
440 {
return ( this->event() && ! this->m_cur_val ); }
444 using base_type::operator=;
446 { base_type::operator=(a);
return *
this; }
479template< sc_writer_policy POL >
493 , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 )
499 , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 )
504 , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 )
526 using base_type::operator=;
528 { base_type::operator=(a);
return *
this; }
#define SC_API_TEMPLATE_DECL_
SC_API void sc_signal_invalid_writer(sc_object *target, sc_object *first_writer, sc_object *second_writer, bool check_delta)
inline::std::ostream & operator<<(::std::ostream &os, const sc_fifo< T > &a)
SC_API const char * sc_gen_unique_name(const char *, bool preserve_first)
void sc_trace(sc_trace_file *tf, const sc_in< T > &port, const std::string &name)
sc_simcontext * sc_get_curr_simcontext()
SC_API const sc_logic SC_LOGIC_0
unsigned long long uint64
SC_API const sc_logic SC_LOGIC_1
constexpr uint64 UINT64_ONE
const sc_event & value_changed_event() const
const sc_event & default_event() const
sc_event * lazy_kernel_event(sc_event **, const char *) const
void notify_next_delta(sc_event *ev) const
virtual const char * kind() const
virtual ~sc_signal_channel()
sc_signal_channel(const char *name_)
sc_dt::uint64 m_change_stamp
void deprecated_get_new_value() const
void deprecated_trace() const
sc_event * m_change_event_p
void deprecated_get_data_ref() const
virtual void print(::std::ostream &=::std::cout) const
virtual sc_writer_policy get_writer_policy() const
sc_signal_t(const char *name_, const T &initial_value_)
const T & get_new_value() const
virtual const T & get_data_ref() const
virtual const char * kind() const
virtual void write(const T &)
virtual const sc_event & default_event() const
virtual const T & read() const
sc_signal_inout_if< T > if_type
sc_signal_channel base_type
void trace(sc_trace_file *tf) const
this_type & operator=(const T &a)
sc_signal_t< T, POL > this_type
virtual void register_port(sc_port_base &, const char *)
virtual const sc_event & value_changed_event() const
virtual bool event() const
sc_writer_policy_check< POL > policy_type
virtual void dump(::std::ostream &=::std::cout) const
sc_signal_t< T, POL > base_type
sc_signal_inout_if< T > if_type
sc_signal(const char *name_, const value_type &initial_value_)
this_type & operator=(const this_type &a)
sc_writer_policy_check< POL > policy_type
sc_signal< T, POL > this_type
sc_signal(const char *name_)
sc_event * m_posedge_event_p
virtual const sc_event & negedge_event() const
virtual bool posedge() const
sc_signal< bool, POL > this_type
virtual const sc_event & posedge_event() const
sc_signal(const char *name_)
sc_writer_policy_check< POL > policy_type
sc_event * m_negedge_event_p
sc_signal(const char *name_, const value_type &initial_value_)
virtual bool negedge() const
sc_signal_t< bool, POL > base_type
virtual bool is_clock() const
virtual const sc_event & negedge_event() const
virtual bool posedge() const
sc_event * m_posedge_event_p
virtual const sc_event & posedge_event() const
sc_dt::sc_logic value_type
sc_signal(const char *name_, const value_type &initial_value_)
sc_signal< sc_dt::sc_logic, POL > this_type
sc_event * m_negedge_event_p
sc_signal(const char *name_)
sc_signal_t< sc_dt::sc_logic, POL > base_type
sc_writer_policy_check< POL > policy_type
virtual bool negedge() const
virtual const T & read() const =0
sc_process_handle m_writer_p
bool check_write(sc_object *target, bool value_changed)
const char * name() const
virtual void print(::std::ostream &os=::std::cout) const
void swap(sc_process_handle &other)
sc_process_b * get_current_writer() const