Live data from Hacker News

I decided to build a nine-bit computer

madned.substack.com

1–10 of 71 posts

Re: I decided to build a nine-bit computer

#4
post #2

I hope your address bus is three nonads wide (3^3 bits = 128MiB address space). It would be thematically even better if you used ternary logic, but I’m not sure that FPGA can handle more than two voltage levels.

>I’m not sure that FPGA can handle more than two voltage levels

There is a high-Z (high impedance) state you can set I/O pins to for a third state, but no way to detect that high impedance state from the FPGA. It's just used to share an output line with more than one pin. You could make a peripheral that could detect the three states though, with a voltage divider and an analog input.

Re: I decided to build a nine-bit computer

#5
post #2

I hope your address bus is three nonads wide (3^3 bits = 128MiB address space). It would be thematically even better if you used ternary logic, but I’m not sure that FPGA can handle more than two voltage levels.

haha yes, excellent suggestions! I did think about ternary logic actually but I don't know of an FPGA that supports it. I considered creating like a primitive that burns 2 register bits to approximate it even, and just throw away the 4th state and pretend I have 3-state logic on all the layers above. but i have enough on my hands just trying to get the stupid timing working on a simple CPU. Im not actually a CPU designer so I dont really know what I'm doing lol.

Re: I decided to build a nine-bit computer

#6
Regarding the interesting bit (to me) in there about the advantages of FPGAs over an SBC like the Pi (speed)- does anybody know of any blogs or projects where an FPGA's speed helped in a hobby project where software running on an SBC wasn't fast enough? I can imagine a few, mostly real-time projects involving expensive computations (image or pattern recognition maybe?), but I would love to see some concrete examples.

Re: I decided to build a nine-bit computer

#8
post #5
post #2

I hope your address bus is three nonads wide (3^3 bits = 128MiB address space). It would be thematically even better if you used ternary logic, but I’m not sure that FPGA can handle more than two voltage levels.

haha yes, excellent suggestions! I did think about ternary logic actually but I don't know of an FPGA that supports it. I considered creating like a primitive that burns 2 register bits to approximate it even, and just throw away the 4th state and pretend I have 3-state logic on all the layers above. but i have enough on my hands just trying to get the stupid timing working on a simple CPU. Im not actually a CPU desi…

Throwing away 25% of your bits sound wasteful... what you need is a moderately large power of 2 that is very close to a power of 3. These can be found by computing the continued fraction of log(3)/log(2). The sequence of convergents starts thus 2/1, 3/2, 5/3, 8/5, 11/7, 19/12, 46/29, 65/41, 84/53. Some good choices seem to be 2^8-3^5=13 (loses 5%) or 2^46≈3^29 (loses 2.5%).

Re: I decided to build a nine-bit computer

#9

Regarding the interesting bit (to me) in there about the advantages of FPGAs over an SBC like the Pi (speed)- does anybody know of any blogs or projects where an FPGA's speed helped in a hobby project where software running on an SBC wasn't fast enough? I can imagine a few, mostly real-time projects involving expensive computations (image or pattern recognition maybe?), but I would love to see some concrete examples.

RF/radio is one solid application. Can't really do the signal processing fast enough on an SBC.

Re: I decided to build a nine-bit computer

#10
> The answer to why you would still want to build an FPGA system is (and always has been) speed.

> So I quickly gave up on creating something that could only exist on my FPGA board

I've been doing some FGPA stuff and I think that's the wrong way to look at it. Yes FPGAs are often useful when you need raw speed but that's not the only advantage over CPUs. You also get extremely low latency and direct control of IO pins. With software you are limited to the existing hardware peripherals, but with an FPGA you can make your own!

Post reply on HN