3
$\begingroup$

As I understand emulation a rule of the thumb says that a computer must be around a order of magnitude more powerful to emulate another system without resorting to tricks. This is because for every clock cycle of the system to be emulated, the host machine must process that cycle in the correct time and also process its own cycles.

A Xbox 360 uses a 3.2GHz PowerPC Tri-Core Xenon processor, would this mean that emulating the console on a 3GHz PC CPU would be impossible, even if the host CPU was more powerful but not faster for clock cycles?

To give a more straightforward example. A i7 that runs at the same clock speed as a Pentium 4 will not be able to emulate the Pentium 4, even though the i7 is many times more powerful.

In addition, does this mean that to emulate the Xbox 360, The host computer must run at a speed of between 9GHz and 3.2GHz to be able to truly emulate a Xbox 360?

If this is the case, surely there must be a way around this limitation? If we had a host computer with 10x3GHz CPU's could this system use parallelzation to somehow emulate a 3 core 3.2GHz system.

Also the emulate should run at the speed that the user expected of the emulated system, I know if you slowed down the Xbox 360 on the emulator by a few times then it would be easier, I want to know if we can emulate a system at the speed it was meant to run.

If this is not possible does that mean that for emulation, clock speed is king? And there is no way around this? Even if your host machine had a thousand CPU's running at 2GHz it could never ever emulate a Xbox 360 at its native speed?

By the way I am sure this is in the domain of computer science. I am not sure exactly what it comes under but the simulation of a system within a system and inherent limitations is certainly applicable to computer science.

What about this: could a 4 core 3GHz i7 CPU emulate in proper time a 3.8GHz single core Pentium 4?

$\endgroup$

1 Answer 1

9
$\begingroup$

That very much depends on how well the instruction set of the CPU to be emulated maps to the instruction set of the emulating CPU. Certainly, clock speed is not the deciding factor. It might very well be that a slower (clock wise) CPU A can emulate a faster CPU B.

This can be both because of more powerful instructions (e.g. SSE instructions that allow doing the same operation to multiple values at once), or improvements in instruction level parallelism (e.g. more adders, multipliers etc. so that more instructions can be executed simultaniously, smarter recognition of independent instructions). There are also strong contributions from larger caches and smarter branch prediction. All these factors (and probably many more that I don't know about) can be improved to increase the average number of instructions executed without changing the clock speed. Since clock-speed increases stalled some years ago, this kind of improvement has been a major contributor to performance increases in CPUs.

Of course it also strongly depends on the skill of the person writing the emulator. There will always be some overhead involved in translating the instructions for CPU B to instructions that work on A. The larger the difference between the two CPUs, the larger the overhead.

$\endgroup$
2
  • $\begingroup$ Does this mean that a single core i7 3GHz is only more powerful than a single core Pentium 4 3GHz because of the instruction set? Its doing the same number of operations but those operations are more capable? $\endgroup$
    – Joseph
    May 29, 2013 at 8:18
  • 2
    $\begingroup$ It depends. On modern CPUs it's not true that an instruction always takes one cycle. So the i7 might execute some instructions faster than the P4. It might also have things like SSE that allow a single instruction to be executed on multiple values that a P4 lacks. Further instruction level parallelism exists in CPUs. Data-independent instructions that don't use the same resources (e.g. Adders) can be executed simultaniously. There are also cache and branch-prediction effects. All of these things can be made more performant without changing either the instruction set or the clock speed. $\endgroup$
    – adrianN
    May 29, 2013 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.