Simulation Reliability Note (Programmers only)
by
, 04-25-2012 at 04:58 AM (7944 Views)
I minor point that I neglected to mention in my book, not of interest to non-programmers. In the Sim Secrets chapter, I discussed simulator architecture – in particular, separating the actual simulation engine from the setup and display code. The simulation engines, the heart of the process, actually comprise a small percentage of the code. When you compile code, you set several options. Among them are various checks on operation of the code – for example, array bounds checks, integer overflow checks, and floating-point error checks. These checks result in a very heavy CPU penalty, which we do not want to pay during simulation. But, the checks can be highly useful in avoiding the perils of corrupt setup files and coding errors. A great advantage in separating the simulation engines from the majority of the code is the ability to set the compiler options differently. So, the simulation engine runs without such checks at high speed. The setup code runs with these checks, which will likely be triggered by any corruption in the setup. The best of both worlds.