quic/qbox
Loading...
Searching...
No Matches
vnc.h
1/*
2 * This file is part of libqbox
3 * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All Rights Reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#ifndef _LIBQBOX_COMPONENTS_VNC_H
9#define _LIBQBOX_COMPONENTS_VNC_H
10
11#include <systemc>
12#include <scp/report.h>
13#include <string>
14#include <string_view>
15#include <vector>
16#include <sstream>
17
18#include <cci_configuration>
19#include <module_factory_registery.h>
20
21#include <qemu-instance.h>
22#include <device.h>
23
36class vnc : public sc_core::sc_module
37{
38 SCP_LOGGER(());
39
40public:
41 cci::cci_param<std::string> p_params;
42 cci::cci_param<int> p_gpu_output;
43
44protected:
45 std::string m_qemu_opts;
46 std::string m_gpu_device_id;
47 std::vector<std::string> m_spoofed_options = { ":", "head=", "display=" };
48 QemuDevice* m_gpu;
49
50public:
57 vnc(const sc_core::sc_module_name& name, sc_core::sc_object* gpu);
58
59private:
63 void initialize();
64
68 void build_qemu_options();
69
76 bool spoofed_opt(const std::string_view& option);
77
84 std::string get_head_opt(char append_suffix = '\0');
85
92 std::string get_display_opt(char append_suffix = '\0');
93
100 std::string get_display_device_opt(char append_suffix = '\0');
101};
102
103extern "C" void module_register();
104
105#endif // _LIBQBOX_COMPONENTS_VNC_H
QEMU device abstraction as a SystemC module.
Definition device.h:37
Definition target.h:160
VNC module as a SystemC module.
Definition vnc.h:37