摘要 |
In a method of simulating a multi-processor system by running code that simulates the system on a host processor, a SPECULATE and a COMMIT instruction is used to mark an area of memory, shared across several simulated processors, and the code is translated at run time to a form required by the host processor. All instructions are mapped to a native instruction set of the host using two different code dictionaries: all instructions outside a SPECULATE/COMMIT region are mapped to the first of the two code dictionaries. If a SPECULATE instruction is encountered during runtime by a simulator running the code, the instructions are mapped to a native instruction set of the host using the second code dictionary. Within the SPECULATE/COMMIT region are mapped to the native instruction set of the host using a second model that more accurately represents the multi-level memory of the final hardware implementation of the multi-processor system.
|