The Gray-1, a homebrew CPU exclusively composed of memory
2x-1.net
2x-1.net
The assignment was to build a traffic light simulator, set the whole thing running, change the traffic lights as a result of switch inputs acting as sensors and a simulated interval timer.
Some students were baffled by this (lectures hadn't caught up with lab assignments at that point): how could you build a small processor using only logic and an EPROM? There's no memory or registers to keep state!
This is what differentiates combinatorial logic from sequential logic: feedback. Use some of the EPROM's data outputs along with logic gates and switch outputs (using the multiplexers / demultplexers) as address inputs to the same EPROM.
Sweet memories of solving Karnaugh maps, Quine-McCluskey minimization, logic hazard mitigation, etc. Good times.
For the final project we had to implement a multiplier (booths algorithm) using nothing except breadboards, wires, and a few very basic ICs that had Ands nors etc.
I loved that class and it really helped me understand how a processor actually works.
[1]https://68.media.tumblr.com/46f8f8a9ffd3f4bf900e1710c4e08fd0...
You misremember ;)
I took a similar class, and like for everybody else I ever talked to, half of the wires were somewhat broken and caused intermittent connections. Solving the puzzle of building the system was fun, and quickly done - finding the &#(@ broken cables and replacing them was weeks of tedium.
I suppose in a way it was perfect preparation for a career in software engineering. Solve the core problem, and then spend significantly more time on actually making it work in a world the adamantly refuses to be pure and perfect.
haha, I'm remembering how I felt like I was getting away with murder because I took 4 courses in college that spent time covering truth tables and complex boolean statements, and 3 of those taught Quine-McCluskey. I felt like an adult visiting an elementary school. (briefly, until we finished that chapter)
Analogue is the hard part for me, I guess you didn't do so much of that in digital systems engineering.
Homebuilt CPUs webring's home: http://members.iinet.net.au/~daveb/simplex/ringhome.html.
There's quite a few awesome projects in the ring!
Edit: Should also add that there were commercial products built like this in the 80-90's.
Also, FPGAs have real registers. This project is sort of faking registers in some places by wiring output to input in some ROMs. (Which is a clever idea, but flaky and eats a lot of space in the ROM.)
So these are reducers in algo talk? What about mapping more than 1 bit at a time? Chaining?
[1]: http://www-inst.eecs.berkeley.edu/~cs294-59/fa10/resources/A...
(yeah I'm being a bit pedantic but FPGAs are pretty monolithic these days and contain stuff like registers, block ram and DSPs).
Related: mov is Turing-complete [1] and X86 MMU fault handling is Turing-complete [2]
edit: formatting
All general computation needs either a direct or convoluted means of achieving conditions too. A tricky formula exploiting abs(x) could be used to produce {0, 1} but...
So is it true? Are logic and memory fundamentally equivalent?
>"Static RAM, OTOH, (registers and fast cache) is built out of flip-flops. It has feedback so it doesn't need refreshing and it's fast"
DRAM also has feedback no? I mean thats what differentiates is from combinatorial circuits correct?
I understand SRAM is flip flops vs single bit transistors. I guess I'm not sure why you are saying it has feedback to differentiate SRAM(registers) from DRAM.
Logic functions can be composed using any one of: NAND, NOR, XOR, IMPLY, or other units like full-adders etc.
All memory depends on some form of persistance and/or refreshing.
Sometimes this is a physical phenomenon like magnetism or electrical compatence or after-glow in a willian's tube. Short-lived effects need to be refreshed.
Sometimes there is a feedback loop that continuously sustains latching, such as flip-flops.
Magnetic core memory could be less transient than say, a mercury delay line, but needed to be rewriten after being read.
But regarding your question, I think so. If it is possible to impliment one with the other (but memory usually has internal indexing).
It wasn't done this way then and isn't done this way now not because it's impossible (or even that hard), it's because it usually doesn't make sense compared to the alternatives. It's slow and burns a comparatively large amount of resources.
That said, the project is interesting precisely for the reasons that it renders these lessons concrete, and apparently was fun to implement.
...now back to my Minecraft RISC-V....
Assuming you weren't joking, how sophisticated is your design? (as in, "is it pipelined?")
I've made a few simple microcontrollers and microsequencers in Minecraft (as 'micro' as you can get with a 1M feature-size) and I've often fantasized about bigger projects, but it's only been fantasy.
Still, it lends itself reasonably well to old NMOS-style layouts...
It isn't very sophisticated, but the project I mentioned above might satisfy some of your curiosity: https://hackaday.io/project/18859-risk-vee / https://github.com/cadpnq/risk-vee
My methodology was to define each microinstruction that made up every instruction (such as "move pc to memory address register"). I then took all of the control lines in my design and assigned them a bit position in the control store. From there it was just a matter of defining each control line symbolically and "assembling" each microinstruction by ORing the appropriate things together.
Can you elaborate on this? From there it was just a matter of defining each control line symbolically and "assembling" each microinstruction by ORing the appropriate things together"?
This is basically your decoder then?
risk-vee is a really basic (read: dumb) "common bus" design. All of the internal components of the CPU share the same 32-bit data bus. The heart of the control unit is a ROM that is 32-bits wide. Each bit is connected to one of the various things in the CPU. To make generating the microcode easier I defined a mask for each line.
Taking "move the PC to the memory address register" as an example: The register that holds the PC has an output enable line, and the memory address register has select/enable and both would need to be high. Pulling a few lines from microcode.js:
pc_read = parseBin("0000-0000 0000-0000 0000-0000 0100-0000");
mem_address_write = parseBin("0000-0000 0000-1000 0000-0000 0000-0000");
So the microinstruction we want ends up being pc_read | mem_address_write
I feel like I'm simultaneously under- and over-explaining it.