The Linux executable mips is a ready-to-use hardware simulator for the 2-by-2 mMIPS NOC and is available in ./samples/simulator. This simulator is useful for debugging your applications or the NOC itself. The simulator does not is not simulate real-time, in fact it is about a twenty thousand times slower than that (on a Pentium III 1GHz). This makes it less suitable for debugging larger applications. You could use the FPGA implementation to debug larger programs.
The simulator has two features that makes it useful for debugging:
The simulator mips can be called from the Linux shell with the desired simulation time in nanoseconds as a parameter (e.g. mips 5000 to simulate for 5µs).
The simulator searches for the files mips_rom.xXyY.bin and mips_ram.xXyY.bin which should contain the instructions and data for the processor node at x-position X and y-position Y in the network. Since the sample simulator is for a 2-by-2 network X and Y can be either zero or one. Processors that have no corresponding memory file will not cause problems. These processors will just stop immediately and remain idle while the other processors do their thing.
The test projects "Gossip" and "JPEG Decoder" contain a Linux shell script called dolcc to automate the process of compiling the C sources, create the mips_r*m.xXyY.bin files and start the simulator. More on the compilation and simulation process is in the application design flow.
As said before, simulation takes a lot of time on even today's fastest processors. It took 600 milliseconds for the JPEG decoder on the 2x2 NOC to convert a 16x16 color JPEG image to a bitmap. To simulate these 600 milliseconds on a Pentium III 1GHz processor running GNU/Linux 2.4.20 with 2048 MB of RAM took three hours (more information).
The page that describes the NOC design flow also shows how to compile a hardware simulator. You only need to create a new simulator if you change the sources of the NOC. There is a working hardware simulator for the 2-by-2 mMIPS NOC in ./samples/simulator.
It is possible to customize the simulator and add new debugging capabilities. See SystemC hardware simulators page for more information.