While I’m only a beginner on chisel, I could share some experience about how I picked up chisel.
So, after the previous email, I got a book about Scala (Scala for the impatient), and read some chapters.
I read those chapters about trait, higher order function, object, pattern matching, collections, and maps.
IMO, these are the most important concept to understand rocket.
Besides getting a book, the website of scala tutorial from twitter might also be useful.
Then, I came to chisel wiki, and read the user guide. That guide is helpful, and after you read the concepts above, you could read the code example easily.
Or you could go to CS250 scala and chisel page on chisel wiki. That’s also a good piece.
After these two steps with some code example, I’m not afraid of chisel code now. It’s really a good language.
So here are some advantages and thought I had when I learn chisel:
Adv 1.No clock or reset at every always_FF
Adv 2.Simpler expression for synchronous circuit: when, reg(next=x).
These are all good. I had to write a lot in verilog for simple circuit that delay for one cycle.
Adv 3. Reuse the library of scala
I mean the ROM table of sin function in chisel-wiki. To make a rom table, I need to use other language, and save the result into a file. Then, I had to use verilog to get the parameter. Now, I could reuse the math library in scala.
However, myHDL could also do that. We could use python libraries. So, it looks like a feature as long as we use popular languages with many libraries.
Adv and Q4. Functional syntax from scala
The map. I could use a.map(b) to connect every element to a function or to a circuit.
I don’t need to write for loop. In verilog, there are a lot for(….) a[i]=b; It’s ugly.
Besides this, is there any reason why chisel adopt functional language like scala? I’m a new comer to functional language, so I’m interested in that.
Adv and Q 5. OO. But systemverilog also got this. So, my first intuition is that an OO+func language is needed, so scala is picked. Then, it comes again, why functional for next gen HDL?
These are the advantages and questions I found for chisel. I know there are more strengths, like more parameterizable. But I haven’t deeply captured this. Maybe I would share it later.
Thank you and any feedback will be appreciated.
Thanks,
Po-wei