Chisel is an alternative to classic Hardware Description Languages (HDLs) like Verilog and VHDL. My experience with Verilog and its existing prevalence in both industry and academia indicate that it is a well-developed mature language.
Can someone who has used Chisel for some time share your experiences and help to explain Chisel's utility over classic HDLs?
My experiences so far, as an undergraduate IC design student, include:
A hardware description language enables a precise, formal description of an electronic circuit that allows for the automated analysis and simulation of an electronic circuit.
Some developers prefer Chisel as it requires 5 times lesser code and is much faster to develop than Verilog.
The most popular hardware description languages are Verilog and VHDL. They are widely used in conjunction with FPGAs, which are digital devices that are specifically designed to facilitate the creation of customized digital circuits.
Chisel is not high level synthesis, which is one of the reasons why I love it. You are actually describing the circuit itself, with is what a hardware description language is supposed to do.
This is an incredibly difficult question to answer for a number of reasons. The Chisel community is attempting to unify on one concrete answer that is easy to understand. There are two main angles:
Think about the following similar question, "What utility does Python provide over C?" A response indicating no utility would likely bring up the following points:
for
, while
, etc. and the code I write looks the same: printf("hello\n")
vs. print("hello")
The problem with this line of reasoning is that it's ignoring the fact that Python provides new programming paradigms that allow you to be more productive:
In effect, Python can be viewed as a more powerful language from a design productivity and code reuse perspective. Language power is notoriously difficult to objectively evaluate. Paul Graham describes this as the "Blub Paradox" in his "Beating the Averages" essay. Graham's thesis is that an engineer proficient in a less powerful language cannot evaluate the utility of a more powerful language.
Put differently, the existence of the paradigms listed above does not force you to use them. Hence, it's entirely possible to write Python that looks and feels just like C (and use that for justification to dismiss Python altogether!).
Chisel is a domain specific language (DSL) for describing hardware circuits embedded in Scala. By it's very nature, it provides equivalent constructs to Verilog like module
, Input
/Output
, Reg
, etc. Problematically for your question, this causes both the most basic Chisel examples to look exactly like Verilog and also allows people to write Chisel that looks just like Verilog. This is often used as an argument for dismissing Chisel in favor of Verilog. However, this is analogous to making programming language choice based on the structure of "Hello World" examples.
That means that a better question is: "What can I build with Python that is insurmountably hard with C?"
Answering this question requires case studies and is (very quickly) out of the scope of "Hello World" comparisons. Consider building machine learning libraries in C vs. Python, e.g., "How would I build Tensorflow in C?" This would be incredibly difficult due to the abstractions that something like Tensorflow requires.
You can think about similar exemplar comparisons by looking at mature Chisel projects. Two prominent examples are Rocket-Chip and Diplomacy. The former is a generator of arbitrary System-on-Chip (SoC) designs. The latter is used by Rocket Chip to deal with the problem of parameter negotiation---in an arbitrary SoC I'd like to have the parameters of the N
components I'm connecting together to be a function of what I'm connecting (e.g., address widths, internal logic, coherency protocol). Critically, both Rocket-Chip and Diplomacy can be used as libraries (with some difficulty that will be resolved in the future). Concretely, this means that a user is very close to being able to "just import a RISC-V microprocessor" in the same way that they "just import a graph library".
Due to language feature/power coupled with library availability, the real utility metrics become:
For unsupported constructs, like negative edge triggered things and asynchronous resets (both FIRRTL and Chisel now support asynchronous resets), Chisel always provides an escape hatch kludge via Verilog blackboxes. However, all of these are really just features looking for a developer.
Chisel forms part of a Hardware Compiler Framework that looks very much like LLVM applied to hardware generation. The Chisel-to-Verilog process forms part of a multi-stage compiler. The "Chisel stage/front-end" compiles Chisel to a circuit intermediate representation called FIRRTL (Flexible Intermediate Representation for RTL). "FIRRTL stage/mid-end" then optimizes FIRRTL and applies user-custom transformations. Finally the "Verilog stage/back-end" emits Verilog based on the optimized FIRRTL.
While subtle, this compiler structure enables the following things:
From this perspective, the question is closer to "What utility does C++ and LLVM provide over manually written assembly language?"
When discussing compilers, usually the question of Chisel (a hardware construction language) vs. high level synthesis (HLS) comes up. The differentiating factor here is that Chisel is still, fundamentally, a powerful language for describing circuits while HLS is a path for converting programs to circuits.
Summarily, a better way of thinking about this question is, "What does Chisel enable beyond Verilog?" That's a difficult question without a pithy answer and requires comparing the set of programming paradigms both languages provide. Currently, and through my own experience, the best way to tackle this is to do deep dives on mature Chisel code bases and try to use it yourself (and withholding judgment for several months). The difficulty with these approaches is that this takes time. Additionally, the requisite skill sets for reading these code bases and making these types of judgments are not commonly prevalent in hardware engineers. Hardware engineers are usually very proficient with C, but may have never seen (in any depth) object oriented programming, functional programming, or written complex projects exploiting modern software engineering principles. This tends to set up biases where people are looking for reasons to dismiss Chisel (or similar languages) as opposed to reasons to use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With