Now that instpermsec is being adjusted every second instead of every
5 seconds, the initial value of instpermsec is not so critical. This
benchmark gave wildly varying results on different system and compilers.
Previously iget16 was used for all instruction fetches, with the
assumption that any could trap. But actually, only the first word of
the instruction stream can trap in V mode, which is why these
instructions must be short. Both words of a long R-mode instruction
can trap.
Tested change by booting R19 with and without -DFAST, all other revs
with -DFAST, and basic with trace on in R19 (this executes code from
the DFAC)
In slow mode (compiled without -DFAST), Rev. 19 would crash during
boot. On investigation, the code was branching to '4 after setting
up an instruction there. However, instruction fetch found a '0
instead of the expected instruction.
Instructions might be fetched from registers via trap. Fast iget16()
checks for fault. Slow iget16() does not, and just calls get16() which
does not check.
The initial estimate for instructions per millisec (instpermses) was
much too low for modern CPUs, and was also only updated every 5
seconds. Combined, these were causing the clock to be erratic during
the first 5-15 seconds of system boot.
This was easily noticed by running the MIPS benchmark program right
after a system boot, where instead of delaying 5 seconds, it might
only delay 2 seconds, and then would report a bogus MIPS rating.
Waiting a minute and running it again would give an accurate rating.
Adjusting the instpermsec initial value from 2000 to 40000 and
IPMSTIME time from 5000 ms to 1000 ms (every second vs 5 seconds)
fixes the problem.
The emulator reads SEG load maps for Primos and displays symbolic
names and offsets during tracing. But when running in S/R modes
during initial startup, there is no point in doing a load map lookup
and it's somewhat confusing to see segment 0 symbol names printed for
all effective addresses. A blank name was already printed for
user-mode S/R traces because the segment number is > 01777, usually
04000.
Removed comment about memory needing to be a power of 2. Testing
-mem 9 worked fine with rev 20:
OK, stat sys
System is currently running PRIMOS rev. 20.2.8
Copyright (c) Prime Computer, Inc. 1985
9216K bytes memory in use
It was confusing that MAXMB is the default memory size, so renamed it
to DEFMB. MEMSIZE was not necessary (half of MAXMB) and MEMMASK was
used only in mapva to limit physcal addresses when segmentation was
not enabled. However, this appears to be a bug, because it would
cause memory addresses larger than physical memory to wrap and succeed
rather than generate a missing memory check.
Link to four distribution tape sets on sysovl.
In the emulator doco paragraph, mention the man page.
Hacked on line wrap until I decided it was better to do it in vi.