-1

I'm making 32-bit MIPS simulator with cpp just for studying.

But I can't understand how benchmark programs are run on simulator.

Also, I don't know how code of benchmark programs are structured.

Can you answer me these questions?

Thank you!

1
  • Same way you'd run any other program in a simulator, often by creating a binary executable and running your simulator on it. Most benchmarks are just programs that you run. Often with command-line args to specify a problem size or mode of operation. Commented Feb 14, 2024 at 16:49

1 Answer 1

0

When you compile the program into an executable, it will contain the information needed to recreate a process image (instruction section, initialized/uninitialized data section). On a real machine, the OS should load the executable and handle the section mapping. On a simulator, you will need to write the executable decoder and loader yourself to parse the program and load each section into your simulated memory space. Additionally, you will need to set the registers (e.g. PC and SP) to proper values for the program to start.

One example is the ELF file format.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.