

Show HN: My summer project - simulated CPU built from NAND gates - IsaacL
https://github.com/IsaacLewis/NAND-CPU

======
IsaacL
This is a project to teach myself more about the inner workings of CPUs, so
I'll need to learn a lot in the course of this project.

So far I've just defined some basic components (logic gates, adders, latches),
working from class notes, Wikipedia, and the computer built in Wireworld. If
any HNers can point me in the direction of better resources, it would be much
appreciated.

~~~
dthakur
Another direction you might want to explore is to learn VHDL or Verilog and
implement the CPU on an FPGA board.

You can get a prototype board for around $100 and should be able to build
something to cover most of, say, the MIPS instruction set.

This would be a more engineering oriented project; I would follow along an
'introduction to computer organization' style course from a university (just
google and you can determine the required textbook, exercises etc).

It's exciting to write some C code, compile it to mips instruction set with
gcc (I had to do some fudging here because my cpu didn't implement the entire
instruction set) -- and then run it on the fpga and get the right numbers.

~~~
tallanvor
That's definitely a great way to learn more about CPUs. In school we designed
a simple 8-bit CPU and loaded it into an FPGA. This included coming up with a
simple assembly language and building a compiler.

