by jonnycomputer · 5y ago · 0 comments
In my computer science program, we had an old school prof who insisted we build a virtual CPU using only fundamental components. No VHDL for us! We wanted a JK flip flop? Here are the logic gates. Wire them up baby. The only thing that came for free were the logic gates, a clock, and probes. Some students complained about it; and I get it, it was a very old-school way of doing things. But I can say that I intimately understood my 5-staged pipeline CPU, because I designed it from the ground up, and spent hours wiring every component. I also had plenty of time cursing myself for some stupid design decisions I made along the way. The only thing that might have made it better if we were tasked with actually building it out in actual hardware. I'm a fan of those homebrew cpu's out there. Maybe not practical from computing perspective any more, but sooo cool.
Week 1-2: construct your own standard library of logic cells (I.e. design the layout of the not gates, nand gates, etc).
Week 3-4: compose these std cells into latches and flip flops.
Week 5-6: verilog implementation of your cpu. Used primarily as a model.
Week 7-10: lay out your CPU. Everything from the register file to the ALU. Placed and routed by hand.
Week 11: SAPR the instruction decoder/control logic and then integrate it into your custom layout. Ok so you can’t brag about your layout being 100% custom anymore, but you learned more by doing it this way :P
Week 12: write an assembler; compile a simple assembly program.
Week 13-14: run it on the CPU; explore the limits of your CPU (clock speed, etc).
Well the timeline will vary, but that’s the idea. I think the only feasible way to do that is as a team project spanning multiple quarters. Honestly one of the most rewarding projects I’ve ever done & would recommend to any prof out there who wants to push their students.
A little convoluted, but apparently a couple of people have coaxed Verilog and/or VHDL into understanding 74xx logic chips: http://pepijndevos.nl/2019/07/18/vhdl-to-pcb.html