Learn Verilog In Your Browser

We are big fans of tools in the browser for education. You have a consistent environment maintained by someone else, you don’t have to install anything, and you can work from any computer you happen to find yourself. The HDLBits site has a great set of Verilog “exams” that would be a big help to anyone trying to learn or brush up on their Verilog skills.

The site offers a range of topics that go from the silly (output a constant 1 or 0) to full-blown state machines and testbenches. The site isn’t tutorial in nature, instead it offers a problem, an optional hint, and an editing window with some code already in place. You add your code and hit submit. Behind the scenes, the site runs Intel Quartus and Modelsim to test your work. It will either show you the results or tell you that you failed.

We’ve been big fans of EDA Playground which offers a nice environment for experimenting with FPGA code, but it doesn’t challenge you the way this does with a series of progressively more difficult exercises, either. Of course, that’s still a great tool if you want to experiment with your own designs. If you prefer, the HDLBits site will let you do a simple simulation using Icarus, but it isn’t nearly as full-featured as EDA Playground.

If you are adept at Verilog, you are able to jump to any of the exercises that interest you. Some of the later ones do sort of build on each other, but you can always backtrack if you get in trouble. If you like stats or competition, the site offers statistics on how many users have attempted each problem and their success rate. There’s also a user ranking board that rolls every six months. The top of that board, [wg250785453] solved 178 of the problems, which we think may be all of them.

The site is part of a family of sites. There’s also ASMBits which is the same sort of thing for Nios II or ARMv7 assembly language. You can also find a generic simulator and debugger for Nios II, ARMv7, and MIPS32 at their cpulator site.

This is a great time to be working with FPGAs. We are hopeful that the new FPGA-bearing Arduino will eventually give us full access to its internals and then we should really see some momentum building.

13 thoughts on “Learn Verilog In Your Browser

        1. I disagree. It’s NOT a fair point (in my opinion).

          Compiling is nothing like synthesis. Compiling is simply converting one set of abstract primitives to another set of abstract primitives.

          Synthesis is converting and abstract language (VHDL/Veralog) into the very primitives of logic in it’s simplest form. Like reducing a complex Math equation to it simplest form. The end result is a precise fundamental definition in the laws of logic.

          1. Not if compiled to be run by a processor – which is why it’s a fair point. There is a translation from the language to a set of instructions (compilation) that will produce the signals a (parallel) synthesized version would do.

          2. It is in this case because we are talking about GHDL. GHDL takes your VHDL and generates code for LLVM/gcc/etc. and compiles it into an executable for simulation.

            Also it’s Ver*i*log.

  1. “We are big fans of tools in the browser for education. You have a consistent environment maintained by someone else, you don’t have to install anything, and you can work from any computer you happen to find yourself.”

    Clouds are good for something.

  2. “You have a consistent environment maintained by someone else”
    true

    “you don’t have to install anything”
    more or less true, example: codebender plug-in to program arduino

    “and you can work from any computer you happen to find yourself”
    totally false. It feels like we´re on the old days of netscape/IE fight. Some sites work with chrome, some not, or more or less, or one has to update, or the newest version is not compatible, or the os/browser combination is not supported.
    Sometimes i end up winding a VM with the desired OS and browser with the desired version just to have compatibility with a particular cloud app. We are far far far from a standardized environment. I wish we´d kill HTML, JS, CSS altogether sometimes …

Leave a Reply to Augu5teCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.