![]() This is the technique that this project uses. This is a lot more work and generally isn't as fast, but it provides a much richer experience to the user. The other way to simulate a CPU is to re-implement the building blocks of the CPU in software, then build a simulation of the CPU using those building blocks-matched 1:1 with the actual hardware of the CPU. Because there's no interaction with the hardware, it really just ends up feeling like a less efficient way of writing code. The person using it never gets to experience why an instruction is implemented, or why it's implemented in a particularly way. Similarly, this technique provides some value as a learning tool for people to play with the architecture without having to build the hardware, but the experience is very limited. ![]() Sometimes you'll implement some instruction in software first, thinking it will be easy in hardware, only to find out it wasn't, and you have to rethink the whole design-after you've already become attached to having that new instruction. Every time you add hardware or instructions to the CPU, you have to implement software versions of those new instructions, and those two tasks are very duplicative. The downside of this technique is that it takes the hardware aspect out of the picture, and while it provides a small amount of value to helping you design the CPU-that value is very limited. It's also excellent in that you can simulate in near realtime. It's a great way to test your programs before having to run them on actual hardware, giving you a much faster "developer feedback loop" (the loop that defines the time between writing code and seeing the results of that code). This technique is very straightforward, and allows for very fast simulation of a program. The first way is to write software to implement all the instructions, and to build a simulator that parses the assembly and executes those instructions. There are two major techniques for being able to simulate a CPU on a desktop computer. This project (once complete) will allow for complete simulation of the CPU (and some peripherals). This project is a Logic Simulation of James Sharman's 8-bit Pipelined CPU built with Digital. 8-bit Pipelined CPU Simulated (James Sharman's design)
0 Comments
Leave a Reply. |