From: paramucho@hotmail.com (paramucho)
Subject: Re: PDP11 Values from MFPT
Date: Thu, 02 Feb 2012 13:31:17 GMT [thread overview]
Message-ID: <4f2a8c5a.52418379@nntp.aioe.org> (raw)
In-Reply-To: jgckhg$ovv$1@Iltempo.Update.UU.SE
On Thu, 02 Feb 2012 01:14:39 +0100, Johnny Billquist <bqt@softjar.se>
wrote:
>On 2012-02-01 14:48, paramucho wrote:
>> On Wed, 01 Feb 2012 12:48:42 +0100, Johnny Billquist<bqt@softjar.se>
>> wrote:
<snip>
>>>> The reason that it's not ideal is that it doesn't handle CPU
>>>> configurations that don't have memory management, e.g. LSI's and early
>>>> unmapped PDP-11s. I haven't tested it on all the different MMU
>>>> configurations either.
>>>
>>> I think a bigger reason that it's not ideal is that at least Bob Supnik
>>> have the explicitly stated goal that it should not work. Any current
>>> differences from the real machine are bugs, and are subject to be fixed
>>> at any time, at which point the test wont work anymore.
>>
>> That's not exactly what was stated. Without wishing to put words into
>> anyone's mouth, BobS wrote this:
>>
>> The model emulation in SimH is not perfect, which is why clever
>> software can detect it. But the intent is to mimic real systems.
>> SimH is not a "different" PDP11.
>>
>> And what I wrote earlier was this:
>>
>> The trick was to find some "undefined" behavior that didn't need
>> correction. The code above gets different results from an F11 and a
>> J11 as well as from SimH and E11. The test is far from ideal, but it
>> works well enough for my purposes.
>>
>> My point being, that I'm not sure that the behavior I'm using needs to
>> be "corrected" in the sense that I'm not sure it's actually "defined".
>> I'm not even sure that the behavior I'm using can be corrected without
>> a considerable effort. (One reason I'm not sure is that I wrote the
>> code years ago and I've forgotten whether the result values could be
>> computed or would need to be (at least partially) enumerated).
>
>We might read things in a different way. "Undefined" is, in this
>circumstance, as far as I can tell, only something that is valid as far
>as a general view of a PDP-11 is concerned. If you emulate a specific
>implementation, the behavior is not undefined. And Simh aims to
>implement the same twists as the machine it pretends to emulate. You
>have found a case where it does not behave the same way as the machine
>it claims to emulate. I'd say that this means Simh have a bug.
>
>Undefined generally only means that different implementations of a
>PDP-11 are free to do this as they see fit, and no program should depend
>on a specific behavior.
>However, a specific implementation will only do it one way or another.
I have been using "undefined" in the architectural sense, that is,
behavior which is not specified by the *architecture* or explicitly
specified as "undefined". That's fairly well-known terminology.
Clearly, there can be *no* undefined *implementation* behavior and
thus the distinction between "defined" and "undefined" is meaningless
if applied to the implementation.
But to take your point that an emulation could avoid "undefined"
architecture states by referring to "unspecified implementation
behavior" I'd make two arguments.
First, "unspecified implementation behavior" can be significantly more
difficult to emulate. An *architectural definition* will usually
propose relatively simple deterministic algorithms, explicitly or
implicitly, but unspecified implementation behavior can potentially be
tied to any machine state. It might be necessary to run extensive
tests on many different CPU types just to work out what the behavior
is. In some cases it simply won't be worth the effort.
Second, I don't think that emulator authors are as strict as you
imply. For example, consider the following "programming difference"
from one of the J11 architecture documents:
30. If a register contains an odd value in mode 2 and a [11/73]
bus error occurs, the register will be incremented
If a register contains an odd value in mode 2 and a [11/34]
bus error occurs, the register will be unchanged.
SimH gets it right for its default J11 CPU, where it increments
and wrong for an 11/34, where it should be unchanged. E11 is the other
way around: right for its default 11/34 CPU, where it's unchanged and
wrong for the J11 where it should increment. Now these are examples of
incorrect implementation differences (that I would never rely on for a
detection test), however, there's no screaming need for SimH or E11 to
fix them.
Whenever I write a new RUST driver I first get it up and running under
V11, and then on couple of different real PDP-11s. Then I test E11 and
SimH, where I often have to make changes to the driver to get it work.
Likewise, I have a debugger which uses the trace trap to store an
execution history. It works well under E11 but is a bit wierd under
SimH.
Neither SimH or E11 attempt to mimic the instruction times of the
original computers. Does this represent a failure? There is at least
one gaming PDP-11 emulation which does mimic the instruction times.
As noted, the emulators don't mimic the typical speeds of PDP-11
terminals either. That was fixed behavior I could rely on a real
PDP-11.
One of the key strengths of SimH is its portability across different
systems, and in to the future since it sticks pretty much to
straightforward C code. This portability may well be one reason that
SimH doesn't mimic asynchronous I/O. There are always trade-offs.
The emulations are not exact or complete and it would be unrealistic
to expect them to be and they're only as good as the testing they've
had. There is always going to be a gap between the emulation and the
original. Some of the behavior that lies in the gap is worth fixing,
some behavior isn't. That's true of most software. Emulators are no
different.
>A lot of the "undefined" behavior is in fact things that are used to
>identify one CPU from another.
Which is exactly what I've used in the past and that's what I'm using
with the emulators. I made the point elsewhere: that software often
relies on the unchanging behavior of an implementation. One could make
the case that an emulation should likewise strive to be unchanging
whenever possible if it wants to emulate real machines.
<snip>
>> Disk I/O provides another opportunity for testing. I guess that SimH
>> disk I/O is synchronous, i.e. is always actually completed before
>> control is returned to the emulated CPU after the interrupt servicve
>> routine delay cycles. But to test that you'd probably need to use
>> direct access to the device registers and that in turn would require
>> per-device tests. I'm likewise not sure if E11 is synchronous. V11
>> certainly is.
>
>E11 does not do it synchronously. It's done in different threads, that
>can complete asynchronously to each other. Which is nice. It means that
>your CPU does not stand still just because you issued an operation to a
>device. Especially if you have a multi-cpu host machine.
That's cool (the only thing I thread in V11 is the terminal). E11 aims
at high performance and I guess that's *one* reason that John Wilson
didn't bother to implement MMU register SR1--it would have adversely
affected performance (since it requires a 2-part calculation and store
for every register/mode access).
My detection tests involve SR1. The shakiest part of my approach is
that it would be quite reasonable for E11 to improve SR1 emulation at
some point (regardless of my tests), although since no system actually
uses the functionality there's no real incentive to do so.
>>>> The advantage of the register behavior test is that it tests SimH and
>>>> E11 out-of-the-box, as delivered. Any test which is based on custom
>>>> versions of SimH and E11 has exactly the disadvantage that it won't
>>>> test the standard deliverables, which is what most people use. Thus,
>>>> it makes sense to use my register test, or something equivalent when
>>>> the custom instruction/device is not present.
>>>
>>> Right. The only addition being that at least SimH should not be
>>> identifiable this way either. It's a bug that you are using at the
>>> moment. Expect it to go away sooner or later.
>>
>> See above. It may go away, but not necessarily. It would be fun if it
>> did 'cos I'd have to scratch my head and look for something else.
>
>I think the aim of Simh is that there shouldn't be a way. When there is
>a way, the emulation have failed.
I think it is accepted that there will always be a gap between the
emulation and the original. I don't think the emulations aim at being
utterly exact. Life is too short. To quote BobS again:
The model emulation in SimH is not perfect, which is why clever
software can detect it. <snip>
The presence of a gap doesn't mean that an emulation has failed. In
any case SimH and E11 are quite amazing, with or without gaps.
Ian
next prev parent reply other threads:[~2012-02-02 13:31 UTC|newest]
Thread overview: 222+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-15 14:37 PDP11 Values from MFPT Jerome H. Fine
2012-01-18 6:03 ` paramucho
2012-01-18 11:28 ` Johnny Billquist
2012-01-18 13:05 ` glen herrmannsfeldt
2012-01-18 13:26 ` Johnny Billquist
2012-01-26 3:24 ` Jerome H. Fine
2012-01-26 13:38 ` Johnny Billquist
2012-01-29 1:32 ` Jerome H. Fine
2012-01-29 1:43 ` Johnny Billquist
2012-01-26 3:23 ` Jerome H. Fine
2012-01-18 16:02 ` paramucho
2012-01-18 18:12 ` Johnny Billquist
2012-01-19 14:30 ` paramucho
2012-01-19 16:42 ` Johnny Billquist
2012-01-19 20:32 ` glen herrmannsfeldt
2012-01-20 13:32 ` paramucho
2012-01-20 13:29 ` paramucho
2012-01-20 16:48 ` Johnny Billquist
2012-01-21 12:25 ` paramucho
2012-01-21 20:15 ` Johnny Billquist
2012-01-26 3:25 ` Jerome H. Fine
2012-01-26 6:09 ` paramucho
2012-01-26 6:30 ` paramucho
2012-01-26 13:50 ` Johnny Billquist
2012-01-29 1:52 ` Jerome H. Fine
2012-01-29 2:08 ` Johnny Billquist
2012-01-26 13:48 ` Johnny Billquist
2012-01-26 13:46 ` Johnny Billquist
2012-01-29 1:35 ` Jerome H. Fine
2012-01-18 12:41 ` glen herrmannsfeldt
2012-01-18 13:18 ` Johnny Billquist
2012-01-18 14:28 ` glen herrmannsfeldt
2012-01-18 15:14 ` Johnny Billquist
2012-01-18 21:54 ` glen herrmannsfeldt
2012-01-18 22:32 ` Al Kossow
2012-01-19 0:22 ` Johnny Billquist
2012-01-19 1:30 ` glen herrmannsfeldt
2012-01-19 14:32 ` Bob Koehler
2012-01-19 16:45 ` Johnny Billquist
2012-01-20 17:55 ` Bob Koehler
2012-01-20 18:38 ` Bill Gunshannon
2012-01-18 16:25 ` paramucho
2012-01-18 18:00 ` Johnny Billquist
2012-01-19 14:25 ` paramucho
2012-01-19 16:50 ` Johnny Billquist
2012-01-20 13:32 ` paramucho
2012-01-20 16:54 ` Johnny Billquist
2012-01-21 13:16 ` paramucho
2012-01-21 13:58 ` Bob Eager
2012-01-21 20:02 ` Johnny Billquist
2012-01-22 11:59 ` Johnny Billquist
2012-01-22 14:03 ` paramucho
2012-01-22 16:15 ` Johnny Billquist
2012-01-23 4:14 ` paramucho
2012-01-18 13:20 ` Bob Eager
2012-01-19 14:29 ` Bob Koehler
2012-01-21 12:44 ` Tim Shoppa
2012-01-21 13:50 ` paramucho
2012-01-22 16:56 ` Tim Shoppa
2012-01-22 18:11 ` glen herrmannsfeldt
2012-01-23 3:52 ` paramucho
2012-01-21 14:25 ` glen herrmannsfeldt
2012-01-21 16:46 ` Bob Eager
2012-01-25 22:12 ` Tim Shoppa
2012-01-26 3:22 ` Jerome H. Fine
2012-01-26 13:46 ` paramucho
2012-01-29 1:34 ` Jerome H. Fine
2012-01-29 15:46 ` paramucho
2012-02-01 3:53 ` Jerome H. Fine
2012-02-01 11:22 ` paramucho
2012-02-01 11:48 ` Johnny Billquist
2012-02-01 13:48 ` paramucho
2012-02-01 14:43 ` stan
2012-02-01 16:37 ` paramucho
2012-02-01 18:05 ` stan
2012-02-02 2:24 ` Jerome H. Fine
2012-02-02 0:14 ` Johnny Billquist
2012-02-02 2:25 ` Jerome H. Fine
2012-02-02 9:29 ` Johnny Billquist
2012-02-02 18:52 ` glen herrmannsfeldt
2012-02-03 0:12 ` Johnny Billquist
2012-02-03 4:07 ` Jerome H. Fine
2012-02-03 14:15 ` Johnny Billquist
2012-02-03 15:00 ` paramucho
2012-02-02 13:31 ` paramucho [this message]
2012-02-02 19:07 ` glen herrmannsfeldt
2012-02-03 0:16 ` Johnny Billquist
2012-02-03 4:23 ` glen herrmannsfeldt
2012-02-03 12:01 ` Johnny Billquist
2012-02-03 15:36 ` Joe Oswald
2012-02-07 10:46 ` Johnny Billquist
2012-02-03 4:29 ` Jerome H. Fine
2012-02-03 12:50 ` Bill Gunshannon
2012-02-04 8:42 ` Charles Richmond
2012-02-04 13:38 ` paramucho
2012-02-04 16:03 ` Bill Gunshannon
2012-02-04 16:39 ` paramucho
2012-02-03 10:48 ` paramucho
2012-02-03 11:24 ` Johnny Billquist
2012-02-04 17:06 ` paramucho
2012-02-04 18:22 ` paramucho
2012-02-04 18:55 ` Johnny Billquist
2012-02-04 19:13 ` Bill Gunshannon
2012-02-05 13:28 ` Johnny Billquist
2012-02-05 18:15 ` glen herrmannsfeldt
2012-02-04 18:51 ` Johnny Billquist
2012-02-04 23:09 ` glen herrmannsfeldt
2012-02-05 14:01 ` paramucho
2012-02-05 15:31 ` Johnny Billquist
2012-02-06 13:50 ` paramucho
2012-02-06 14:45 ` Johnny Billquist
2012-02-06 14:58 ` paramucho
2012-02-06 16:25 ` Johnny Billquist
2012-02-05 14:27 ` Johnny Billquist
2012-02-05 13:57 ` paramucho
2012-02-05 15:44 ` Johnny Billquist
2012-02-06 13:51 ` paramucho
2012-02-06 14:56 ` Johnny Billquist
2012-02-06 16:40 ` Johnny Billquist
2012-02-07 14:50 ` paramucho
2012-02-07 16:20 ` Johnny Billquist
2012-02-08 13:34 ` paramucho
2012-02-08 16:03 ` Johnny Billquist
2012-02-08 16:58 ` paramucho
2012-02-08 22:29 ` Johnny Billquist
2012-02-10 13:12 ` paramucho
2012-02-10 19:20 ` glen herrmannsfeldt
2012-02-11 13:12 ` paramucho
2012-02-11 20:06 ` glen herrmannsfeldt
2012-02-11 20:23 ` Johnny Billquist
2012-02-10 19:29 ` Johnny Billquist
2012-02-11 13:15 ` paramucho
2012-02-11 21:09 ` Johnny Billquist
2012-02-12 17:23 ` paramucho
2012-02-12 18:35 ` paramucho
2012-02-13 17:30 ` paramucho
2012-02-14 13:14 ` Johnny Billquist
2012-02-14 16:20 ` paramucho
2012-02-14 17:30 ` Johnny Billquist
2012-02-13 23:18 ` Johnny Billquist
2012-02-14 16:20 ` paramucho
2012-02-14 17:47 ` Johnny Billquist
2012-02-14 18:17 ` paramucho
2012-02-14 19:54 ` Johnny Billquist
2012-02-15 12:58 ` paramucho
2012-02-15 17:12 ` Johnny Billquist
2012-02-16 13:54 ` paramucho
2012-02-16 20:15 ` Johnny Billquist
2012-02-17 12:41 ` paramucho
2012-02-17 17:13 ` Johnny Billquist
2012-02-18 11:24 ` Johnny Billquist
2012-02-18 14:28 ` paramucho
2012-02-18 20:07 ` Johnny Billquist
2012-02-18 11:55 ` paramucho
2012-02-18 20:58 ` Johnny Billquist
2012-02-20 2:29 ` Jerome H. Fine
2012-02-20 5:54 ` paramucho
2012-02-20 17:14 ` Jerome H. Fine
2012-02-20 18:05 ` Johnny Billquist
2012-02-21 6:16 ` paramucho
2012-02-21 17:38 ` Jerome H. Fine
2012-02-21 19:31 ` Johnny Billquist
2012-02-20 5:53 ` paramucho
2012-02-20 10:28 ` Johnny Billquist
2012-02-21 3:33 ` Jerome H. Fine
2012-02-21 6:17 ` paramucho
2012-02-21 10:23 ` Johnny Billquist
2012-02-21 11:37 ` paramucho
2012-02-21 14:16 ` Johnny Billquist
2012-02-21 16:42 ` paramucho
2012-02-21 19:43 ` Johnny Billquist
2012-02-22 12:21 ` paramucho
2012-02-22 14:12 ` paramucho
2012-02-22 15:26 ` Johnny Billquist
2012-02-22 14:33 ` paramucho
2012-02-22 15:53 ` Johnny Billquist
2012-02-22 16:48 ` paramucho
2012-02-22 21:17 ` Johnny Billquist
2012-02-23 12:42 ` paramucho
2012-02-23 13:51 ` paramucho
2012-02-23 15:17 ` Johnny Billquist
2012-02-20 2:22 ` Jerome H. Fine
2012-02-20 6:07 ` paramucho
2012-02-21 3:29 ` Jerome H. Fine
2012-02-21 8:06 ` paramucho
2012-02-21 10:38 ` Johnny Billquist
2012-02-21 11:54 ` paramucho
2012-02-21 14:20 ` Johnny Billquist
2012-02-21 15:13 ` paramucho
2012-02-21 15:20 ` Johnny Billquist
2012-02-22 2:51 ` Jerome H. Fine
2012-02-22 6:37 ` paramucho
2012-01-18 11:20 ` Johnny Billquist
2012-01-26 3:21 ` Jerome H. Fine
2012-01-26 14:12 ` Johnny Billquist
2012-01-26 15:26 ` paramucho
2012-01-29 1:41 ` Jerome H. Fine
2012-01-29 2:04 ` Johnny Billquist
2012-01-29 2:31 ` Johnny Billquist
2012-01-29 1:39 ` Jerome H. Fine
2012-01-29 1:45 ` Johnny Billquist
2012-01-30 2:21 ` Bob Supnik
2012-01-31 7:14 ` paramucho
2012-01-31 9:42 ` Johnny Billquist
2012-01-31 14:24 ` Bill Gunshannon
2012-01-31 20:17 ` Johnny Billquist
2012-01-31 21:39 ` Bill Gunshannon
2012-01-31 23:43 ` glen herrmannsfeldt
2012-02-01 3:56 ` Jerome H. Fine
2012-02-01 11:53 ` Johnny Billquist
2012-02-01 13:48 ` paramucho
2012-02-02 0:20 ` Johnny Billquist
2012-02-02 2:22 ` Jerome H. Fine
2012-02-01 12:14 ` Johnny Billquist
2012-02-01 16:27 ` glen herrmannsfeldt
2012-02-01 5:28 ` Charles Richmond
2012-02-01 11:54 ` Johnny Billquist
2012-02-01 3:55 ` Jerome H. Fine
2012-02-01 11:22 ` paramucho
2012-02-01 12:03 ` Johnny Billquist
2012-02-01 3:54 ` Jerome H. Fine
2012-02-01 12:09 ` Johnny Billquist
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox