From b0cb997009b0f234269c394706dd5c8a2698c4d2 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 26 Mar 2022 10:48:21 +0100 Subject: [PATCH] add TGC_X with DMR --- incl/iss/arch/tgc_mapper.h | 43 ++++++++++++++++++++++++++++++++++++++ src/main.cpp | 35 +------------------------------ src/sysc/core_complex.cpp | 38 +++++++-------------------------- 3 files changed, 52 insertions(+), 64 deletions(-) create mode 100644 incl/iss/arch/tgc_mapper.h diff --git a/incl/iss/arch/tgc_mapper.h b/incl/iss/arch/tgc_mapper.h new file mode 100644 index 0000000..1d4dd73 --- /dev/null +++ b/incl/iss/arch/tgc_mapper.h @@ -0,0 +1,43 @@ +#ifndef _ISS_ARCH_TGC_MAPPER_H +#define _ISS_ARCH_TGC_MAPPER_H + +#include "riscv_hart_m_p.h" +#include "tgc_c.h" +using tgc_c_plat_type = iss::arch::riscv_hart_m_p; +#ifdef CORE_TGC_B +#include "riscv_hart_m_p.h" +#include "tgc_b.h" +using tgc_b_plat_type = iss::arch::riscv_hart_m_p; +#endif +#ifdef CORE_TGC_C_XRB_NN +#include "riscv_hart_m_p.h" +#include "tgc_c_xrb_nn.h" +using tgc_c_xrb_nn_plat_type = iss::arch::riscv_hart_m_p; +#endif +#ifdef CORE_TGC_D +#include "riscv_hart_mu_p.h" +#include "tgc_d.h" +using tgc_d_plat_type = iss::arch::riscv_hart_mu_p; +#endif +#ifdef CORE_TGC_D_XRB_MAC +#include "riscv_hart_mu_p.h" +#include "tgc_d_xrb_mac.h" +using tgc_d_xrb_mac_plat_type = iss::arch::riscv_hart_mu_p; +#endif +#ifdef CORE_TGC_D_XRB_NN +#include "riscv_hart_mu_p.h" +#include "tgc_d_xrb_nn.h" +using tgc_d_xrb_nn_plat_type = iss::arch::riscv_hart_mu_p; +#endif +#ifdef CORE_TGC_E +#include "riscv_hart_mu_p.h" +#include "tgc_e.h" +using tgc_e_plat_type = iss::arch::riscv_hart_mu_p; +#endif +#ifdef CORE_TGC_X +#include "riscv_hart_mu_p.h" +#include "tgc_x.h" +using tgc_x_plat_type = iss::arch::riscv_hart_mu_p; +#endif + +#endif diff --git a/src/main.cpp b/src/main.cpp index 3071b73..bbde374 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,40 +35,7 @@ #include #include -#include -#include "iss/arch/riscv_hart_m_p.h" -#include "iss/arch/tgc_c.h" -using tgc_c_plat_type = iss::arch::riscv_hart_m_p; -#ifdef CORE_TGC_B -#include "iss/arch/riscv_hart_m_p.h" -#include "iss/arch/tgc_b.h" -using tgc_b_plat_type = iss::arch::riscv_hart_m_p; -#endif -#ifdef CORE_TGC_C_XRB_NN -#include "iss/arch/riscv_hart_m_p.h" -#include "iss/arch/tgc_c_xrb_nn.h" -using tgc_c_xrb_nn_plat_type = iss::arch::riscv_hart_m_p; -#endif -#ifdef CORE_TGC_D -#include "iss/arch/riscv_hart_mu_p.h" -#include "iss/arch/tgc_d.h" -using tgc_d_plat_type = iss::arch::riscv_hart_mu_p; -#endif -#ifdef CORE_TGC_D_XRB_MAC -#include "iss/arch/riscv_hart_mu_p.h" -#include "iss/arch/tgc_d_xrb_mac.h" -using tgc_d_xrb_mac_plat_type = iss::arch::riscv_hart_mu_p; -#endif -#ifdef CORE_TGC_D_XRB_NN -#include "iss/arch/riscv_hart_mu_p.h" -#include "iss/arch/tgc_d_xrb_nn.h" -using tgc_d_xrb_nn_plat_type = iss::arch::riscv_hart_mu_p; -#endif -#ifdef CORE_TGC_E -#include "iss/arch/riscv_hart_mu_p.h" -#include "iss/arch/tgc_e.h" -using tgc_e_plat_type = iss::arch::riscv_hart_mu_p; -#endif +#include #ifdef WITH_LLVM #include #endif diff --git a/src/sysc/core_complex.cpp b/src/sysc/core_complex.cpp index 23ab3e5..3d29ee8 100644 --- a/src/sysc/core_complex.cpp +++ b/src/sysc/core_complex.cpp @@ -31,37 +31,15 @@ *******************************************************************************/ // clang-format off -#include "iss/debugger/gdb_session.h" -#include "iss/debugger/encoderdecoder.h" -#include "iss/debugger/server.h" -#include "iss/debugger/target_adapter_if.h" -#include "iss/iss.h" -#include "iss/vm_types.h" +#include +#include +#include +#include +#include +#include #include -#include "sysc/core_complex.h" -#ifdef CORE_TGC_B -#include "iss/arch/riscv_hart_m_p.h" -#include "iss/arch/tgc_b.h" -using tgc_b_plat_type = iss::arch::riscv_hart_m_p; -#endif -#include "iss/arch/riscv_hart_m_p.h" -#include "iss/arch/tgc_c.h" -using tgc_c_plat_type = iss::arch::riscv_hart_m_p; -#ifdef CORE_TGC_D -#include "iss/arch/riscv_hart_mu_p.h" -#include "iss/arch/tgc_d.h" -using tgc_d_plat_type = iss::arch::riscv_hart_mu_p; -#endif -#ifdef CORE_TGC_D_XRB_MAC -#include "iss/arch/riscv_hart_mu_p.h" -#include "iss/arch/tgc_d_xrb_mac.h" -using tgc_d_xrb_mac_plat_type = iss::arch::riscv_hart_mu_p; -#endif -#ifdef CORE_TGC_D_XRB_NN -#include "iss/arch/riscv_hart_mu_p.h" -#include "iss/arch/tgc_d_xrb_nn.h" -using tgc_d_xrb_nn_plat_type = iss::arch::riscv_hart_mu_p; -#endif +#include +#include #include #include #include