As a continuation of FPGA VHDL Implementation of Ben Eater's 8-bit CPU - Progress Update, here's another update on my 8-bit CPU in VHDL project.
I have the core functionality working!
I can now add two numbers. I know... don't get too excited. :) But honestly, I'm pretty stoked to have gotten this all working. Here's a quick video showing my current FPGA implementation of Ben's 8-bit CPU (up through his CPU reset video).
While the code I have built so far is quite rough and will need some improvement, what I used in the video can be accessed on my GitHub; I added a new FPGA repository.
Next Steps
I plan to add the rest of the CPU instructions used in Ben's videos (e.g., subtract and jump). I also plan to clean up the code (e.g., consistency in formatting, code commenting, and performance improvement). If I get energetic, I might re-open a Windows interface I wrote for my breadboard 8-bit CPU and see if I can make it work with this FPGA solution; uploading RAM values would be handy.
![Winforms application for breadboard 8-bit CPU](https://static.wixstatic.com/media/66a162_b7fbdc5cda23481b9c56e52fcb393aac~mv2.jpg/v1/fill/w_147,h_83,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/66a162_b7fbdc5cda23481b9c56e52fcb393aac~mv2.jpg)
As a reminder, I am very new to FPGA solution development. If you have suggestions on how to improve what I have built so far, please let me know!
Postscript
Here are some images of the FPGA implementation. Crazy...
PPS
I have added support for CPU instructions SUB, STA, LDI, and JMP. The following video demonstrates Ben's "add 3 and JMP" program from Adding more machine language instructions to the CPU.
Here is the current block design:
![Updated Block Design](https://static.wixstatic.com/media/66a162_b3c958daa59c40aa90215bdb950f8cd7~mv2.png/v1/fill/w_49,h_27,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/66a162_b3c958daa59c40aa90215bdb950f8cd7~mv2.png)
Code has been posted here. Next: implement JC and JZ instructions.
PPPS
I added support for the final instructions from Ben's video series: JC and JZ conditional jumps. The following video shows a program from Ben's Conditional jump instructions video.
![Current Block Design](https://static.wixstatic.com/media/66a162_669d43172f8e4c2a8374eef45244c633~mv2.png/v1/fill/w_49,h_34,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/66a162_669d43172f8e4c2a8374eef45244c633~mv2.png)
Code has been posted here.
**In the last video, the flag bits were not being displayed correctly on the OLED display (but were being processed correctly). This has been fixed.