Skip to content

Commit a92a5d0

Browse files
mischajonkervineetgarc
authored andcommitted
ARC: Add support for nSIM OSCI System C model
This adds support for an ARC Virtual Platform. This platform is based on the System C standard promoted by the OSCI (Open System C Initiative) and uses nSIM to simulate the ARC CPU core itself. Users can build a virtual SoC by combining System C models of peripherals and CPU cores. Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent 0dfad77 commit a92a5d0

3 files changed

Lines changed: 164 additions & 0 deletions

File tree

‎arch/arc/boot/dts/nsimosci.dts‎

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
3+
*
4+
* This program is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License version 2 as
6+
* published by the Free Software Foundation.
7+
*/
8+
/dts-v1/;
9+
10+
/include/ "skeleton.dtsi"
11+
12+
/ {
13+
compatible = "snps,nsimosci";
14+
clock-frequency = <80000000>; /* 80 MHZ */
15+
#address-cells = <1>;
16+
#size-cells = <1>;
17+
interrupt-parent = <&intc>;
18+
19+
chosen {
20+
bootargs = "console=tty0 consoleblank=0";
21+
};
22+
23+
aliases {
24+
serial0 = &uart0;
25+
};
26+
27+
memory {
28+
device_type = "memory";
29+
reg = <0x80000000 0x10000000>; /* 256M */
30+
};
31+
32+
fpga {
33+
compatible = "simple-bus";
34+
#address-cells = <1>;
35+
#size-cells = <1>;
36+
37+
/* child and parent address space 1:1 mapped */
38+
ranges;
39+
40+
intc: interrupt-controller {
41+
compatible = "snps,arc700-intc";
42+
interrupt-controller;
43+
#interrupt-cells = <1>;
44+
};
45+
46+
uart0: serial@c0000000 {
47+
compatible = "snps,dw-apb-uart";
48+
reg = <0xc0000000 0x2000>;
49+
interrupts = <11>;
50+
#clock-frequency = <80000000>;
51+
clock-frequency = <3686400>;
52+
baud = <115200>;
53+
reg-shift = <2>;
54+
reg-io-width = <4>;
55+
status = "okay";
56+
};
57+
58+
pgu0: pgu@c9000000 {
59+
compatible = "snps,arcpgufb";
60+
reg = <0xc9000000 0x400>;
61+
};
62+
63+
ps2: ps2@c9001000 {
64+
compatible = "snps,arc_ps2";
65+
reg = <0xc9000400 0x14>;
66+
interrupts = <13>;
67+
interrupt-names = "arc_ps2_irq";
68+
};
69+
70+
eth0: ethernet@c0003000 {
71+
compatible = "snps,oscilan";
72+
reg = <0xc0003000 0x44>;
73+
interrupts = <7>, <8>;
74+
interrupt-names = "rx", "tx";
75+
};
76+
};
77+
};
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
CONFIG_CROSS_COMPILE="arc-elf32-"
2+
# CONFIG_LOCALVERSION_AUTO is not set
3+
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
4+
# CONFIG_SWAP is not set
5+
CONFIG_HIGH_RES_TIMERS=y
6+
CONFIG_IKCONFIG=y
7+
CONFIG_IKCONFIG_PROC=y
8+
CONFIG_NAMESPACES=y
9+
# CONFIG_UTS_NS is not set
10+
# CONFIG_PID_NS is not set
11+
CONFIG_BLK_DEV_INITRD=y
12+
CONFIG_INITRAMFS_SOURCE="../arc_initramfs"
13+
CONFIG_KALLSYMS_ALL=y
14+
CONFIG_EMBEDDED=y
15+
# CONFIG_SLUB_DEBUG is not set
16+
# CONFIG_COMPAT_BRK is not set
17+
CONFIG_KPROBES=y
18+
CONFIG_MODULES=y
19+
# CONFIG_LBDAF is not set
20+
# CONFIG_BLK_DEV_BSG is not set
21+
# CONFIG_IOSCHED_DEADLINE is not set
22+
# CONFIG_IOSCHED_CFQ is not set
23+
CONFIG_ARC_PLAT_FPGA_LEGACY=y
24+
CONFIG_ARC_BOARD_ML509=y
25+
# CONFIG_ARC_IDE is not set
26+
# CONFIG_ARCTANGENT_EMAC is not set
27+
# CONFIG_ARC_HAS_RTSC is not set
28+
CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci"
29+
# CONFIG_COMPACTION is not set
30+
# CONFIG_CROSS_MEMORY_ATTACH is not set
31+
CONFIG_NET=y
32+
CONFIG_PACKET=y
33+
CONFIG_UNIX=y
34+
CONFIG_UNIX_DIAG=y
35+
CONFIG_NET_KEY=y
36+
CONFIG_INET=y
37+
# CONFIG_IPV6 is not set
38+
# CONFIG_STANDALONE is not set
39+
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
40+
# CONFIG_FIRMWARE_IN_KERNEL is not set
41+
# CONFIG_BLK_DEV is not set
42+
CONFIG_NETDEVICES=y
43+
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
44+
# CONFIG_MOUSE_PS2_ALPS is not set
45+
# CONFIG_MOUSE_PS2_LOGIPS2PP is not set
46+
# CONFIG_MOUSE_PS2_SYNAPTICS is not set
47+
# CONFIG_MOUSE_PS2_TRACKPOINT is not set
48+
CONFIG_MOUSE_PS2_TOUCHKIT=y
49+
# CONFIG_SERIO_I8042 is not set
50+
# CONFIG_SERIO_SERPORT is not set
51+
CONFIG_SERIO_ARC_PS2=y
52+
# CONFIG_LEGACY_PTYS is not set
53+
# CONFIG_DEVKMEM is not set
54+
CONFIG_SERIAL_8250=y
55+
CONFIG_SERIAL_8250_CONSOLE=y
56+
CONFIG_SERIAL_8250_DW=y
57+
CONFIG_SERIAL_ARC=y
58+
CONFIG_SERIAL_ARC_CONSOLE=y
59+
# CONFIG_HW_RANDOM is not set
60+
# CONFIG_HWMON is not set
61+
CONFIG_FB=y
62+
# CONFIG_VGA_CONSOLE is not set
63+
CONFIG_FRAMEBUFFER_CONSOLE=y
64+
CONFIG_LOGO=y
65+
# CONFIG_HID is not set
66+
# CONFIG_USB_SUPPORT is not set
67+
# CONFIG_IOMMU_SUPPORT is not set
68+
CONFIG_EXT2_FS=y
69+
CONFIG_EXT2_FS_XATTR=y
70+
CONFIG_TMPFS=y
71+
# CONFIG_MISC_FILESYSTEMS is not set
72+
CONFIG_NFS_FS=y
73+
# CONFIG_ENABLE_WARN_DEPRECATED is not set
74+
# CONFIG_ENABLE_MUST_CHECK is not set
75+
CONFIG_XZ_DEC=y

‎arch/arc/plat-arcfpga/platform.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,15 @@ MACHINE_START(ML509, "ml509")
224224
.init_smp = iss_model_init_smp,
225225
#endif
226226
MACHINE_END
227+
228+
static const char *nsimosci_compat[] __initdata = {
229+
"snps,nsimosci",
230+
NULL,
231+
};
232+
233+
MACHINE_START(NSIMOSCI, "nsimosci")
234+
.dt_compat = nsimosci_compat,
235+
.init_early = NULL,
236+
.init_machine = plat_fpga_populate_dev,
237+
.init_irq = NULL,
238+
MACHINE_END

0 commit comments

Comments
 (0)