From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Thread: ffc31,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Thread: 1164f8,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidf4c4f7386e,gidd180ab3bd8,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.74.201 with SMTP id w9mr703619pbv.0.1328141681075; Wed, 01 Feb 2012 16:14:41 -0800 (PST) Path: lh20ni250219pbb.0!nntp.google.com!news1.google.com!goblin3!goblin.stu.neva.ru!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.Update.UU.SE!news.Update.UU.SE!not-for-mail From: Johnny Billquist Newsgroups: alt.sys.pdp11,vmsnet.pdp-11,comp.sys.dec Subject: Re: PDP11 Values from MFPT Date: Thu, 02 Feb 2012 01:14:39 +0100 Organization: Update Computer Club Message-ID: References: <4f12e49d$0$295$14726298@news.sunsite.dk> <4f175c07.15409279@nntp.aioe.org> <4f20c6e3$0$284$14726298@news.sunsite.dk> <4f215614.266356@nntp.aioe.org> <4f24a237$0$295$14726298@news.sunsite.dk> <4f2537ed.51306295@nntp.aioe.org> <4f28b73b$0$290$14726298@news.sunsite.dk> <4f291473.18988613@nntp.aioe.org> <4f2a3a1e.28631752@nntp.aioe.org> NNTP-Posting-Host: 178-83-31-172.dynamic.hispeed.ch Mime-Version: 1.0 X-Trace: Iltempo.Update.UU.SE 1328141680 25599 178.83.31.172 (2 Feb 2012 00:14:40 GMT) X-Complaints-To: newsmaster@Update.UU.SE NNTP-Posting-Date: Thu, 2 Feb 2012 00:14:40 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0) Gecko/20120129 Thunderbird/10.0 In-Reply-To: <4f2a3a1e.28631752@nntp.aioe.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2012-02-01 14:48, paramucho wrote: > On Wed, 01 Feb 2012 12:48:42 +0100, Johnny Billquist > wrote: > >> On 2012-02-01 12:22, paramucho wrote: >>> On Tue, 31 Jan 2012 22:53:32 -0500, "Jerome H. Fine" >>> wrote: >>> >>> >>>>> >>>>> Selecting the MMU registers was initially process of elimination. >>>>> Following that, I knew that E11 doesn't actually attempt to fully >>>>> implement MMU register SR1. I started playing around on a J11 and F11 >>>>> to see what happened when I jammed those registers in an illogical >>>>> manner. After a little experimentation I found a test which came out >>>>> differently on the F11 to the J11. Then I played around with E11 and >>>>> SimH. It's not that hard, and it's not the ideal test either. >>>>> >>>>> >>>> While I agree it is not the ideal test, the >>>> fact that it works and is actually quite >>>> simple is what is important. >>> >>> 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. A lot of the "undefined" behavior is in fact things that are used to identify one CPU from another. >>> However, these days I could probably use the clock/terminal timing >>> loop to detect an emulator more generally (it used to fail in the past >>> because nulls were output as spaces on SimH). Once I knew I was on an >>> emulator I might be able to come up with some basic difference between >>> SimH and E11. >> >> Timing might be the only thing that Simh in general will have a hard >> time hiding. > > The problem is that timing is hard to measure in an emulated machine > because one doesn't know how busy the machine is. An emulated machine > might be getting anywhere between 1% and 100% of the hosts actual CPU > time. That variability itself could be measured in some, but not all > circumstances. Right. > 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. >>> 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. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol