Contents|Index|Previous|Next

Stand-alone Simulator

The following documentation discusses the options for a stand-alone simulator for the NEC VR4300 family of processors.

Stand-alone Simulator-specific command-line options

There are three run-time command-line options for the stand-alone simulator:

The ‘-t’ command-line option to the stand-alone simulator turns on tracing of all memory fetching and storing in the simulator:

C:\> run -t hello.xl
C:\>

The simulator writes the trace information to the file ‘trace.din’. The following are the first few lines of a trace file:

2 00000000a0020000 ; width 4 ; load instruction
2 00000000a0020004 ; width 4 ; load instruction
2 00000000a0020008 ; width 4 ; load instruction
2 00000000a002000c ; width 4 ; load instruction
2 00000000a0020010 ; width 4 ; load instruction
2 00000000a0020014 ; width 4 ; load instruction
2 00000000a0020018 ; width 4 ; load instruction
2 00000000a002001c ; width 4 ; load instruction
2 00000000a0020020 ; width 4 ; load instruction
2 00000000a0020024 ; width 4 ; load instruction

The ‘-v’ command-line option prints some simple statistics.

C:\> run -v hello.xl
Hello, world!
3 + 4 = 7
MIPS 64-bit simulator
Big endian memory model
0x00100000 bytes of memory at 0x00000000A0000000
Instruction fetches = 20653
Pipeline ticks = 20653

The ‘-m’ command-line option sets the size of the simulated memory area. The default size is 1048576 bytes (1 megabyte). The simulator rounds up the size you request to the next power of two.

C:\> run -v -m 200000 hello.xl
Hello, world!
3 + 4 = 7
MIPS 64-bit simulator
Big endian memory model
0x00040000 bytes of memory at 0x00000000A0000000
Instruction fetches = 20341
Pipeline ticks = 20341