Variable Speed Flashing LED

A project log for AUG1 Computer

Developing a new 8 bit computer, in time for Christmas.

James OtsJames Ots 09/28/2021 at 21:350 Comments

I got my AUG1 computer to flash an LED a while back now, but getting it to do anything more complicated has stumped me until today, when I got a couple of PMODs: one with eight LEDs, and another with four slide switches. It's so much easier trying to debug VHDL when you have more than one input and one output. It still took all evening to persuade it to work. I both love and hate working with VHDL. When it works, it's amazing what you can do with it, but when it doesn't work it's a nightmare. I'm still not totally sure which of my changes fixed it, but it now works.

This video shows a flashing red LED which changes speed depending on the binary number input on the switches. And this isn't plain VHDL — it's my AUG1 CPU running a small programme which reads the switch values once per loop and adjusts the loop length accordingly.

It feels slightly backward at this point — when I have all the power of an FPGA which can do thousands of things simultaneously, and I'm configuring it to execute my programme sequentially, using a very badly designed CPU. But it's very satisfying getting it to do that!

I'm not sure what I should work on next. One thing I'd like to do is to get HDMI output working. I've found some VHDL code which successfully displays a test image, so I want to try to combine it with my CPU to output text. Another thing I want to do is to work out how to get a programme into the ZYNQ's ARM processor and how to make that communicate with the FPGA side of it, and then get my CPU to use the on board DRAM instead of using block RAM, so that I can quickly upload new AUG1 programmes without needing to rebuild the entire bitstream, which takes forever. I don't know which of these tasks will be easier — the HDMI task seems hard, but to get the ZYNQ PS working requires reading Xilinx documentation, and that's never a pleasant task.