42 template<
typename T, sc_writer_policy POL = SC_DEFAULT_WRITER_POLICY >
65 sc_buffer(
const char* name_,
const T& initial_value_ )
72 virtual void write(
const T& );
78 {
write( a );
return *
this; }
81 {
write( a.read() );
return *
this; }
86 virtual const char*
kind()
const
87 {
return "sc_buffer"; }
104 template<
typename T, sc_writer_policy POL >
115 if( !base_type::policy_type::check_write(
this,
true) )
118 this->m_new_val = value_;
119 this->request_update();
124 template<
typename T, sc_writer_policy POL >
129 base_type::policy_type::update();
130 base_type::do_update();
this_type & operator=(const T &a)
virtual void write(const T &)
sc_buffer(const char *name_)
sc_buffer(const char *name_, const T &initial_value_)
virtual void update()
The update method (does nothing by default).
const char * sc_gen_unique_name(const char *, bool preserve_first)
The sc_signal<T> input interface class.
virtual const char * kind() const
virtual const T & read() const
sc_signal< T, POL > base_type
sc_buffer< T, POL > this_type
The chnl_scoped_lock class to lock (and automatically release) a mutex.