gem5  v22.0.0.1
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
gem5::fastmodel::SignalReceiver Class Reference

#include <signal_receiver.hh>

Inheritance diagram for gem5::fastmodel::SignalReceiver:

Public Types

typedef std::function< void(bool)> OnChangeFunc
 

Public Member Functions

 SignalReceiver (const std::string &name, OnChangeFunc on_change=nullptr)
 
 SignalReceiver (const char *name, OnChangeFunc on_change=nullptr)
 
void onChange (OnChangeFunc func)
 
void set_state (int export_id, const bool &new_state) override
 

Public Attributes

amba_pv::signal_slave_export< bool > signal_in
 

Private Attributes

bool _state
 
OnChangeFunc _onChange
 

Detailed Description

Definition at line 47 of file signal_receiver.hh.

Member Typedef Documentation

◆ OnChangeFunc

typedef std::function<void(bool)> gem5::fastmodel::SignalReceiver::OnChangeFunc

Definition at line 50 of file signal_receiver.hh.

Constructor & Destructor Documentation

◆ SignalReceiver() [1/2]

gem5::fastmodel::SignalReceiver::SignalReceiver ( const std::string &  name,
OnChangeFunc  on_change = nullptr 
)
inline

Definition at line 59 of file signal_receiver.hh.

◆ SignalReceiver() [2/2]

gem5::fastmodel::SignalReceiver::SignalReceiver ( const char *  name,
OnChangeFunc  on_change = nullptr 
)
inline

Definition at line 63 of file signal_receiver.hh.

References signal_in.

Member Function Documentation

◆ onChange()

void gem5::fastmodel::SignalReceiver::onChange ( OnChangeFunc  func)
inline

◆ set_state()

void gem5::fastmodel::SignalReceiver::set_state ( int  export_id,
const bool &  new_state 
)
inlineoverride

Definition at line 73 of file signal_receiver.hh.

References _onChange, and _state.

Member Data Documentation

◆ _onChange

OnChangeFunc gem5::fastmodel::SignalReceiver::_onChange
private

Definition at line 54 of file signal_receiver.hh.

Referenced by onChange(), and set_state().

◆ _state

bool gem5::fastmodel::SignalReceiver::_state
private

Definition at line 53 of file signal_receiver.hh.

Referenced by set_state().

◆ signal_in

amba_pv::signal_slave_export<bool> gem5::fastmodel::SignalReceiver::signal_in

Definition at line 57 of file signal_receiver.hh.

Referenced by gem5::fastmodel::PL330::PL330(), and SignalReceiver().


The documentation for this class was generated from the following file:

Generated on Sat Jun 18 2022 08:13:42 for gem5 by doxygen 1.8.17