soc: snps_qemu: Port to HWMv2

Ports the snps_qemu SoC configuration to hardware model version 2

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae
2024-02-02 07:57:17 +00:00
committed by Carles Cufi
parent a9902ff58e
commit bc97349dbd
13 changed files with 75 additions and 96 deletions

View File

@@ -1,23 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
if(COMPILER STREQUAL gcc)
zephyr_compile_options(-mcpu=${GCC_M_CPU})
zephyr_compile_options_ifdef(CONFIG_ISA_ARCV2 -mno-sdata)
else()
zephyr_compile_options_ifdef(CONFIG_SOC_QEMU_ARC_HS -arcv2hs -core2 -Xatomic
-Xunaligned -Xcode_density -Xswap -Xbitscan
-Xmpy_option=qmpyh -Xshift_assist -Xbarrel_shifter
-Xtimer0 -Xtimer1)
zephyr_ld_option_ifdef(CONFIG_SOC_QEMU_ARC_HS -Hlib=hs38_full)
if(NOT CONFIG_SOC_QEMU_ARC_HS)
message(WARNING "QEMU ARC platforms other than HS are not supported yet with MW toolchain")
endif()
endif()
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")

View File

@@ -1,21 +0,0 @@
# Copyright (c) 2020 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
choice
prompt "ARC QEMU SoC Selection"
default SOC_QEMU_ARC_HS
depends on SOC_QEMU_ARC
config SOC_QEMU_ARC_EM
bool "Synopsys ARC EM in QEMU"
config SOC_QEMU_ARC_HS
bool "Synopsys ARC HS in QEMU"
config SOC_QEMU_ARC_HS6X
bool "Synopsys ARC HS6x in QEMU"
config SOC_QEMU_ARC_HS5X
bool "Synopsys ARC HS5x in QEMU"
endchoice

View File

@@ -1,9 +0,0 @@
# Copyright (c) 2020 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if SOC_QEMU_ARC_EM
config CPU_EM4
default y
endif

View File

@@ -1,9 +0,0 @@
# Copyright (c) 2021 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if SOC_QEMU_ARC_HS
config CPU_HS3X
default y
endif

View File

@@ -1,9 +0,0 @@
# Copyright (c) 2022 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if SOC_QEMU_ARC_HS5X
config CPU_HS5X
default y
endif

View File

@@ -1,9 +0,0 @@
# Copyright (c) 2021 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if SOC_QEMU_ARC_HS6X
config CPU_HS6X
default y
endif

View File

@@ -1,7 +0,0 @@
# Copyright (c) 2020 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
config SOC_QEMU_ARC
bool "QEMU emulation of ARC cores"
select ARC
select CPU_HAS_MPU

View File

@@ -0,0 +1,20 @@
# SPDX-License-Identifier: Apache-2.0
if(COMPILER STREQUAL gcc)
zephyr_compile_options(-mcpu=${GCC_M_CPU})
zephyr_compile_options_ifdef(CONFIG_ISA_ARCV2 -mno-sdata)
else()
zephyr_compile_options_ifdef(CONFIG_SOC_QEMU_ARC_HS -arcv2hs -core2 -Xatomic
-Xunaligned -Xcode_density -Xswap -Xbitscan
-Xmpy_option=qmpyh -Xshift_assist -Xbarrel_shifter
-Xtimer0 -Xtimer1)
zephyr_ld_option_ifdef(CONFIG_SOC_QEMU_ARC_HS -Hlib=hs38_full)
if(NOT CONFIG_SOC_QEMU_ARC_HS)
message(WARNING "QEMU ARC platforms other than HS3X are not supported yet with MW toolchain")
endif()
endif()
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")

View File

@@ -0,0 +1,18 @@
# Copyright (c) 2020 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
config SOC_QEMU_ARC
select ARC
select CPU_HAS_MPU
config SOC_QEMU_ARC_EM
select CPU_EM4
config SOC_QEMU_ARC_HS
select CPU_HS3X
config SOC_QEMU_ARC_HS5X
select CPU_HS5X
config SOC_QEMU_ARC_HS6X
select CPU_HS6X

View File

@@ -3,10 +3,6 @@
if SOC_QEMU_ARC
config SOC
string
default "snps_qemu"
config SYS_CLOCK_HW_CYCLES_PER_SEC
int
default 10000000
@@ -30,9 +26,4 @@ config NUM_IRQS
config ARC_MPU_VER
default 2
source "soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.em"
source "soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.hs"
source "soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.hs5x"
source "soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.hs6x"
endif

View File

@@ -0,0 +1,30 @@
# Copyright (c) 2020 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
config SOC_QEMU_ARC
bool
config SOC_QEMU_ARC_EM
bool
select SOC_QEMU_ARC
config SOC_QEMU_ARC_HS
bool
select SOC_QEMU_ARC
config SOC_QEMU_ARC_HS5X
bool
select SOC_QEMU_ARC
config SOC_QEMU_ARC_HS6X
bool
select SOC_QEMU_ARC
config SOC_SERIES
default "qemu_arc" if SOC_QEMU_ARC
config SOC
default "qemu_arc_em" if SOC_QEMU_ARC_EM
default "qemu_arc_hs" if SOC_QEMU_ARC_HS
default "qemu_arc_hs5x" if SOC_QEMU_ARC_HS5X
default "qemu_arc_hs6x" if SOC_QEMU_ARC_HS6X

View File

@@ -0,0 +1,7 @@
series:
- name: qemu_arc
socs:
- name: qemu_arc_em
- name: qemu_arc_hs
- name: qemu_arc_hs5x
- name: qemu_arc_hs6x