sim_main is the entry point for the simulator abstraction. Everything related to the simulator can be traced from here (context loading, for example, cannot, as it has nothing to do with simulation).
The fast forwarding loop simulates a small portion of the processor. It is enough to warm up the branch predictor and caches as well as invoke various system calls. If fast forwarding is not set to 0, each context will be fast forwarded by -fastfwd X instructions.
- Unless X == 1, in which case it will use a default value from the .arg file. In general, you won't use 1.
After fast forwarding and before simulator, the program counter is fixed and the branch predictor and caches are cleared (in terms of statistics, not data).
Main Simulation Loop
Here is the order of operations in the main simulation loop: