Browse Source

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>
pull/69687/head
Jamie McCrae 1 year ago committed by Carles Cufi
parent
commit
bc97349dbd
  1. 23
      soc/soc_legacy/arc/snps_qemu/CMakeLists.txt
  2. 21
      soc/soc_legacy/arc/snps_qemu/Kconfig
  3. 9
      soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.em
  4. 9
      soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.hs
  5. 9
      soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.hs5x
  6. 9
      soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.hs6x
  7. 7
      soc/soc_legacy/arc/snps_qemu/Kconfig.soc
  8. 20
      soc/synopsys/qemu_arc/CMakeLists.txt
  9. 18
      soc/synopsys/qemu_arc/Kconfig
  10. 9
      soc/synopsys/qemu_arc/Kconfig.defconfig
  11. 30
      soc/synopsys/qemu_arc/Kconfig.soc
  12. 0
      soc/synopsys/qemu_arc/linker.ld
  13. 7
      soc/synopsys/qemu_arc/soc.yml

23
soc/soc_legacy/arc/snps_qemu/CMakeLists.txt

@ -1,23 +0,0 @@ @@ -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 "")

21
soc/soc_legacy/arc/snps_qemu/Kconfig

@ -1,21 +0,0 @@ @@ -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

9
soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.em

@ -1,9 +0,0 @@ @@ -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

9
soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.hs

@ -1,9 +0,0 @@ @@ -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

9
soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.hs5x

@ -1,9 +0,0 @@ @@ -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

9
soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig.hs6x

@ -1,9 +0,0 @@ @@ -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

7
soc/soc_legacy/arc/snps_qemu/Kconfig.soc

@ -1,7 +0,0 @@ @@ -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

20
soc/synopsys/qemu_arc/CMakeLists.txt

@ -0,0 +1,20 @@ @@ -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 "")

18
soc/synopsys/qemu_arc/Kconfig

@ -0,0 +1,18 @@ @@ -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

9
soc/soc_legacy/arc/snps_qemu/Kconfig.defconfig → soc/synopsys/qemu_arc/Kconfig.defconfig

@ -3,10 +3,6 @@ @@ -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 @@ -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

30
soc/synopsys/qemu_arc/Kconfig.soc

@ -0,0 +1,30 @@ @@ -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

0
soc/soc_legacy/arc/snps_qemu/linker.ld → soc/synopsys/qemu_arc/linker.ld

7
soc/synopsys/qemu_arc/soc.yml

@ -0,0 +1,7 @@ @@ -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
Loading…
Cancel
Save