by alok-g · 8y ago · 0 comments
The best way to learn how a CPU works would be to write a CPU! I.e., write HDL code for it and test in a hardware simulator.
I have designed a miniature application-specific processor, a compiler* and IDE for it, a disassembler, and an emulator too.
* To be more precise, I hacked a compiler for it using C# .net compiler.
But you can't share hardware designs (e.g., FPGA bitstreams) like you can software binaries or software source code. A hardware design will require a specific FPGA, board, and probably even a particular version of the synthesis tools if you want to build from source.
The actual processor was implemented on a Xilinx FPGA, and it was about 2K lines of HDL code, carrying about 25 application-specific instructions which I had designed also.
For the compiler, disassembler, IDE, emulator, I created in C# and .NET.
While I did not use these, there are also ASIPs: https://en.m.wikipedia.org/wiki/Application-specific_instruc...