TTA CPU build (working!)

steve g

New Member
Jul 29, 2019
445
0
0
Yet Another Project Red build guys...and this is quite an interesting one.

I was inspired to build this based on WireWorld....If you don't know what that is, think Conways Game of Life but with a ruleset designed to mimic the properties of electrons running around circuits. a google search will show you images of a strange contraption that is a working computer, with numeric display, registers, clocks, the works. It even has a working program that calculates prime numbers. There's even a few youtubers that have made working, 3d, wireworld sims...in minecraft itself. You gotta see it work, they are amazing.

This build is based exactly on that computer from WireWorld. It's really what's called a TTA cpu, or Triggered Transfer Architecture. In basic english...this type of cpu has only 1 instruction: move data from a source register to a destination register. How does it do anything useful then if all it does is move data around? There are special registers that perform basic operations like add, shift, and/not, if/then/else. Writing to these registers will 'trigger' the operation, and reading them will get the result of that operation. In particular:

reg 0: write updates the display. read = 0
reg 53: read = reg 54 and NOT(reg 53) (some processors call this a bit clear instruction, or BIC)
reg 54: read = reg 53 and NOT(reg 54)
reg 55: read = 0
reg 56: read = if (reg 56 != 0) return reg 55, else return reg 57
reg 57: read = 0
reg 58: read = reg 58 rotate right 1 bit
reg 59: read = reg 59 rotate left 1 bit
reg 60: read/write
reg 61: read = reg 60 + reg 61
reg 62: read = not reg 62
reg 63: program counter, write to branch

and here it is:
CcGZ57Z9IutAegcbLhEMq5kZntvLAlU2uyX_1Wk4M_aQ3XCyYAb_LvGOb1HrRda-kMxp06zmsRPTHg-WOeSdTYe50ZPDJPM1yFC0eW_Y6vL1UR6keq-PMNy0EhnIJl6TU6_5y4UUm3G79cxT5AnaL6dSOtBigEloY3vM2fy0R-huC5q99fCbeWCUqO3vwkN4AQdYXZC5NNstqYtmhSfNGf3FVtSHXpWXTTpydBSKtBs60O6FGxqDwXB7ws1XlpyytHiXQfl18wBc6cq8pUpEIGizKESpfXb0M_ei423BWFrnVbRwsXHf1C7_H9WIyFg6mAnrmaELpHNiprEHR40heF1NKGoghCtRYyOqTyUAB0GoKVaT8mu-4Uifoim91JPqMhGcUg-PZmbZeWhA5Az9vq1MOnuQ8ghlHqav4VuhWfSj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lKnYEVSm2o23iu72N5RyFlgUI_ywSOPMfYxrFs8quIlaNM7kA46j2jcuwxHCrTAtYUIpsnGo7wRDYU8aC0rB7kBteNQfB7Crup8RAJLBd0RwdTwvB1xEUXfG-Xy9FeUy6XHDcG6Wm0lLS9ONcafdK2FEKTNMUVf0V3Lt6JUUfsLKSw0Gzge1ElKnMN6EvgzJKiZqxTZMoziOBm6TQFK6hczSBGHnjx-508AbnTWNNBvO_s1PfwGmpQWTEEQv4br1UAQMzSiOlFK9WE2PGdmubQbOVcboIZREtGVVcL-53udu7G-R1qw1fRLGRGmjbeSyQ1c_dREEq3F-7zLwSBloXPKEfSMPjAd0drXJyQ3qWsgUeCGa3UHYJvhwR1pds4S2QHQ2TvuJZQPMxL3dakcq94g7cY1wAVBNLigsUg74c9TEdFUcs_HrfvdFju8KlJsVLmvEg9spqiG3ToNRz9oPKzGPOeGm4Goz9yS90LEy5LH-nbEcDkIYJPluKuBfJuOIizQhS6M0l8Y7PhNgkERKIR33-9JwTCq9Jw7EcFQ=w1265-h675-no

theres a lot going on here. The main component is that long stack of registers. 64 in all..each 16 bits. They have dual address buses (seen in last image) that control read/writes. On top of the registers is a 16 bit binary to bcd decoder. this uses the double-dabble algorithm, so each ic chip you see in the decoder is a 4bit bin 2 bcd decoder that performs the conversion. See Newomasters youtube vids..he explains the entire thing very nicely. this is just a much more compact (and faster) version of his design.

looking at the other side of the registers, you can see theres stuff going on with the last set of registers, these are the special registers (reg 0 is the farthest in the back of the stack, connected directly to the bcd decider, and 63 is up front where all the control logic is)

in the first image, that mess in front of the registers is the part that handles the opcode fetch/decode/memory transfers. This is really the 'core' of the cpu...there's not much to do in this type of cpu. the closest circuit with the orange wires is a failed attempt at getting the cpu timing to work...i'm using an advanced CC computer (you can just barely see it in the first pic) to handle loading the program and juggling the cpu control lines to make the computer run. it even runs the exact same code that is found at https://www.quinapalus.com/wi-index.html. go to the last page and you'll see the opcodes that runs on the wireworld computer...the same program runs on this build! (I did have to tweak the negative constants. The WW computer does 1's compliment math while this build does 2's compliment. The difference is how negative values are represented in binary)

this build is also the first success I've had using many PR ic chips. there are quite a few of them, 13 different ics in all. the registers use at least 2 chips per register, plus the extra chips for the special operations. the bcd decoder has almost 40 ics. all the blueprints are tucked away in a chest so once i post the download, you can play with them and do cool stuff ;)

ive had the computer run for 5 minutes and it does find primes from 2 up to 17. it runs about 1 op per second...not too bad at all ;) I'd let it run more but it takes longer as the number gets higher. I did a simulation in c# and it takes over 50mil cycles to start seeing primes in the 20000 range. ill post a download shortly, still trying to sort out the timing circuit.
 
Last edited: