|
From: | Dave N6NZ |
Subject: | Re: [Simulavr-devel] patch #6776: No segfault on access to notimplemented I/O registers |
Date: | Mon, 23 Mar 2009 11:43:35 -0800 |
User-agent: | Thunderbird 1.5 (X11/20051201) |
Joerg Wunsch wrote:
Well, yes, but the point of running a simulator is to execute the program in an environment that provides more/richer information than the real hardware. Simulators are a debug environment, and the default choice in case of ambiguity should always be the conservative choice, since that will expose the most potential bugs. Some of those bugs can go unnoticed in real hardware or with "accurate" simulators.Seems reasonable to me, as doing that (accessing a non-existent address or IO location) would be an error condition in the simulated program. The user should be notified in an unambiguous way.OTOH, I think there's also a point for having an option where the simulator behaves as best as possible like real silicon, i.e. unknown opcodes are executed as a NOP rather than triggering an exception, and access to unknown storage yields unpredictable results.
The decision (in another mail not quoted here) to print a message that can be optionally silenced seems reasonable.
-dave(Who spent way too many years developing event driven logic simulators, fault simulators, IDDQ-fault simulators, switch level simulators, behavioral simulators, RTL simulators....)
[Prev in Thread] | Current Thread | [Next in Thread] |