OVP Forums - A community of assistance, help, questions, and answers.
  FAQFAQ    SearchSearch      RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in
Simulation speed question

Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Speed questions
View previous topic :: View next topic  
Author Message

Joined: 30 May 2008
Posts: 22
Location: India

PostPosted: Wed Aug 06, 2008 11:58 am    Post subject: Simulation speed question Reply with quote

I modelled a simple platform consisting of a single ARM7 processor and a memory.I executed a simple sorting application on it (quick sort of 10,000 numbers).
I instantiated the processor with different nominal MIPS varying from 50 to 250 but each time the simulation statistics shows the same result in terms of simulated MIPs and simulation time.Why is it so??

Also in a platform consisting of 2 processors (ARM7)(CPU0 and CPU1)with each having its own memory, the following parameters were passed:
CPU0 nominal MIPs=200
CPU1 nominal MIPs=50
The application for CPU0 was fabonnacci generation while for CPU1, it was sorting.
The simulation statistics reported are:
CPU0 Simulated MIPs=60
CPU1 Smulated MIPs=292.3
The statistics does not change even if I interchange the nominal MIPs of two processors keeping the application same as before.
Does the nominal MIPS of a processor defined has nothing to do with its run-time statistics??

In what situations will then such a declaration help??
Please reply
Back to top
View user's profile Send private message
OVP Technologist
OVP Technologist

Joined: 28 Feb 2008
Posts: 24

PostPosted: Fri Aug 08, 2008 4:03 am    Post subject: Reply with quote

The reported statistics relate to how fast the simulator itself is running. If you run the simulator on a fast x86 host, it might run an OR1K/ARM model at 500 million OR1K instructions per second or more. If you use a slower x86 host, the simulator speed might be less. This number is reported to you as the Simulated MIPS, and you can think of it as the number of simulated OR1K/ARM instructions executed divided by the time the simulation took according to your watch. The User Time and System Time statistics are also related to the x86 host: they just say how much real time the simulator process took in user code and system code, respectively.

Changing the Nominal MIPS for a processor won't typically change the simulated MIPS rate much: what it will do is change the simulated time at which the process ends, and at which it interacts with PSE peripheral models that have time delays. Simulated time is not directly related to real time, and may run faster or slower than real time depending on the nominal processor speeds you have specified, the number of processors, the behaviour of PSE peripheral models and so on. In other words simulated time works in exactly the same way as the same concept in languages such as Verilog and VHDL.
Back to top
View user's profile Send private message
OVP Technologist
OVP Technologist

Joined: 27 Feb 2008
Posts: 1656
Location: United Kingdom

PostPosted: Fri Feb 13, 2009 6:24 am    Post subject: Reply with quote

Here is an interesting point to consider when simulating a multiprocessor system. Often there are two factors at work in a multiprocessor simulation that pull in different directions:

1. quantum size - in a multiprocessor simulation, the simulator performs a "quantums-worth" of instructions on one processor before switching to the next. The number of instructions performed for each processor per quantum is the nominal mips rate / quantum size. For example, a processor with a nominal MIPS rate of 200 million instructions per second will perform 200,000 instructions per quantum with the default quantum size of 1 millisecond. For simulation efficiency, the more instructions executed per quantum, the faster the simulation will go (switching context from one processor to another adds overhead).

2. multiprocessor wait frequency, i.e. how often in the specific application is the processor blocked on a semaphore held by another processor.

To get reasonably accurate simulation results, the quantum size needs to be chosen so that multiprocessor waits occur infrequently compared to quantums (for example, one multiprocessor wait every ten quantums or so). If not, simulation time is dominated by bogus waiting time. In this situation a processor does a tiny amount of "real" work at the start of each quantum and then waits on a semaphore held by another processor for the whole of the rest of the quantum. Increasing the MIPS rate only makes the situation worse: no more real work is done, but more time is spent spinning.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Speed questions All times are GMT - 8 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Information regarding OVP © 2008-2022 Imperas Software