Build a RISC-V CPU from scratch
spectrum.ieee.org
spectrum.ieee.org
I wonder what the theoretical limits to performance and usability of a 74xxx computer is. Email and chat should be possible as they were on 74xxx machines in the past, maybe even Gopher-style web browsing. But it's a hard sell when everyone's hooked on HD or even 4K video streaming.
https://electronics.stackexchange.com/questions/260477/why-d...
https://archive.org/details/bitsavers_decpdp1111eb70_6917800
Use someone's riscv soc: can you trust that company?
Use custom asic: do you trust the fab?
Use fpga: do you trust fpga vendor?
Use 74xx & SRAM: can be backdoor-ed too. Also provably Van Eck all the way to Fort Mede.
Use transistors: probably safe but will you finish that project in this lifetime ?
Not to mention that the compiler, synthesiser and all that software can be backdoor-ed too.
It's true that the battle can't be won, but that means it's a war of attrition. Backdooring 74xx chips would be very inconvenient and expensive compared to just pushing some code into the Intel ME or AMD PSP. The flip side of that is that building and using a 74xx computer is going to be just as inconvenient and expensive for the user. So this is more of a fun thought experiment than a serious solution.
But practically, the limits of a 74xx series in creating a 'modern feature' (like, 32-bit) CPU are manifold. Assuming DIP chips, it would pack an average of 4 logic gates in about 1 sq inch (hand-waving a bit, and including board space). A Cortex-M0 has approx 12,000 gates [1]. So it would be huge. Assuming LS logic, each chip would draw about 4.5mA peak, so about 13.5 amps peak. So it would use a lot of power. Propagation delay (maybe 10ns per gate in LS) means it will be much slower than integrated logic...perhaps a couple of orders of magnitude slower than an M0.
There are mitigations. You could use SMT packages and pack more on a board. You could use a more power-efficient logic family than LS (e.g. ALVT or some CMOS family). Or go for faster logic at the cost of power. But you're never going to get within an order of magnitude or 3 of the speed+efficiencies of a monolithic chip.
There are a number of homebrew TTL CPUs out there for comparison. Most are 4- or 8-bit.
[1] https://www.electronicsweekly.com/news/products/micros/arms-...
Now I know how to market it! "You're not doing real microservices unless you do it on the gate level!"
But it's cool that you have a working VAX. I've been wanting some kind of minicomputer for a long time, but if I could find a complete one I probably couldn't justify the cost.
That's actually an impressively low number of 74xxx chips given that it's a "real" 32 bit CPU. Ben Eater's "8 bit CPU from TTL" kit has ~43 74xxx chips.
They eventually boiled it down to a couple of ASICs so you had a VAX on a single card.
But to be fair, the VAX implemented a vast amount of stuff that you wouldn't if you were designing your own TTL CPU.
The tradeoffs are very different: with a giant look up table, you can encode any operation with the device. The problem is the rather huge amount of memory you need (with two 8-bit inputs and one 8-bits outputs you need 64KiB of internal memory to account for all possible inputs). With a PAL/GAL like the ATF22V10, you are fairly limited (your operation must be expressible in normal form, and it will have a limited number of terms), but the number of fuses (or memory cells) required to encode this are much, much lower.
Personally, I feel like using actual memory to encode behaviour is a bit "cheating" (that's just my own aesthetics). I would totally do this for actual micro-code, but for an ALU this seems wasteful.
[1]: https://ww1.microchip.com/downloads/en/DeviceDoc/doc0735.pdf
Modern FPGAs (and IIRC even many CPLDs, as the line got somewhat blurred) are usually implemented as array of LUTs implemented as normal memory with fixed address decode and not with this PLA/PAL/GAL trick. Hence, "programmable logic is just bunch of ROMs".
Of interesting historical note is Connection Machine, which while marketed as "computer", is essentially an FPGA stood on it's head. Each of the thousands of CPUs is in essence FPGA LUT block, whose configuration changes for each microinstruction, while routing is fixed.
Most fpgas contain mini async srams used as LUTs. It's very different from using one giant LUT, which is what abusing memory chips is all about.
The LUTs we find if FPGAs are very small, often with as little as 6 input bits. Because the size of the LUT grows exponentially with the number of inputs, there's a natural sweet spot: two few inputs, and the LUT isn't powerful enough. Too many, and the LUT is too bloated.
Using a 64K ROM to encode a 16-bit LUT definitely leans in towards "way too bloated" for me.
Is the book worth a read even if one read the other (and older) edition of the Patterson book? Can I sufficently learn RISC-V from it, or is it used as mere "reference" architecture?
FWIW I think H&P books are extremely important references but basically rubbish pedagogically.