The Art of FPGAs: MIX-FPGA

A quick look at Michael Schröder's FPGA-based implementation of Don Knuth's original MIX computer architecture.

Whitney Knitter
4 years agoFPGAs / Retro Tech

In this day and age of recreating CPU structures on FPGA hardware, developer Michael Schröder decided that there needed to be a version of Don Knuth's original computer, MIX/the 1009, on an FPGA.

For those not familiar, Don Knuth is the author of The Art of Computer Programming where he describes in detail the structure of his hypothetical computer that he refers to as "the world's first polyunsaturated computer". Polyunsaturated is a term used in chemistry to describe a fat or oil molecule containing many double or triple bonds between carbon atoms within its structure. Polyunsaturated fats are considered to be healthier than saturated fats, thus one can assume Knuth considers his computer structure to be a healthy knowledge for his readers to consume with this phrase.

The MIX has since been updated by Knuth to the MMIX, but still contains the core principle that its retains the property of being both binary and decimal at the same time. This means that it can calculate arithmetic in both base 2 and base 10. Knuth originally developed MIX in the 1960s/1970s due to how computer programming languages were so tightly tied to the hardware at the time. MIX made it possible to understand the low level concepts common to all computers without tying a reader to a specific machine from any company.

Schröder's FPGA emulation of the original MIX is so far only a binary version based on Olimex's iCE40HX8K-EVB FPGA development board. It was a strategic choice in that the IDE for the iCE40 FPGA family from Lattice Semiconductor is completely free and open source. Other than the iCE40 FPGA, the hardware for this MIX computer only contains an USB serial adapter.

With a fabric clock running at 25MHz, this translates the previous 1us unit of time to 40ns, making it a high priced machine according to Knuth's original standards for MIX. It takes in all I/O as ASCII characters over the UART in streams. These UART streams are passed through a state machine that translates each ASCII character to its corresponding character codes in MIX.

So far, Schröder's implementation of MIX can execute all commands from Knuth's original MIX standard aside from those for floating point arithmetic. A convenient "Go" button is placed at the top of the enclosure connected to an I/O on the USB-UART which triggers the FPGA to look for new MIX programs to be uploaded to it via "punched cards" coming over the UART.

And BONUS, since this version of MIX is a real implementation on hardware and not just an emulation/simulation, it is capable of driving actual hardware such as LEDs. Which Schröder demonstrated with a simple traffic light MIX program setup using LEDs on a perf board.

While this version of MIX is a fun project, I can see it being very useful for someone reading through Knuth's writings in The Art of Computer Programming to have a physical implementation to test out various concepts.

Whitney Knitter
All thoughts/opinions are my own and do not reflect those of any company/entity I currently/previously associate with.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles