Is it possible to simulate hardware of MIPS architecture computer defined using Verilog/VHDL

computer-architectureemulatorsimulation

I am reading Digital Design and Computer Architecture book and if I will be persistent then I will have MIPS architecture computer at the end, implemented from scratch by me .

I wonder is it possible to somehow define different components of this computer using Verilog or VHDL or something else maybe and simulate them on a computer? I'd like to build it from most basic blocks like NAND or AND and do one step at a time building each layer of abstraction. Then when I am done with hardware part I'd like to write an operating system for it.

Is it possible to do all of this without buying any real hardware and using only some simulation software?

If so, please, point me to some resources where I can read more about it.
Or explain how this can be done.

Thanks in advance.

Best Answer

Of course it is possible to simulate a computer microprocessor using Verilog and VHDL. As Alex said, that's what they are intended for.

Three points:

  1. You won't get far building it out of primitive gates (AND, OR, etc). While it is instructive to learn to build modules such as Adders and Counters at the gate level once you get past that it becomes a grind and you don't learn as much anymore. Modern digital design is done at a higher level of abstraction called the Register Transfer Level. Code written at that level is called RTL. A great place to learn about how to write Verilog RTL is at Asic-World (I use it all the time): asic-world

  2. It's never, ever, ever going to simulate fast enough in RTL for you to write an operating system on it. If you're interested in higher-level abstractions what you should do is write an instruction set simulator in C (not difficult) and you can use THAT to write and operating system.

  3. There are a lot of open-source VHDL and Verilog cores that implement the MIPS instruction set and include source code. You can download them, play around with them, and learn a lot. Here is just one project of many: miniMIPS