quic/qbox
Loading...
Searching...
No Matches
sifive-pl2.h
1/*
2 * This file is part of libqbox
3 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All Rights Reserved.
4 * Author: GreenSocs 2021
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef _LIBQBOX_COMPONENTS_CACHE_CTRL_SIFIVE_PL2_H
10#define _LIBQBOX_COMPONENTS_CACHE_CTRL_SIFIVE_PL2_H
11
12#include <string>
13#include <cassert>
14
15#include <cci_configuration>
16
17#include <ports/target.h>
18#include <ports/qemu-target-signal-socket.h>
19
21{
22public:
23 QemuTargetSocket<> socket;
24
25 QemuRiscvSifivePl2(sc_core::sc_module_name nm, QemuInstance& inst)
26 : QemuDevice(nm, inst, "sifive,pL2Cache0"), socket("mem", inst)
27 {
28 }
29
30 void before_end_of_elaboration() override { QemuDevice::before_end_of_elaboration(); }
31
32 void end_of_elaboration() override
33 {
34 QemuDevice::end_of_elaboration();
35
36 qemu::SysBusDevice sbd(get_qemu_dev());
37 socket.init(qemu::SysBusDevice(m_dev), 0);
38 }
39};
40
41#endif
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 sifive-pl2.h:21
Definition target.h:160
Definition libqemu-cxx.h:638