Resurrecting the SuperH Architecture (2015)

RetroTechie1 pts0 comments

Resurrecting the SuperH architecture [LWN.net]

LWN<br>.net<br>News from the source

Content Weekly Edition<br>Archives<br>Search<br>Kernel<br>Security<br>Events calendar<br>Unread comments

LWN FAQ<br>Write for us

Edition Return to the Front page

User:<br>Password: |

Log in /<br>Subscribe /<br>Register

Resurrecting the SuperH architecture

For humans, by humans

Every article on LWN.net is written for humans, by humans. If you've<br>enjoyed this article and want to see more like it, your subscription goes a<br>long way to keeping the slop at bay. We are offering a free one-month trial subscription (no credit card required) to get you started.

By Nathan Willis<br>June 10, 2015

LinuxCon Japan

Processor architectures are far from trivial; untold millions of<br>dollars and many thousands of hours have likely gone into the creation<br>and refinement of the x86 and ARM architectures that dominate the<br>CPUs in Linux boxes today. But that does not mean that x86 and ARM are the only<br>architectures of value, as Jeff Dionne, Rob Landley, and Shumpei<br>Kawasaki illustrated in their LinuxCon Japan session "Turtles all the<br>way down: running Linux on open hardware." The team has been working<br>on breathing new life into a somewhat older architecture that offers<br>comparable performance to many common system-on-chip (SoC)<br>designs—and which<br>can be produced as open hardware.

The architecture in question is Hitachi's SuperH, whose<br>instruction set was a precursor to one used in many ARM Thumb CPUs. But the<br>patents on the most important SuperH designs have all<br>expired—and more will be expiring in the months and years to<br>come—which makes SuperH a candidate for revival. Dionne,<br>Landley, and Kawasaki's<br>session [PDF] outlined the status of their SuperH-based "J2" core design, which<br>can be synthesized in low-cost FGPAs or manufactured in bulk.

Dionne started off the talk by making a case for the value of<br>running open-source software on open hardware. That is a familiar<br>enough position, of course, but he went on to point out that a<br>modern laptop contains many more ARM and MIPS processors than it does<br>x86 processors. These small processors serve as USB and hard-drive<br>controllers, run ACPI and low-level system management services, and<br>much more. Thus, the notion of "taking control of your hardware" has<br>to include these chips as well.

He then asked what constitutes the minimal system that can run<br>Linux. All that is really needed, he said, is a flat, 32-bit memory<br>address space, a CPU with registers to hold instructions, some I/O<br>and storage (from which the kernel and initramfs can be loaded), and a timer for interrupts. That plus GCC<br>is sufficient to get Linux running—although it may not be fast,<br>depending on the specifics. One does not even need a cache,<br>floating-point unit, SMP, or a memory-management unit (MMU).

At this point, Landley chimed in to point out that Dionne had been<br>the maintainer of uClinux, which was an active project maintaining<br>Linux on non-MMU systems up through 2003, when Dionne handed off<br>maintainership to others where, unfortunately, development slowed down<br>considerably. The requirements for running Linux are quite low,<br>though; many of the<br>open-hardware boards popular today (such as the Raspberry Pi) throw in<br>all sorts of unnecessary extras.

That brings us to SuperH, which Dionne said was developed with a<br>"massive research and development outlay." The SuperH SH2 was a<br>highly optimized design, employing a five-stage Harvard RISC<br>architecture with an instruction-set density considerably ahead of its<br>contemporaries. That density is a common way to measure CPU efficiency,<br>he explained; a dense architecture requires fewer instructions and<br>thus fewer clock cycles to perform a given task. Most of a CPU's<br>clock cycles are spent waiting for something, he said; waiting for<br>instructions is such a bottleneck that if you can get them fast<br>enough, "it almost doesn't matter what your clock speed is."

The SuperH<br>architecture is so dense that a 2009<br>research paper [PDF] plotted it ahead of every architecture other<br>than x86, x86_64, and CRIS v32. ARM even<br>licensed the SuperH patent portfolio to create its Thumb<br>instruction set in the mid-1990s.

Fortunately, the patents are now expiring. The last of the SH2<br>patents expired in 2014, with more to come. The SH2 processor was,<br>he said, used in the Sega Saturn game console; the SH4 (found in the<br>Sony Sega Dreamcast) will have the last of its patents expire in 2016.<br>Though they are older chips, they were used in relatively powerful devices.

In preparation for this milestone, Dionne, Landley, and others have<br>been working on J2, a clean-room re-implementation of the SH2 that is implemented<br>as a "core design kit." The source for the core is written in VHDL,<br>and it can be synthesized on a Xilinx Spartan6 FPGA. The Spartan6 is<br>a low-cost platform (boards can be purchased for around $50), but it<br>also contains enough room to add additional synthesized<br>components—like a serial controller, memory controller, digital<br>signal processor, and...

superh architecture dionne linux open hardware

Related Articles