3 ms·
Building the TD4 4-Bit CPU
- mraadikhokhar 5mo ago[dead]
- NooneAtAll3 5mo agowhere can I find the full list of instructions?
- cpldcpu 5mo agoFrom the blog post: https://github.com/wuxx/TD4-4BIT-CPU https://github.com/wuxx/TD4-4BIT-CPU
- drzaiusx11 5mo agohttps://github.com/dilshan/td4-assembler#supported-instructions https://github.com/dilshan/td4-assembler#supported-instructi...
- signa11 5mo agoit would be remiss to not mention the most excellent ben-eater's 8bit-computer https://eater.net/8bit https://eater.net/8bit and ofcourse the nand-to-tetris book + resources (https://www.nand2tetris.org/ https://www.nand2tetris.org/)
- cpldcpu 5mo agoBut why is this always the first comment on custom CPU builds? Can't there also be other designs out there?
- signa11 5mo agoi look forward to other resources as accessible to those pointed out. by all means, go for it.
- kjs3 5mo agoNoone ever mentions this one, but I always found it pretty cool: https://www.donnamaie.com/AMD_2900.html https://www.donnamaie.com/AMD_2900.html
- phire 5mo agoBecause they are both well-known and really well documented in a way that's easy for beginners.
- NooneAtAll3 5mo agoI've been following this series for a while: https://www.youtube.com/playlist?list=PLyR4neQXqQo5nPdEiMbaEJxWiy_UuyNN4 https://www.youtube.com/playlist?list=PLyR4neQXqQo5nPdEiMbaE...
- cpldcpu 5mo agoNice!
- drzaiusx11 5mo agoI love this 4bit "isa" with 12 simple instructions. It makes me want to dig out my old 74x chips from storage and make one. That said, thank God for FireFox Reader mode, on mobile at least the add popups make this excellent blog post unreadable..
- drzaiusx11 5mo agoUpdate: I broke down and bought the PDF version, now I need to brush up on my Japanese again. Should be a fun project over the coming rainy days..
- drzaiusx11 5mo agoUpdate #2 Ok now I cheated and had Claude translate the entire book into English. It even translated the manga images with hand written hiragana/katana in speech bubbles (using comic sans) plus all the diagrams! I decided to not take on too much in one go, so having the English text takes a lot of variables out of the equation for me since my Japanese is very rusty after not using it for 20 years..
- SoftTalker 5mo agoThese little projects are such a good way to illustrate principles in a concrete way, even if they aren't "useful" in any other regard. Back in 1983 or so, I had a TI/99 computer and found a BASIC program called "PicoProcessor" in one of the home computing magazines. It emulated a 4-bit microprocessor. It only had a handful of instructions, 16 bytes of memory, and a couple of registers but it was enough to illustrate the concepts of how a processor runs machine code, in a way that was much more understandable than just reading about it. Could I write any useful programs with it? No. But could I see how a CPU adds two numbers? Yes. And that was enough of an introduction that assembly language was suddenly not so mysterious.
- Lerc 5mo agoMaking a 74 series CPU is on my infinite to-do list. Last time I tried I ended up getting sidetracked by making a tool to help me. https://fingswotidun.com/PerfBoard/ https://fingswotidun.com/PerfBoard/ But at least that's made the job of building a nice compact ALU module much easier. (One of the test boards in the app shows it)
- philzook 5mo agoIt's a really neat board. You can get kits from aliexpress etc. I wrote up some notes here https://www.philipzucker.com/td4-4bit-cpu/ https://www.philipzucker.com/td4-4bit-cpu/ . English descriptions are not so readily available. I also had some fun modelling the chips in verilog and model checking a verilog interpreter against them. https://www.philipzucker.com/td4_ebmc/ https://www.philipzucker.com/td4_ebmc/ George Rennie got a similar thing working using the yosys toolchain https://github.com/georgerennie/philip_zucker_sby_demo https://github.com/georgerennie/philip_zucker_sby_demo
- NooneAtAll3 5mo agoHuh, so its isa is just "Dst := Src+Imm", with Dst one of [A,B,Out,PC] and Src one of [A,B,In,Zero] Plus just a tiny bit of logic that wires in "Carry Flag" when Src=Zero to control Dst=PC I guess "MOV A,B" sets Imm to zero for simplicity, because I don't see anything stopping it
- drzaiusx11 5mo agoI just translated the entire book into English via multimodal LLM, which with my (rusty) Japanese language knowledge looks largely correct (including diagrams and manga text.) I'm not sure of the legal ramifications of this but if anyone shows me their original PDF receipt from the Japanese publisher's website I'd be willing to share it under the conditions you don't publish or share it anywhere publicly...
- drzaiusx11 5mo agoMy contact info is just my user name here + the common Google provided domain name