A Homebrew GPU for a Homebrew CPU

In this video I design and create a hardware accelerator for integer multiplication on the TTL CPU computer call the Minimal 64x4, designed by ‪@slu467‬ . This multiplication accelerator is used to speed up rendering the Mandelbrot set on the Minimal 64x4.

GitHub repository for project: https://github.com/michaelkamprath/mi…

The Minimal 64x4 Home computer: https://github.com/slu4coder/Minimal-…

=== Title Controversy ===

To everyone who have issues with the title, I realize most consumer experience with something called a “GPU” is the graphics card they use to get their frame rate up, but realize there are other things called “GPU” in this world too. Most GPUs I deal with professionally do not have a video out, and are not used for gaming. Instead, they are used for mathematical calculations. Admittedly I did not consider how most people would interpret the term, I just drew from my own experience on this matter. With that said, to me the real critique as to why this is not a GPU (even as I view them) is that it cannot compute independent of the host CPU. As I said in the video, it’s more akin to a math coprocessor because of that.

This article explains uses for GPUs other than gaming: https://en.wikipedia.org/wiki/General…

=== NOTE ===
I am all out of Minimal 64x4 PCBs so no more are available for the give away.

=== Errata ===
I made a rather significant error in this video when analyzing the propagation delay of the combinational logic (thanks to ‪@wawa1474‬ for pointing it out). Basically, I was only considering the propagation delay of the carry through the high nibbles of each adder stage, and I failed to consider the transitive propagation delay caused by one bit from one stage’s high nibble adder is actually routed through the next stage’s low nibble adder, thus impacting the time of that next stage’s low nibble adder to stabilize it’s carry. Furthermore, I only. considered the C_IN to C_OUT delay, and not the delay from individual addends to the result, which can vary based on the bit (e.g, C_IN to S3 is actually 22 ns, longer than C_IN to C_OUT, something I ignored in the video, but it’s ultimately not relevant for most of the longest path). When properly accounting for this, the longest propagation path from the low nibble of one stage to the high nibble of the next stage is actually the C_OUT to C_IN of the first stage low to nibble (20 ns on first stage due to An+Bn) to C_OUT timing) to the S0 to A3 of the first stage high nibble to the next stage low nibble is driven by the C_IN to S0 timing (13 ns), to the C_OUT to C_IN between the next stage’s low to high nibble is driven by the A3 to C_OUT timing (20 ns as A3 inout is last to settle). This pattern is then repeated through all the stages, and then on the last stage, the final answer isn’t settled until the last stage’s high nibble C_IN to S3 path requiring 22 ns. All together, the adder array requires 182 ns to settle, and in turn, the total propagation delay of the card up to but not including the 74AHCT245 bus transceivers is 171.8 ns, our about 10 ns longer than what I described in the video. The net effect is that this is still within 2 CPU clock cycles of the Minimal 64x4.

Also, at 25:09 I verbally state the multiplication being done on the 4-bit adder is “10 times 4”, it is actually “10 times 8”, with the result being 80. The circuit is correct, my verbal description is in error.

=== Chapters ===
00:00 Intro: Minimal 64x4 overview + “can we make it faster?”
01:03 Video goal: multiplication (software → hardware)
02:18 Long-form multiplication
05:59 Software multiplication assembly code
13:33 Mandelbrot demo program setup
17:03 Software multiply Mandelbrot timing
18:16 Hardware multiplication concepts
22:04 Breadboard 4-bit multiplier demo
25:38 Full 8-bit multiplier card schematic
32:08 Using 8-bit card to do 16×16 multiply
36:12 Hardware-accelerated multiplication assembly code
40:21 Fully built board + assembly process
43:13 Hardware multiply Mandelbrot timing
44:41 Wrap-up + PCB giveaway

=== Credits ===
Thanks to ‪@slu467‬ for graciously allowing me to use a clip of his video