Thursday, April 10, 2008

Software Simulation Techniques

If you desire to simulate a system you have to take care of all its components and the way they interact. The main and more difficult element to manage is time. Every action happened at a precise time and at one or more action can happen at the same time.
We consider time as a continuous variable: in software,as every thing, time is discrete. So in function of your time resolution (i.e. clock resolution) you can find some actions that are performed as effect (i.e. after) of other events but at the same time (by the clock point of view). This is the "execution pattern" at the base of the concept of "evaluate&update" or, for who knows System-C, "Delta-Cycle".
A system simulation can be cycle-accurate or non deterministic, or something else comprised between these types.
Cycle accuracy requires every part of the system to be completely described and has a completely deterministic behavior.

Non deterministic simulation usually exploits concurrent thread to simulate the concurrency of different systems elements and is useful because does not require precise system specifications even if it provides unstable results. They are useful during system analysis & design stages, but are dangerous if employed to define the specifications of a project.
What I previously defined "something else" are simulations with clock, but without a completely specified system and as a consequence has some "uncertainty kernels" where concurrent action are performed by a non-deterministic choice. BME is a "something-else" simulator. Improving the system specification make the simulator nearer and nearer to a "cycle-accurate" one.
NOTE: non-determinism is usually due to multi-threading.

This image represents computation time (probability) density functions for the same task executed on different architectural instances by BME. How this times are evaluated is not trivial: see this paper for a exhaustive explanation. BME is designed to simulate more systems and if the architecture is not completely specified the execution engine exploits non-determinism to execute actions comprised in a time-step. i.e. it cannot exploits the concept of delta-cycle.

Labels:

1 Comments:

Blogger Kahaly said...

Hi,
Its a very good blog. Good technical information. Keep it up dude. good job....

April 21, 2008 at 5:49 PM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home