9#ifndef _LIBQBOX_COMPONENTS_DEVICE_H
10#define _LIBQBOX_COMPONENTS_DEVICE_H
14#include "qemu-instance.h"
39 std::string m_qom_type;
44 bool m_instanciated =
false;
45 bool m_realized =
false;
54 m_dev = m_inst.
get().object_new(m_qom_type.c_str());
55 m_instanciated =
true;
64 m_dev.set_prop_bool(
"realized",
true);
76 : sc_module(name), m_qom_type(
qom_type), m_inst(inst)
83 virtual void before_end_of_elaboration()
override { instantiate(); }
85 virtual void end_of_elaboration()
override { realize(); }
89 const char* get_qom_type()
const {
return m_qom_type.c_str(); }
95 void set_sysbus_as_parent_bus(
void) { m_dev.set_parent_bus(m_inst.
get().sysbus_get_default()); }
Definition qemu-instance.h:33
QEMU device abstraction as a SystemC module.
Definition device.h:37
QemuDevice(const sc_core::sc_module_name &name, QemuInstance &inst, const char *qom_type)
Construct a QEMU device.
Definition device.h:75
This class encapsulates a libqemu-cxx qemu::LibQemu instance. It handles QEMU parameters and instance...
Definition qemu-instance.h:89
qemu::LibQemu & get()
Returns the underlying qemu::LibQemu instance.
Definition qemu-instance.h:448
Definition libqemu-cxx.h:616