Monday, March 25, 2024

HDL Challenge

It's like a game and college-level study at the same time.

Last week, I started a new series of live videos on my YouTube channel, Xcoder Videos, called "HDL Challenge." HDL is an abbreviation for "Hardware Descriptive Language," so these videos are all about designing and specifying electronic hardware in HDL.

The preceding video is the first live video of the HDL Challenge recorded on March 22, 2024. We started on Friday, but the live videos have been rescheduled to Thursday evenings at 7:00 p.m. If you view the video on YouTube, I have links in the description for various resources viewers will need to accept the challenge. (Or, you can use the links at the end of this post to find most of the same resources.)

I got the idea for these videos from a Steam program called Microhard. In Microhard, you become an electronics hardware engineer for the company (also named "Microhard"), design hardware circuits with the company's own version of HDL, and simulate your designs to verify that they work as specified by those for whom you work. Eventually, you are tasked to design a computer CPU after designing about twenty or more components.

And that's where Microhard stops. I think the program author intended to enhance the program or write another program that would take the work from this stage and go on to build a complete and functioning computer, but that idea has fallen by the wayside.

My HDL Challenge videos correct that. Since Microhard does not include a sandbox mode allowing users to build and test components other than those specified within the program, I needed to find other software to fulfill that task.

One option would be to use a program called "Digital," which allows users to design and simulate electronic components graphically rather than in HDL. Digital is a great application and will be helpful in my series of videos, but I've found a better option.

An Implication Gate
within the Digital Application

I read that Microhard was loosely based on a class by Shimon Schocken and Noam Nisan, so I looked around on the internet and found a course at Coursera.org called "Build a Modern Computer from First Principles: From Nand to Tetris" by both of those men. Looking over that class revealed that it is indeed the basis for Microhard. However, Nand to Tetris is much more involved and, therefore, more challenging than that which Microhard presents.

Mr. Schocken and Mr. Nisan make software available to design and test logic gates for students and anyone else who desires to do the same. And that software is freely available on the internet.

For example, their software includes over thirty logic gate specifications in HDL stub files that users can modify to design the parts needed to build a computer. These specifications are in text files named for the gates they are supposed to implement, ending with the "hdl" extension.

They provide one or more test files for each HDL file that can be used to test the new designs in a hardware simulator, which is also freely offered. Over sixty of these test files are in their Nand to Tetris package.

The Hardware Simulator is one of several applications they make available.

With it, users can test their designs by running scripts described above or interactively by changing inputs to a component by hand and observing how the logic gate behaves. This is just what we need for the HDL Challenge.

If you would like to accept our challenge and build your own computer in software, mark your calendar for each Thursday evening at 7:00 Central Time for the next several weeks. Completing the challenge will take about thirteen weeks or more.

Also, download the software you will need to complete the challenge. Here are links to some of the things you might want.

HDL Challenge Resources