quic/qbox
Loading...
Searching...
No Matches
qemu-components
ramfb
include
ramfb.h
1
/*
2
* This file is part of libqbox
3
* Copyright (c) 2026 Qualcomm Innovation Center, Inc. All Rights Reserved.
4
*
5
* SPDX-License-Identifier: BSD-3-Clause
6
*/
7
8
#ifndef _LIBQBOX_COMPONENTS_RAMFB_H
9
#define _LIBQBOX_COMPONENTS_RAMFB_H
10
11
#include <systemc>
12
#include <tlm>
13
#include <cci_configuration>
14
#include <module_factory_registery.h>
15
#include <qemu-instance.h>
16
#include <device.h>
17
#include <libqemu/libqemu.h>
18
#include <fw_cfg.h>
19
#include <cstdlib>
20
21
class
ramfb
:
public
QemuDevice
22
{
23
public
:
24
ramfb
(
const
sc_core::sc_module_name& name, sc_core::sc_object*
o
, sc_core::sc_object*
f
)
25
:
ramfb
(name, *(
dynamic_cast<
QemuInstance
*
>
(
o
)),
dynamic_cast<
fw_cfg
*
>
(
f
))
26
{
27
}
28
29
ramfb
(
const
sc_core::sc_module_name&
n
,
QemuInstance
& inst,
fw_cfg
*
fc
)
30
:
QemuDevice
(
n
, inst,
"ramfb"
, std::string(
n
).
append
(
"."
).
append
(
"ramfb"
).
c_str
())
31
{
32
if
(!
fc
) {
33
SCP_FATAL
(()) <<
"fw_cfg instance should already exist before ramfb is instantiated!"
;
34
}
35
}
36
37
~ramfb
() { unrealize(); }
38
39
void
before_end_of_elaboration()
override
{ QemuDevice::before_end_of_elaboration(); }
40
41
void
end_of_elaboration()
override
42
{
43
QemuDevice::set_sysbus_as_parent_bus();
44
QemuDevice::end_of_elaboration();
45
}
46
};
47
48
extern
"C"
void
module_register();
49
50
#endif
QemuDevice
QEMU device abstraction as a SystemC module.
Definition
device.h:37
QemuInstance
This class encapsulates a libqemu-cxx qemu::LibQemu instance. It handles QEMU parameters and instance...
Definition
qemu-instance.h:86
QemuTargetSocket
Definition
target.h:160
fw_cfg
Definition
fw_cfg.h:23
ramfb
Definition
ramfb.h:22
Generated by
1.9.8