8#ifndef _LIBQBOX_COMPONENTS_USB_XHCI_H
9#define _LIBQBOX_COMPONENTS_USB_XHCI_H
11#include <module_factory_registery.h>
29 std::function<
void()> set_dev_props;
39 QemuDevice::end_of_elaboration();
44 std::vector<Device*> m_devices;
47 qemu_xhci(
const sc_core::sc_module_name& name, sc_core::sc_object*
o, sc_core::sc_object*
t)
54 gpex->add_device(*
this);
57 void add_device(Device&
dev)
59 if (m_inst !=
dev.get_qemu_inst()) {
60 SCP_FATAL(
SCMOD) <<
"USB device and host have to be in same qemu instance";
62 m_devices.push_back(&
dev);
65 void end_of_elaboration()
override
67 qemu_gpex::Device::end_of_elaboration();
70 for (Device*
device : m_devices) {
71 if (
device->set_dev_props) {
79extern "C" void module_register();
QEMU device abstraction as a SystemC module.
Definition device.h:37
This class encapsulates a libqemu-cxx qemu::LibQemu instance. It handles QEMU parameters and instance...
Definition qemu-instance.h:89
Definition libqemu-cxx.h:732
Definition qemu_gpex.h:35
Definition qemu_gpex.h:32
Definition qemu_xhci.h:20
void end_of_elaboration() override
We cannot do the end_of_elaboration at this point because we need the USB bus (created only during th...
Definition qemu_xhci.h:33
This class wraps the qemu's XHCI USB controller: eXtensible Host Controller Interface.
Definition qemu_xhci.h:17