33 #ifndef SC_SIGNAL_RV_H 34 #define SC_SIGNAL_RV_H 72 int sz = values_.size();
77 result_ = *values_[0];
81 for(
int j = result_.
length() - 1; j >= 0; -- j ) {
83 for(
int i = sz - 1; i > 0 && res != 3; -- i ) {
84 res = sc_logic_resolution_tbl[res][(*values_[i])[j].
value()];
99 :
public sc_signal<sc_dt::sc_lv<W>, SC_MANY_WRITERS>
118 : base_type( name_, value_type() )
122 : base_type( name_, initial_value_ )
137 virtual void write(
const value_type& );
141 virtual const char*
kind()
const 142 {
return "sc_signal_rv"; }
146 this_type& operator = (
const value_type& a )
147 { base_type::operator=(a);
return *
this; }
150 { base_type::operator=(a);
return *
this; }
152 this_type& operator = (
const this_type& a )
153 { base_type::operator=(a);
return *
this; }
157 virtual void update();
180 for(
int i = m_val_vec.size() - 1; i >= 0; -- i ) {
195 bool value_changed =
false;
198 for(
int i = m_proc_vec.size() - 1; i >= 0; -- i ) {
199 if( cur_proc == m_proc_vec[i] ) {
200 if( value_ != *m_val_vec[i] ) {
201 *m_val_vec[i] = value_;
202 value_changed =
true;
210 m_proc_vec.push_back( cur_proc );
211 m_val_vec.push_back(
new value_type( value_ ) );
212 value_changed =
true;
215 if( value_changed ) {
216 this->request_update();
sc_process_b * sc_get_current_process_b()
sc_signal_rv(const char *name_)
virtual void register_port(sc_port_base &, const char *)
sc_signal< sc_dt::sc_lv< W >, SC_MANY_WRITERS > base_type
Arbitrary size logic vector class.
The sc_signal<T> primitive channel class.
Abstract base class for class sc_port_b.
std::vector< sc_process_b * > m_proc_vec
sc_logic_value_t
Enumeration of values for sc_logic.
The resolved vector signal class.
SC_API const sc_dt::sc_logic_value_t sc_logic_resolution_tbl[4][4]
sc_dt::sc_lv< W > value_type
sc_signal_rv< W > this_type
sc_clock period is zero sc_clock low time is zero sc_fifo< T > cannot have more than one writer bind interface to port failed complete binding failed remove port failed insert primitive channel failed sc_signal< T > cannot have more than one driver resolved port not bound to resolved signal sc_semaphore requires an initial value
std::vector< value_type * > m_val_vec
virtual const char * kind() const
virtual void write(const value_type &)
SC_API const char * sc_gen_unique_name(const char *, bool preserve_first)
static void resolve(sc_dt::sc_lv< W > &, const std::vector< sc_dt::sc_lv< W > *> &)
sc_signal_rv(const char *name_, const value_type &initial_value_)
allow multiple writers (with different ports)