Chisel as (almost) first hardware language

100 views
Skip to first unread message

Martin Schoeberl

unread,
Jul 15, 2019, 3:42:02 PM7/15/19
to chisel...@googlegroups.com
Hi all,

I play with the idea of switching a digital electronics (DE) 2 course from VHDL to Chisel, and would be happy to get some comments or opinions from you.

DE 1 will be done with just very minimal VHDL in the first semester of a Bachelor (not under my control). DE 2 is in the second semester, and this is the first semester they learn basic programming in Java. For this programming course they use Eclipse installed by themselves. Most students use a Windows box and are not able to run anything from the command line.

How to approach this type of students with the Chisel environment?

I tried (not very hard) to get Chisel setup in Eclipse with just linking Chisel and Firrtl jars, but there are more dependencies resolved by the Maven/sbt magic.

Cheers,
Martin


Message has been deleted

Richard Lin

unread,
Jul 15, 2019, 4:35:20 PM7/15/19
to chisel...@googlegroups.com, Martin Schoeberl

Hi Martin,

I've brought up the idea about teaching Chisel for EECS151 (intro to digital design) at Berkeley, and here are the main high-level considerations:
- Not offering Verilog at all (only teach Chisel) would probably be a disservice to students, since Verilog is still the industry standard and required to get hired. The same is probably true of VHDL for you?
- However, offering Chisel as an option (for more advanced students, or those not solely interested in a career as a Verilog monkey) seems feasible, as long as you have the course materials and staff expertise.
- Good programming experience is helpful to being productive in Chisel with generators, and the way we use Scala is probably different than an introductory approach to Java. But one can pattern-match and use Chisel as simply Verilog++. This has the benefit of avoiding some pitfalls in Verilog, like the dreaded latch inference.

As for IDEs, my experience has been:
- I used Eclipse with Scala a while ago. It was ... functional, but never great. Importing from sbt required an external plugin (if it worked at all), dependencies were a mess, and it tended to be pretty slow.
- I think all of the Chisel users at Berkeley that uses IDEs use IntelliJ. The community edition (free) has Scala support and it integrates pretty well with Chisel and is performant. It's able to automatically read in sbt files, though there's potential weirdness if you're building Chisel / FIRRTL (publishLocal) from source.
- I use Chisel on Windows, but it's still heavily command-line (sbt console - really mostly test and run) driven. I think in IntelliJ you could run unit tests from the GUI. In any case, you would be limited to running with treadle as the simulator, since Verilator doesn't (or at least didn't) have good native support for Windows - or you would have to be running within an environment like Cygwin or WSL. This also means you can't run the chisel3 unit test suite (which can't target treadle), but you can run tests written in IOTesters and testers2.

Thanks,
 - Richard


On 7/15/2019 12:46 PM, 高野茂幸 wrote:
Hi

-Chisel of difference from Java
-Chisel of difference from HDL

These two points are minimum requirement.
And excersizing to check the differences might be effective for first.

Best,
S.Takano

--
You received this message because you are subscribed to the Google Groups "chisel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chisel-users...@googlegroups.com.
To post to this group, send email to chisel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/0B3D5E87-3507-447B-A08D-BCC6EAC9D8EA%40jopdesign.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "chisel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chisel-users...@googlegroups.com.
To post to this group, send email to chisel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/CAOivKKLnV%2BiDkv9YsxxQE26ZXzMyc%3DgDtaA2Tu-LL_6_vDWzew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Martin Schoeberl

unread,
Jul 15, 2019, 5:21:51 PM7/15/19
to chisel...@googlegroups.com
Hi Richard,

thanks for your detailed answer.

Learning Verilog/VHDL at a university to know the right “tools” for an industry job is in my opinion not a good approach. One should learn newer, advanced stuff. One can always later pickup a more conservative language. However, I am expecting some troubles here as well when I switch. Offering VHDL and Chisel as options in a second semester class is probably to confusing (and too much work on my side).

I can only use basic and simple constructs as there is no programming experience. So, yes to use Chisel as a help to avoid latches and to have a nicer syntax. I can do more advanced Chisel then in my master course where I already introduce Chisel, but have it optional.

Yes, I failed today with Eclipse (even with the plugin). IntelliJ is probably the way to go. But it still requires that I provide some project setup (build.sbt) and it works only when you organize the source in src/main/scala. But I’m still getting sometimes “class not found” issues when trying to run a Scala App.

I am fine with treadle under Windows. Those hardware designs are VERY small. And we actually target very quickly FPGAs, so code generation and then using Vivado is the main path in the course.

However, I probably need to provide quite some (simple) sample projects for the basics. For the simple starting example we use https://www.edaplayground.com/ last year. This is a solution with a very easy entry. Nothing to install at all. Would be cool if they could add Chisel support ;-)

Maybe I should also use jupyter...

Cheers,
Martin

Øyvind Harboe

unread,
Jul 16, 2019, 4:44:38 AM7/16/19
to chisel-users
I have been using Eclipse forever(since 2006, I think).

I am now advicing against it and I strongly suggest you look at Visual Studio Code, especially for beginners: much easier to set up, faster and fewer niggling bugs.

Look at the Scala Metals plugin.

jjb vhc

unread,
Jul 22, 2019, 11:18:56 AM7/22/19
to chisel-users
Hi Martin

I've just come across this paper about some experiments done by PyRTL guys on undergraduate students, it might give you some other points of view:

Bests,

John

Sanjay Mehta

unread,
Jul 23, 2019, 1:21:45 AM7/23/19
to chisel-users
Another vote for VS Code, despite my initial reservations against anything from MSFT. It's surprisingly brisk and light-weight
compared to even Atom. We use it primarily for Elixir and Erlang but there are plugins for almost everything.


/sm
Reply all
Reply to author
Forward
0 new messages