quic/qbox
Loading...
Searching...
No Matches
qemu-components
common
include
libqemu-cxx
target
hexagon.h
1
/*
2
* This file is part of libqemu-cxx
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 <libqemu-cxx/libqemu-cxx.h>
12
13
#define DSP_REV(arch) \
14
{ \
15
#arch, arch##_rev \
16
}
17
18
namespace
qemu {
19
class
CpuHexagon
:
public
Cpu
20
{
21
public
:
22
typedef
enum
{
23
unknown_rev = 0x0,
24
v66_rev = 0xa666,
25
v68_rev = 0x8d68,
26
v69_rev = 0x8c69,
27
v73_rev = 0x8c73,
28
v79_rev = 0x8c79,
29
v81_rev = 0x8781,
30
} Rev_t;
31
32
static
constexpr
const
char
*
const
TYPE =
"v67-hexagon-cpu"
;
33
34
using
MipUpdateCallbackFn = std::function<
void
(
uint32_t
)>;
35
36
CpuHexagon
() =
default
;
37
CpuHexagon
(
const
CpuHexagon
&) =
default
;
38
CpuHexagon
(
const
Object
&
o
):
Cpu
(
o
) {}
39
void
register_reset();
40
static
Rev_t parse_dsp_arch(
const
std::string
arch_str
)
41
{
42
static
const
std::unordered_map<std::string, Rev_t>
DSP_REVS
= { DSP_REV(
v66
), DSP_REV(
v68
), DSP_REV(
v69
),
43
DSP_REV(
v73
), DSP_REV(
v79
), DSP_REV(
v81
) };
44
auto
rev
=
DSP_REVS
.find(
arch_str
);
45
Rev_t
dsp_rev
= unknown_rev;
46
if
(
rev
!=
DSP_REVS
.end()) {
47
dsp_rev
=
rev
->second;
48
}
49
return
dsp_rev
;
50
}
51
};
52
}
// namespace qemu
QemuTargetSocket
Definition
target.h:160
qemu::CpuHexagon
Definition
hexagon.h:20
qemu::Cpu
Definition
libqemu-cxx.h:653
qemu::Object
Definition
libqemu-cxx.h:222
Generated by
1.9.8