2.8 CPU Simulation 131
code for the simulation by adding instructions to compute the target state that
has to be simulated. Because much of the simulation runs as native code on the
host machine, direct execution can be very fast.
2.8.3 Microarchitecture-Modeling Simulators
modeling detail
and accuracy
We can provide more detailed performance and power measurements by build-
ing a simulator that models the internal microarchitecture of the computer.
Directly simulating the logic would provide even more accurate results but
would be much too slow, preventing us from running the long traces that we
need to judge system performance. Logic simulation also requires us to have the
logic design, which is not generally available from the CPU supplier. But in ...