Skip to content

Commit 72c5296

Browse files
committed
boards: snps: nsim: arc_v: add RHX100 board configuration
Add board configuration for RHX100 RISC-V processor. Provides device tree files for RHX100 and RHX1xx series, YAML configuration for nSIM simulator integration, and board-specific default configuration. Signed-off-by: Afonso Oliveira <[email protected]>
1 parent 5fa00f2 commit 72c5296

File tree

9 files changed

+134
-0
lines changed

9 files changed

+134
-0
lines changed

boards/snps/nsim/arc_v/Kconfig.defconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
1010
default 5000000
1111

1212
endif # BOARD_NSIM_ARC_V_RMX100
13+
14+
if BOARD_NSIM_ARC_V_RHX100
15+
16+
config SYS_CLOCK_TICKS_PER_SEC
17+
default 10000
18+
19+
endif # BOARD_NSIM_ARC_V_RHX100

boards/snps/nsim/arc_v/Kconfig.nsim_arc_v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
config BOARD_NSIM_ARC_V
55
select SOC_NSIM_ARC_V_RMX100 if BOARD_NSIM_ARC_V_RMX100
6+
select SOC_NSIM_ARC_V_RHX100 if BOARD_NSIM_ARC_V_RHX100

boards/snps/nsim/arc_v/board.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ board:
44
vendor: snps
55
socs:
66
- name: rmx100
7+
- name: rhx100
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/dts-v1/;
2+
3+
#include "rhx100.dtsi"
4+
5+
/ {
6+
model = "Synopsys RHX100";
7+
compatible = "snps,rhx100";
8+
9+
aliases {
10+
uart-0 = &uart0;
11+
};
12+
13+
chosen {
14+
zephyr,sram = &ddr0;
15+
zephyr,console = &uart0;
16+
zephyr,shell-uart = &uart0;
17+
};
18+
};
19+
20+
&uart0 {
21+
status = "okay";
22+
current-speed = <115200>;
23+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
identifier: nsim_arc_v/rhx100
2+
name: Synopsys rhx100
3+
simulation:
4+
- name: nsim
5+
exec: nsimdrv
6+
type: sim
7+
arch: riscv
8+
toolchain:
9+
- zephyr
10+
- cross-compile
11+
- arcmwdt
12+
testing:
13+
ignore_tags:
14+
- net
15+
- bluetooth
16+
vendor: snps
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2024 Synopsys, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_XIP=n
5+
CONFIG_CONSOLE=y
6+
CONFIG_SERIAL=y
7+
CONFIG_UART_CONSOLE=y
8+
CONFIG_BUILD_OUTPUT_HEX=y
9+
CONFIG_INCLUDE_RESET_VECTOR=y
10+
CONFIG_LOG=y

boards/snps/nsim/arc_v/rhx100.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "rhx1xx.dtsi"
2+
3+
/ {
4+
ddr0: memory@80000000 {
5+
device_type = "memory";
6+
reg = <0x80000000 0x10000000>; /* 256 MB */
7+
};
8+
};

boards/snps/nsim/arc_v/rhx1xx.dtsi

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/ {
2+
#address-cells = <1>;
3+
#size-cells = <1>;
4+
5+
cpus {
6+
timebase-frequency = <5000000>;
7+
#address-cells = <1>;
8+
#size-cells = <0>;
9+
10+
cpu0: cpu@0 {
11+
compatible = "snps,av5rhx", "riscv";
12+
device_type = "cpu";
13+
reg = <0>;
14+
clock-frequency = <5000000>;
15+
riscv,isa = "rv32imac_zicsr_zifencei_zba_zbb_zbc_zbs";
16+
17+
cpu0_intc: interrupt-controller {
18+
compatible = "riscv,cpu-intc";
19+
interrupt-controller;
20+
#address-cells = <0>;
21+
#interrupt-cells = <1>;
22+
};
23+
};
24+
};
25+
26+
soc {
27+
compatible = "simple-bus";
28+
ranges;
29+
interrupt-parent = <&clint>;
30+
#address-cells = <1>;
31+
#size-cells = <1>;
32+
33+
clint: clint@a0010000 {
34+
compatible = "sifive,clint0";
35+
reg = <0xa0010000 0x1000>;
36+
interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7>;
37+
interrupt-names = "soft0", "timer0";
38+
};
39+
40+
mtimer: timer@a001bff8 {
41+
compatible = "riscv,machine-timer";
42+
interrupts-extended = <&cpu0_intc 7>;
43+
reg = <0xa001bff8 0x8 0xa0014000 0x8>;
44+
reg-names = "mtime", "mtimecmp";
45+
};
46+
47+
uart0: serial@10000000{
48+
compatible = "ns16550", "snps,dw-apb-uart";
49+
reg = <0x10000000 0x400>;
50+
reg-shift = <2>;
51+
52+
/* AIA interrupt controller is not currently implemented,
53+
* so connect UART interrupt to 17th line as a stub to
54+
* make build system and test framework happy.
55+
*/
56+
interrupt-parent = <&cpu0_intc>;
57+
interrupts = <17>;
58+
clock-frequency = <50000000>;
59+
status = "disabled";
60+
};
61+
};
62+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
nsim_isa_family=rv32
2+
nsim_isa_ext=-all.i.m.a.c.s.u.h.zicsr.zifencei.zihintpause.zca.zcb.zcmp.zcmt.zba.zbb.zbc.zbs.zicond.zicbom.zicbop
3+
nsim_isa_big_endian=0
4+
nsim_mmio_base=2560
5+
nsim_mem-dev=uart0,kind=16550,base=0x10000000,irq=24
6+
nsim_mem-interface=ARCV_PMP,num_regions=16,granule=1

0 commit comments

Comments
 (0)