SpinalHDL uses Scala to simplify hardware descriptions, then emits VHDL or Verilog

FPGA, HDL, Scala

This is the read-only HTML version. For the full Visual Space experience, open the app.

FPGA, hardware description — I

FPGA, hardware description — I
FPGA, hardware description — I

Source: SpinalHDL on Hackaday.io · Dolu1990

Reusable hardware design

SpinalHDL keeps registers, gates and clock domains explicit while reducing repetitive wiring. In a September 2016 update, its Hackaday.io creator reported a working FPGA SoC with a RISC-V CPU, memory controllers and peripherals—all described in the language.

👏 1

Describing an FPGA design can mean writing the circuit—and then writing a great deal of code just to connect it. Dolu1990’s SpinalHDL project on Hackaday.io tackles that repetition with a Scala-based hardware description language that generates VHDL or Verilog. The idea is to add reusable abstractions without making designers give up explicit control over the hardware they describe.

Higher-level code, still explicit hardware

SpinalHDL is presented as an alternative to writing VHDL or Verilog directly, not as high-level synthesis. Its starting points remain familiar hardware elements: flip-flops, gates, conditional logic and clock domains. Scala supplies ways to organize and generate those descriptions rather than asking the tool to turn an abstract software algorithm into a circuit.

That distinction matters most when a design grows beyond a few components. The project describes connecting complex buses such as AXI in a single line, defining custom bus interfaces and building reusable abstraction layers. The saving is in the description, not a claim that the resulting bus needs fewer physical signals.

Other advertised conveniences include conversions between structured data and bits, Scala IDE support, and checks for combinational loops, unintended latches and unintentional clock-domain crossings. These checks target common design mistakes; they aren’t evidence that an entire circuit has been verified.

The output format is the bridge to existing workflows. By emitting VHDL or Verilog, SpinalHDL is intended to work with conventional simulation and synthesis tools. The project also supports mixed designs in which generated components interoperate with existing VHDL or Verilog IP, so adopting it needn’t mean rewriting every block.

A 2016 SoC puts the abstraction to work

The Hackaday.io project was created on July 24, 2016. Its supplied September 4, 2016 log moves beyond language features to a concrete implementation: Pinsec, a small SoC that Dolu1990 reported was fully written in SpinalHDL and working on an FPGA.

The reported system included:

•
A RISC-V CPU with an instruction cache, multiply/divide extension and interrupt controller.
•
AXI4 interconnect for high-speed buses and APB3 interconnect for peripherals.
•
A JTAG bridge for loading binaries and debugging the CPU.
•
An SDR SDRAM controller, on-chip RAM, UART, VGA, timers and GPIO.

That is a useful test of the project’s central idea: a SoC brings together exactly the bus connections, peripheral interfaces and repeated structures that SpinalHDL aims to make less laborious. The log reports a working implementation, but provides no performance, resource-use or code-size comparison, so it doesn’t establish how much the language saved. It documents the project at that point in 2016, not its present status.

Less repetition without hiding the circuit

The SpinalHDL repository and linked documentation are starting points for investigating the approach. The useful evaluation is more specific than counting lines: can a reusable interface remove repetitive wiring while leaving the generated registers, logic and timing relationships understandable? SpinalHDL’s proposition is that a shorter hardware description can still be an explicit one.

Source: SpinalHDL

Hardware

3 Followers

A workshop for electronics and physical computing. Share circuits, boards, tools and prototypes; work through measurement and debugging, compare components, and document the choices that turn an idea into working hardware.

Visual Space is built for projects like this—where creators collaborate, organize goals, and grow communities around real work.