ARC: Add support for ARC HS48 v3.1 processor
diff mbox series

Message ID 20190604053927.29319-1-Evgeniy.Didin@synopsys.com
State New
Headers show
Series
  • ARC: Add support for ARC HS48 v3.1 processor
Related show

Commit Message

Evgeniy Didin June 4, 2019, 5:39 a.m. UTC
This patch introduces recently released significant
update to ARC HS family: ARC HS48.

One of the major ARC HS48 features is dual-issue pipeline
which requires a little bit modified instruction scheduling compared
to single-issue cores (HS38), thus new "-mcpu/--with-cpu=hs4x".

Also to address some peculiarities of early designs based on
HS48 we introduced yet another "-mcpu/--with-cpu=hs4x_rel1" which
we're going to use as well on some of our development boards.

Note, there is a prerequisite patch:
	https://patchwork.ozlabs.org/patch/995220/

Signed-off-by: Evgeniy Didin <didin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: arc-buildroot@synopsys.com
---
 arch/Config.in.arc | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

Comments

Thomas Petazzoni June 24, 2019, 4:46 a.m. UTC | #1
Hello Evgeniy,

On Tue,  4 Jun 2019 08:39:27 +0300
Evgeniy Didin <Evgeniy.Didin@synopsys.com> wrote:

> This patch introduces recently released significant
> update to ARC HS family: ARC HS48.
> 
> One of the major ARC HS48 features is dual-issue pipeline
> which requires a little bit modified instruction scheduling compared
> to single-issue cores (HS38), thus new "-mcpu/--with-cpu=hs4x".
> 
> Also to address some peculiarities of early designs based on
> HS48 we introduced yet another "-mcpu/--with-cpu=hs4x_rel1" which

I guess you meant --with-cpu=hs4x_rel31 here, correct ?

Overall, I'm a bit confused by the naming and choice of options for the
ARC architecture.

The patch at https://patchwork.ozlabs.org/patch/995220/ adds a variant
for ARC HS38 with quad MAC and double precision FPU, and the gcc option
to enable it was named hs38_linux. It is really weird to use the name
of an operating system in a gcc architecture name option. Indeed, you
could very well run a different operating system than Linux. Don't take
it as an offense, but the logic used by RISC-V to name gcc options
looks a lot better: a number of letters than indicate with optional
features of the CPU core have been enabled in the design. This allows
gcc and therefore Buildroot to easily support possibly any combination
of CPU core design, rather than just a few selected combinations. But
well, I see that hs38_linux has been accepted into upstream gcc.

Regarding HS48, is "rel31" really part of the name ? Are you going to
update this with rel32, rel33, rel41, etc. ?

Or is this rel31 only because as explained in the commit log, it's for
early designs only ? And then you will add the real hs48 option that
will use --with-cpu=hs4x ?

Thanks,

Thomas

Patch
diff mbox series

diff --git a/arch/Config.in.arc b/arch/Config.in.arc
index 69bb1504a9..8e9cd96dd2 100644
--- a/arch/Config.in.arc
+++ b/arch/Config.in.arc
@@ -30,12 +30,21 @@  config BR2_archs38_full
 
 	  It corresponds to "hs38_slc_full" ARC HS template in ARChitect.
 
+
+config BR2_archs4x_rel31
+        bool "ARC HS48 rel 31"
+        help
+	   Latest release of HS48 processor
+           - Dual- and quad multiply and MC oprations
+           - Double-precision FPU
+
+
 endchoice
 
 # Choice of atomic instructions presence
 config BR2_ARC_ATOMIC_EXT
 	bool "Atomic extension (LLOCK/SCOND instructions)"
-	default y if BR2_arc770d || BR2_archs38 || BR2_archs38_full
+	default y if BR2_arc770d || BR2_archs38 || BR2_archs38_full || BR2_archs4x_rel31
 
 config BR2_ARCH
 	default "arc"	if BR2_arcle
@@ -54,10 +63,11 @@  config BR2_GCC_TARGET_CPU
 	default "arc700" if BR2_arc770d
 	default "archs"	 if BR2_archs38
 	default "hs38_linux"	 if BR2_archs38_full
+	default "hs4x_rel31" if BR2_archs4x_rel31
 
 config BR2_READELF_ARCH_NAME
 	default "ARCompact"	if BR2_arc750d || BR2_arc770d
-	default "ARCv2"		if BR2_archs38 || BR2_archs38_full
+	default "ARCv2"		if BR2_archs38 || BR2_archs38_full || BR2_archs4x_rel31
 
 choice
 	prompt "MMU Page Size"
@@ -77,7 +87,7 @@  choice
 
 config BR2_ARC_PAGE_SIZE_4K
 	bool "4KB"
-	depends on BR2_arc770d || BR2_archs38 || BR2_archs38_full
+	depends on BR2_arc770d || BR2_archs38 || BR2_archs38_full || BR2_archs4x_rel31
 
 config BR2_ARC_PAGE_SIZE_8K
 	bool "8KB"
@@ -87,7 +97,7 @@  config BR2_ARC_PAGE_SIZE_8K
 
 config BR2_ARC_PAGE_SIZE_16K
 	bool "16KB"
-	depends on BR2_arc770d || BR2_archs38 || BR2_archs38_full
+	depends on BR2_arc770d || BR2_archs38 || BR2_archs38_full || BR2_archs4x_rel31
 
 endchoice