I am trying to figure out how to slow down the SIMH PDP-8 simulator such
that the instructions are executed with similar timing to that of a real
PDP-8.  I have found that that even with throttling set very low, the
PDP-8 simulator executes much, much faster than a real PDP-8.

>From what I have read, I believe the execution of a single PDP-8
instruction can take anywhere from 1.2 - 4.6 microseconds, depending on
the type of instruction and I/O device to which the instruction applies.

I am running the PDP-8 simulator on a Windows XP host, which I
unfortunately cannot change to a real-time environment.

Some things I have considered:

1.  Inserting a sleep() function after execution of each PDP-8
instruction, but this won't work since the minimum sleep time is 1
millisecond, and even a 1 ms sleep request is not likely to return for
at least 20 ms due to Windows non-real-time scheduling.

2. Inserting a loop that cycles for some number of times after execution
of each PDP-8 instruction, in order to kill some time. The exact number
of cycles required would depend on the host processor speed, so I would
have to come up with some sort of calibration method to determine the
number of cycles.  I don't really like this method because I would have
to disable throttling and tie up the processor 100%, and I'm really not
sure how I would go about calibrating the number of cycles.

I am kind of thinking at this point that representative instruction
timing on a Windows host is pretty much impossible, but I thought it
might be worthwhile to throw the question out there to you guys and see
what comes back.  Any thoughts or ideas would be much appreciated.

Thanks,
Jeremy Dalby

_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to