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; }
137 {
write( a.read() );
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_process_b * sc_get_current_process_b()
sc_signal_rv< W > this_type
virtual void write(const data_type &)
sc_process_b sc_process_b
virtual const char * kind() const
allow multiple writers (with different ports)
sc_signal_rv(const char *name_)
User initiated dynamic process support.
virtual void update()
The update method (does nothing by default).
std::vector< data_type * > m_val_vec
const char * sc_gen_unique_name(const char *, bool preserve_first)
this_type & operator=(const data_type &a)
sc_dt::sc_lv< W > data_type
The resolved vector signal class.
virtual void register_port(sc_port_base &, const char *)
const sc_dt::sc_logic_value_t sc_logic_resolution_tbl[4][4]
sc_signal< sc_dt::sc_lv< W >, SC_MANY_WRITERS > base_type
Abstract base class for class sc_port_b.
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< sc_process_b * > m_proc_vec
static void resolve(sc_dt::sc_lv< W > &, const std::vector< sc_dt::sc_lv< W > * > &)