quic/qbox
Loading...
Searching...
No Matches
cortex-r5.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#pragma once
10
11#include <string>
12
13#include <cci_configuration>
14
15#include <module_factory_registery.h>
16
17#include <libqemu-cxx/target/aarch64.h>
18
19#include <arm.h>
20#include <device.h>
21#include <ports/qemu-target-signal-socket.h>
22#include <ports/target.h>
23
25{
26public:
27 cci::cci_param<bool> p_start_powered_off;
28
29 cpu_arm_cortexR5(const sc_core::sc_module_name& name, sc_core::sc_object* o)
30 : cpu_arm_cortexR5(name, *(dynamic_cast<QemuInstance*>(o)))
31 {
32 }
33 cpu_arm_cortexR5(sc_core::sc_module_name name, QemuInstance& inst)
34 : QemuCpuArm(name, inst, "cortex-r5-arm")
35 , p_start_powered_off("start_powered_off", false,
36 "Start and reset the CPU "
37 "in powered-off state")
38 {
39 }
40
41 void before_end_of_elaboration() override
42 {
43 QemuCpuArm::before_end_of_elaboration();
44
45 qemu::CpuArm cpu(m_dev);
46
47 cpu.set_prop_bool("start-powered-off", p_start_powered_off);
48 cpu.set_prop_bool("reset-hivecs", true);
49 }
50};
51
52extern "C" void module_register();
Definition arm.h:14
This class encapsulates a libqemu-cxx qemu::LibQemu instance. It handles QEMU parameters and instance...
Definition qemu-instance.h:89
Definition target.h:160
Definition cortex-r5.h:25
Definition aarch64.h:16