quic/qbox
|
A QEMU output GPIO exposed as a InitiatorSignalSocket<bool> More...
#include <qemu-initiator-signal-socket.h>
Public Member Functions | |
QemuInitiatorSignalSocket (const char *name) | |
void | init (qemu::Device dev, int gpio_idx) |
Initialize this socket with a device and a GPIO index. | |
void | init_named (qemu::Device dev, const char *gpio_name, int gpio_idx) |
Initialize this socket with a device, a GPIO namespace, and a GPIO index. | |
void | init_sbd (qemu::SysBusDevice sbd, int gpio_idx) |
Initialize this socket with a QEMU SysBusDevice, and a GPIO index. | |
Protected Member Functions | |
void | event_cb (bool val) |
void | init_qemu_to_sysc_gpio_proxy (qemu::Device &dev) |
void | init_internal (qemu::Device &dev) |
Protected Attributes | |
qemu::Gpio | m_proxy |
gs::runonsysc | m_on_sysc |
QemuTargetSignalSocket * | m_qemu_remote = nullptr |
A QEMU output GPIO exposed as a InitiatorSignalSocket<bool>
This class exposes an output GPIO of a QEMU device as a InitiatorSignalSocket<bool>. It can be connected to an sc_core::sc_port<bool> or a TargetSignalSocket<bool>. Modifications to the interal QEMU GPIO will be propagated through the socket.
If this socket happens to be connected to a QemuTargetSignalSocket, the propagation is done directly within QEMU and do not go through the SystemC kernel. Note that this is only true if the GPIOs wrapped by both this socket and the remote socket lie in the same QEMU instance.
|
inline |
Initialize this socket with a device and a GPIO index.
This method initializes the socket using the given QEMU device and the corresponding GPIO index in this device. See the QEMU API and the device you want to wrap to know what index to use here.
[in] | dev | The QEMU device |
[in] | gpio_idx | The GPIO index within the device |
|
inline |
Initialize this socket with a device, a GPIO namespace, and a GPIO index.
This method initializes the socket using the given QEMU device and the corresponding GPIO (namespace, index) pair in this device. See the QEMU API and the device you want to wrap to know what namespace/index to use here.
[in] | dev | The QEMU device |
[in] | gpio_name | The GPIO namespace within the device |
[in] | gpio_idx | The GPIO index within the device |
|
inline |
Initialize this socket with a QEMU SysBusDevice, and a GPIO index.
This method initializes the socket using the given QEMU SysBusDevice (SBD) and the corresponding GPIO index) in this SBD. See the QEMU API and the SBD you want to wrap to know what index to use here. This is only for "sysbus_irq", if you want to wrap a normal gpio, just use init or init_named.
[in] | sbd | The QEMU SysBusDevice |
[in] | gpio_idx | The GPIO index within the SBD |