diff mbox

config: add Synopsys nSIM and nSIM OSCI platforms

Message ID 1470394586-6091-1-git-send-email-vzakhar@synopsys.com
State Changes Requested
Headers show

Commit Message

Zakharov Vlad Aug. 5, 2016, 10:56 a.m. UTC
nSIM and nSIM OSCI are 2 simulation platforms from Synopsys
that could emulate both ARCompact and ARCv2 CPUs.

Note for ARCv2 we provide both UP (uni-processor) and SMP
(multi-processor) configs.

So-called "standalone" nSIM and it's free flavor Free nSIM
have only 1 peripheral - serial port. Still they are
(especially free version) very useful for regression testing
and debugging of Linux kernel.

nSIM OSCI emulates more functional boards having not only serial port
but as well:
 * LCD screen
  * PS/2 keyboard
   * Ethernet controller (which communicates with the host)

Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
---
 configs/snps_nsim_700_defconfig          | 18 ++++++++++++++++++
 configs/snps_nsim_hs38_defconfig         | 19 +++++++++++++++++++
 configs/snps_nsim_hs38_smp_defconfig     | 19 +++++++++++++++++++
 configs/snps_nsimosci_700_defconfig      | 19 +++++++++++++++++++
 configs/snps_nsimosci_hs38_defconfig     | 20 ++++++++++++++++++++
 configs/snps_nsimosci_hs38_smp_defconfig | 20 ++++++++++++++++++++
 6 files changed, 115 insertions(+)
 create mode 100644 configs/snps_nsim_700_defconfig
 create mode 100644 configs/snps_nsim_hs38_defconfig
 create mode 100644 configs/snps_nsim_hs38_smp_defconfig
 create mode 100644 configs/snps_nsimosci_700_defconfig
 create mode 100644 configs/snps_nsimosci_hs38_defconfig
 create mode 100644 configs/snps_nsimosci_hs38_smp_defconfig

Comments

Thomas Petazzoni Aug. 5, 2016, 12:01 p.m. UTC | #1
Hello,

On Fri,  5 Aug 2016 13:56:26 +0300, Vlad Zakharov wrote:
> nSIM and nSIM OSCI are 2 simulation platforms from Synopsys
> that could emulate both ARCompact and ARCv2 CPUs.
> 
> Note for ARCv2 we provide both UP (uni-processor) and SMP
> (multi-processor) configs.
> 
> So-called "standalone" nSIM and it's free flavor Free nSIM
> have only 1 peripheral - serial port. Still they are
> (especially free version) very useful for regression testing
> and debugging of Linux kernel.
> 
> nSIM OSCI emulates more functional boards having not only serial port
> but as well:
>  * LCD screen
>   * PS/2 keyboard
>    * Ethernet controller (which communicates with the host)
> 
> Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>

Thanks for this contribution. It would be useful to add a readme.txt
file that explains how to start the result of the Buildroot build with
those simulation platforms, especially the one that is freely available.

> ---
>  configs/snps_nsim_700_defconfig          | 18 ++++++++++++++++++
>  configs/snps_nsim_hs38_defconfig         | 19 +++++++++++++++++++
>  configs/snps_nsim_hs38_smp_defconfig     | 19 +++++++++++++++++++
>  configs/snps_nsimosci_700_defconfig      | 19 +++++++++++++++++++
>  configs/snps_nsimosci_hs38_defconfig     | 20 ++++++++++++++++++++
>  configs/snps_nsimosci_hs38_smp_defconfig | 20 ++++++++++++++++++++

Do we really need all those combinations? I do understand the 700 vs.
HS38 difference, but couldn't the rest be handled with just different
DTBs ? It seems annoying to have both one kernel defconfig for each of
those, and then one Buildroot configuration for each of those as well.

Thanks,

Thomas
Alexey Brodkin Aug. 5, 2016, 12:24 p.m. UTC | #2
Hi Thomas,

On Fri, 2016-08-05 at 14:01 +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Fri,  5 Aug 2016 13:56:26 +0300, Vlad Zakharov wrote:
> > 
> > nSIM and nSIM OSCI are 2 simulation platforms from Synopsys
> > that could emulate both ARCompact and ARCv2 CPUs.
> > 
> > Note for ARCv2 we provide both UP (uni-processor) and SMP
> > (multi-processor) configs.
> > 
> > So-called "standalone" nSIM and it's free flavor Free nSIM
> > have only 1 peripheral - serial port. Still they are
> > (especially free version) very useful for regression testing
> > and debugging of Linux kernel.
> > 
> > nSIM OSCI emulates more functional boards having not only serial port
> > but as well:
> >  * LCD screen
> >   * PS/2 keyboard
> >    * Ethernet controller (which communicates with the host)
> > 
> > Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
> 
> Thanks for this contribution. It would be useful to add a readme.txt
> file that explains how to start the result of the Buildroot build with
> those simulation platforms, especially the one that is freely available.
> 
> > 
> > ---
> >  configs/snps_nsim_700_defconfig          | 18 ++++++++++++++++++
> >  configs/snps_nsim_hs38_defconfig         | 19 +++++++++++++++++++
> >  configs/snps_nsim_hs38_smp_defconfig     | 19 +++++++++++++++++++
> >  configs/snps_nsimosci_700_defconfig      | 19 +++++++++++++++++++
> >  configs/snps_nsimosci_hs38_defconfig     | 20 ++++++++++++++++++++
> >  configs/snps_nsimosci_hs38_smp_defconfig | 20 ++++++++++++++++++++
> 
> Do we really need all those combinations? I do understand the 700 vs.
> HS38 difference, but couldn't the rest be handled with just different
> DTBs ? It seems annoying to have both one kernel defconfig for each of
> those, and then one Buildroot configuration for each of those as well.

Unfortunately it's not only different .dtb.
On ARC for SMP we need to modify kernel configuration as well.

I hope some day we'll be able to run the same one kernel binary on any
flavor of ARCv2 CPU (be it UP or SMP) but now we cannot.

We still have way too many differences between UP and SMP.
If you just git grep CONFIG_SMP in arch/arc you'l see some of those.

In general I agree so many configs in BR look weird and what's worse requires
much more work on maintenance. So we may try to select more useful configs but
for me it's hard to make this decision because from one point of view in case of
ARCv2 we're more interested in SMP configs (that's one of the main differences compared
to older ARCompact CPUs) but in simulation SMP setups work significantly slower
and IMHO UP versions are much more usable if SMP itself is not a requirement.

-Alexey
Thomas Petazzoni Oct. 25, 2016, 8:01 p.m. UTC | #3
Hello,

On Fri, 5 Aug 2016 12:24:54 +0000, Alexey Brodkin wrote:

> > > nSIM OSCI emulates more functional boards having not only serial port
> > > but as well:
> > >  * LCD screen
> > >   * PS/2 keyboard
> > >    * Ethernet controller (which communicates with the host)
> > > 
> > > Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>  
> > 
> > Thanks for this contribution. It would be useful to add a readme.txt
> > file that explains how to start the result of the Buildroot build with
> > those simulation platforms, especially the one that is freely available.

Would it be possible to resubmit with a readme.txt file (not one per
configuration, but a global one that covers all those configurations).

> > >  configs/snps_nsim_700_defconfig          | 18 ++++++++++++++++++
> > >  configs/snps_nsim_hs38_defconfig         | 19 +++++++++++++++++++
> > >  configs/snps_nsim_hs38_smp_defconfig     | 19 +++++++++++++++++++
> > >  configs/snps_nsimosci_700_defconfig      | 19 +++++++++++++++++++
> > >  configs/snps_nsimosci_hs38_defconfig     | 20 ++++++++++++++++++++
> > >  configs/snps_nsimosci_hs38_smp_defconfig | 20 ++++++++++++++++++++  
> > 
> > Do we really need all those combinations? I do understand the 700 vs.
> > HS38 difference, but couldn't the rest be handled with just different
> > DTBs ? It seems annoying to have both one kernel defconfig for each of
> > those, and then one Buildroot configuration for each of those as well.  
> 
> Unfortunately it's not only different .dtb.
> On ARC for SMP we need to modify kernel configuration as well.
> 
> I hope some day we'll be able to run the same one kernel binary on any
> flavor of ARCv2 CPU (be it UP or SMP) but now we cannot.

OK.

Then is there a way to where the nsim and its corresponding nsimosci
variant? What is the difference between the two?

Looking at the kernel defconfigs, it seems that the only important
difference is the built-in DTB:

-CONFIG_ARC_BUILTIN_DTB_NAME="nsim_hs"
+CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci_hs"

Can't you use an external DTB instead ?

> In general I agree so many configs in BR look weird and what's worse requires
> much more work on maintenance. So we may try to select more useful configs but
> for me it's hard to make this decision because from one point of view in case of
> ARCv2 we're more interested in SMP configs (that's one of the main differences compared
> to older ARCompact CPUs) but in simulation SMP setups work significantly slower
> and IMHO UP versions are much more usable if SMP itself is not a requirement.

Is nSIM even available for free ? Can I download it and test those
defconfigs ?

Best regards,

Thomas
Alexey Brodkin Oct. 26, 2016, 10:35 a.m. UTC | #4
Hi Thomas,

On Tue, 2016-10-25 at 22:01 +0200, Thomas Petazzoni wrote:
> Hello,

> 

> On Fri, 5 Aug 2016 12:24:54 +0000, Alexey Brodkin wrote:

> 

> > 

> > > 

> > > > 

> > > > nSIM OSCI emulates more functional boards having not only serial port

> > > > but as well:

> > > >  * LCD screen

> > > >   * PS/2 keyboard

> > > >    * Ethernet controller (which communicates with the host)

> > > > 

> > > > Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>  

> > > 

> > > Thanks for this contribution. It would be useful to add a readme.txt

> > > file that explains how to start the result of the Buildroot build with

> > > those simulation platforms, especially the one that is freely available.

> 

> Would it be possible to resubmit with a readme.txt file (not one per

> configuration, but a global one that covers all those configurations).

> 

> > 

> > > 

> > > > 

> > > >  configs/snps_nsim_700_defconfig          | 18 ++++++++++++++++++

> > > >  configs/snps_nsim_hs38_defconfig         | 19 +++++++++++++++++++

> > > >  configs/snps_nsim_hs38_smp_defconfig     | 19 +++++++++++++++++++

> > > >  configs/snps_nsimosci_700_defconfig      | 19 +++++++++++++++++++

> > > >  configs/snps_nsimosci_hs38_defconfig     | 20 ++++++++++++++++++++

> > > >  configs/snps_nsimosci_hs38_smp_defconfig | 20 ++++++++++++++++++++  

> > > 

> > > Do we really need all those combinations? I do understand the 700 vs.

> > > HS38 difference, but couldn't the rest be handled with just different

> > > DTBs ? It seems annoying to have both one kernel defconfig for each of

> > > those, and then one Buildroot configuration for each of those as well.  

> > 

> > Unfortunately it's not only different .dtb.

> > On ARC for SMP we need to modify kernel configuration as well.

> > 

> > I hope some day we'll be able to run the same one kernel binary on any

> > flavor of ARCv2 CPU (be it UP or SMP) but now we cannot.

> 

> OK.

> 

> Then is there a way to where the nsim and its corresponding nsimosci

> variant? What is the difference between the two?

> 

> Looking at the kernel defconfigs, it seems that the only important

> difference is the built-in DTB:

> 

> -CONFIG_ARC_BUILTIN_DTB_NAME="nsim_hs"

> +CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci_hs"

> 

> Can't you use an external DTB instead ?


Hm... that's what happens when new pair of eyes starts to look at things :)

Right I think we may unify those configs, for that we'll need to merge
options for drivers and then the only real difference will be DTB.

A small problem here is both simulators as of now are supposed to load just
one Elf with everything built-in. And so we build 2 different binaries which
at high-level differ in built-in .dtb. Indeed it's much more elegant to keep
only 1 defconfig for all different flavors of boards like what IMX has now with
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/configs/imx_v6_v7_defconfig

But I think it worth a separate discussion on linux-snps mailing list.

As for this discussion I'd prefer to keep using in-tree kernel defconfigs
compared to option to have combined defconfig in BR. That IMHO simplifies
maintenance, i.e. if defconfigs get changed in upstream we won't miss thanges
on the next kernel version bump in BR.

> > In general I agree so many configs in BR look weird and what's worse requires

> > much more work on maintenance. So we may try to select more useful configs but

> > for me it's hard to make this decision because from one point of view in case of

> > ARCv2 we're more interested in SMP configs (that's one of the main differences compared

> > to older ARCompact CPUs) but in simulation SMP setups work significantly slower

> > and IMHO UP versions are much more usable if SMP itself is not a requirement.

> 

> Is nSIM even available for free ? Can I download it and test those

> defconfigs ?


Sure you may download a copy of Free nSIM here after a simple registration:
https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi

Since that's a completely new tool for you I may expect you face some issues
in that case please don't hesitate to contact me.

Another important note: as of today Free version of nSIM only supports UP (single-core)
configurations, which means you won't be able to try SMP configs in run-time.

-Alexey
diff mbox

Patch

diff --git a/configs/snps_nsim_700_defconfig b/configs/snps_nsim_700_defconfig
new file mode 100644
index 0000000..3486d9a
--- /dev/null
+++ b/configs/snps_nsim_700_defconfig
@@ -0,0 +1,18 @@ 
+# Architecture
+BR2_arcle=y
+
+# System
+BR2_TARGET_GENERIC_HOSTNAME="nsim"
+BR2_TARGET_GENERIC_ISSUE="Welcome to the ARC nSIM"
+BR2_TARGET_ROOTFS_INITRAMFS=y
+
+# Linux headers same as kernel, a 4.7 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_7=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.7"
+BR2_LINUX_KERNEL_DEFCONFIG="nsim_700"
+BR2_LINUX_KERNEL_VMLINUX=y
+
diff --git a/configs/snps_nsim_hs38_defconfig b/configs/snps_nsim_hs38_defconfig
new file mode 100644
index 0000000..435b2ac
--- /dev/null
+++ b/configs/snps_nsim_hs38_defconfig
@@ -0,0 +1,19 @@ 
+# Architecture
+BR2_arcle=y
+BR2_archs38=y
+
+# System
+BR2_TARGET_GENERIC_HOSTNAME="nsim"
+BR2_TARGET_GENERIC_ISSUE="Welcome to the ARC nSIM"
+BR2_TARGET_ROOTFS_INITRAMFS=y
+
+# Linux headers same as kernel, a 4.7 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_7=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.7"
+BR2_LINUX_KERNEL_DEFCONFIG="nsim_hs"
+BR2_LINUX_KERNEL_VMLINUX=y
+
diff --git a/configs/snps_nsim_hs38_smp_defconfig b/configs/snps_nsim_hs38_smp_defconfig
new file mode 100644
index 0000000..b61b81c
--- /dev/null
+++ b/configs/snps_nsim_hs38_smp_defconfig
@@ -0,0 +1,19 @@ 
+# Architecture
+BR2_arcle=y
+BR2_archs38=y
+
+# System
+BR2_TARGET_GENERIC_HOSTNAME="nsim"
+BR2_TARGET_GENERIC_ISSUE="Welcome to the ARC nSIM"
+BR2_TARGET_ROOTFS_INITRAMFS=y
+
+# Linux headers same as kernel, a 4.7 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_7=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.7"
+BR2_LINUX_KERNEL_DEFCONFIG="nsim_hs_smp"
+BR2_LINUX_KERNEL_VMLINUX=y
+
diff --git a/configs/snps_nsimosci_700_defconfig b/configs/snps_nsimosci_700_defconfig
new file mode 100644
index 0000000..7cdedc3
--- /dev/null
+++ b/configs/snps_nsimosci_700_defconfig
@@ -0,0 +1,19 @@ 
+# Architecture
+BR2_arcle=y
+
+# System
+BR2_TARGET_GENERIC_HOSTNAME="nsimosci"
+BR2_TARGET_GENERIC_ISSUE="Welcome to the ARC nSIM OSCI"
+BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_ROOTFS_OVERLAY="board/synopsys/axs10x/fs-overlay"
+
+# Linux headers same as kernel, a 4.7 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_7=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.7"
+BR2_LINUX_KERNEL_DEFCONFIG="nsimosci"
+BR2_LINUX_KERNEL_VMLINUX=y
+
diff --git a/configs/snps_nsimosci_hs38_defconfig b/configs/snps_nsimosci_hs38_defconfig
new file mode 100644
index 0000000..5ebece2
--- /dev/null
+++ b/configs/snps_nsimosci_hs38_defconfig
@@ -0,0 +1,20 @@ 
+# Architecture
+BR2_arcle=y
+BR2_archs38=y
+
+# System
+BR2_TARGET_GENERIC_HOSTNAME="nsimosci"
+BR2_TARGET_GENERIC_ISSUE="Welcome to the ARC nSIM OSCI"
+BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_ROOTFS_OVERLAY="board/synopsys/axs10x/fs-overlay"
+
+# Linux headers same as kernel, a 4.7 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_7=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.7"
+BR2_LINUX_KERNEL_DEFCONFIG="nsimosci_hs"
+BR2_LINUX_KERNEL_VMLINUX=y
+
diff --git a/configs/snps_nsimosci_hs38_smp_defconfig b/configs/snps_nsimosci_hs38_smp_defconfig
new file mode 100644
index 0000000..3edaf4d
--- /dev/null
+++ b/configs/snps_nsimosci_hs38_smp_defconfig
@@ -0,0 +1,20 @@ 
+# Architecture
+BR2_arcle=y
+BR2_archs38=y
+
+# System
+BR2_TARGET_GENERIC_HOSTNAME="nsimosci"
+BR2_TARGET_GENERIC_ISSUE="Welcome to the ARC nSIM OSCI"
+BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_ROOTFS_OVERLAY="board/synopsys/axs10x/fs-overlay"
+
+# Linux headers same as kernel, a 4.7 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_7=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.7"
+BR2_LINUX_KERNEL_DEFCONFIG="nsimosci_hs_smp"
+BR2_LINUX_KERNEL_VMLINUX=y
+