27 #ifndef SC_SIGNAL_RV_H
28 #define SC_SIGNAL_RV_H
67 int sz = values_.size();
72 result_ = *values_[0];
76 for(
int j = result_.
length() - 1; j >= 0; -- j ) {
78 for(
int i = sz - 1; i > 0 && res != 3; -- i ) {
94 :
public sc_signal<sc_dt::sc_lv<W>, SC_MANY_WRITERS>
134 {
write( a );
return *
this; }
139 virtual const char*
kind()
const
140 {
return "sc_signal_rv"; }
167 for(
int i = m_val_vec.size() - 1; i >= 0; -- i ) {
182 bool value_changed =
false;
185 for(
int i = m_proc_vec.size() - 1; i >= 0; -- i ) {
186 if( cur_proc == m_proc_vec[i] ) {
187 if( value_ != *m_val_vec[i] ) {
188 *m_val_vec[i] = value_;
189 value_changed =
true;
197 m_proc_vec.push_back( cur_proc );
198 m_val_vec.push_back(
new data_type( value_ ) );
199 value_changed =
true;
202 if( value_changed ) {
203 this->request_update();
sc_signal_rv(const char *name_)
std::vector< data_type * > m_val_vec
virtual void register_port(sc_port_base &, const char *)
const sc_dt::sc_logic_value_t sc_logic_resolution_tbl[4][4]
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
sc_process_b * sc_get_current_process_b()
allow multiple writers (with different ports)
virtual void write(const data_type &)
const char * sc_gen_unique_name(const char *, bool preserve_first)
sc_signal< sc_dt::sc_lv< W >, SC_MANY_WRITERS > base_type
std::vector< sc_process_b * > m_proc_vec
static void resolve(sc_dt::sc_lv< W > &, const std::vector< sc_dt::sc_lv< W > * > &)
virtual const T & read() const
sc_dt::sc_lv< W > data_type
sc_signal_rv< W > this_type
this_type & operator=(const data_type &a)
virtual const char * kind() const