8

I've been studying the sources of Chisel and also various Lavas (Kansas, Chalmers and Xilinx flavors) and CLaSH. I'm trying to understand what's the main selling points of Chisel versus the others. The main one I've identified is fast simulation.

I was wondering if people who have studied more in-depth can point out other advantages, disadvantages and trade-offs.

(Sorry if it's too much of a discussion question. I tried posting to chisel-users but apparently you need to be accepted as a member to do that.)

Michael Fox
  • 3,632
  • 1
  • 17
  • 27

2 Answers2

8

First, a disclaimer that I'm a heavy Chisel user but have only passing familiarity with the Haskell-based DSELs that you mention.

I think the ability of Chisel to target multiple backends (C++, Verilog, etc.) is a significant advantage. The generated C++ allows cycle-accurate simulation at many times the speed of Verilog/VHDL simulators, because it avoids the event-driven model inherent to those languages.

This is not an intrinsic limitation, but Lava and CLaSH seem to be mostly targeted at FPGA implementations, while Chisel has been used for work on both FPGAs and ASICs. Chisel may also be a bit better supported; code, instructions, and examples are all available on GitHub, and the language remains under active development.

There are also differences between Haskell and Scala (the parent languages); if you're more comfortable in one or the other, it might make getting started a bit easier. (I'll leave the "language wars" to the experts.)

Ben
  • 324
  • 4
  • 9
2

There is a section on the Clash tutorial page which describes some trade-offs between Clash and the Lava flavors (I'll leave it as a reference). Basically Clash uses a static analysis approach while Lava flavors go with the DSEL (Domain Specific Embedded Language) approach. These differences are probably pretty similar to the differences between Chisel and Clash because Chisel also follows the DSEL approach. So, with Clash you can write Haskell code then compile it into VHDL, Verilog, SystemVerilog using the Clash compiler. I am not familiar enough with Chisel or DSELs, but I do know its not JUST a compilation step to HDL.

FWIW, I looked at using Chisel for projects and I found the ecosystem, docs, and community were amazing but I did not like the Scala style. Further research in FP led me to Haskell and Clash. I like the pure functional style to hardware design and the tight coupling of Haskell has allowed me to "have my cake and eat it too"; learn hardware and Haskell at the same time. Like the previous answer, Clash vs Chisel is more of a language decision while Clash vs Lavas is more DSEL vs static analysis (compiled) decision. See the reference for further reading on the latter decision.

Ref: http://hackage.haskell.org/package/clash-prelude-1.2.5/docs/Clash-Tutorial.html#g:20

dopamane
  • 1,315
  • 2
  • 14
  • 27