1
0
mirror of https://github.com/simh/simh.git synced 2026-04-25 11:41:25 +00:00
Files
simh.simh/VAX/tests/vax-diag_test.ini
Mark Pizzolato 464e1f9ef4 Unibus VAXen: Run working diagnostic supervisor Privileged Architecture tests
- The VAX 11/780 runs the VAX Diagnostic Supervisor the EVKAE (Privilege
   Architecture Exercisor) tests cleanly.
   All other Unibus VAXen execute different instructions in EVKAE
   Test 8 (KERNEL STACK NOT VALID) subtest 2 when compared to the 11/780.
   On these processors a REI instruction with reserved operands is invoked and
   this causes a failure of this subtest for these processors.
   We avoid this diagnostic test that fails.
- The VAX 8200 has some issues with the VAX Diagnostic Supervisor.
   Specifically, the EVKAA (Hardware Core Instruction) test uses the processor
   interval timer to measure the passage of time and expects the interrupts
   that are generated to occur at IPL 24 (0x18).  Meanwhile, the actual
   hardware is documented to generate Interval Timer interrupts at
   IPL 22 (0x16).  EVKAA fails when interrupts occur at IPL 22(0x16).
   If the processor is is built with Interval Timer interrupts at IPL 24(0x18),
   then EVKAA passes, but the EVKAE (Privileged Architecture Exercisor)
   Interval Timer test fails since the interval timer interrupts occur at
   IPL 24(0x18) and not at IPL 22(0x16).
   Once operating systems are running, operating system behavior will
   generally be unaffected if Interval Timer interrupts occur at a higher
   IPL than the OS expects, so the VAX 8200 is built that way and we avoid
   the diagnostic that fails.
- The DEC supplied instruction diagnostics actually time the execution of
   instructions being tested using the interval timer and the time of day
   clock.  When instructions take too long, they fail the test.  The
   VAX 11/730 simulator actually fails some of these instruction tests when
   run at precisely .3 the instruction rate of the VAX/11 780.  We therefore
   adjust the nocalibrate execution rate to 320K vs the VAX 11/780 running
   at 1000K.
2024-04-04 10:19:03 -10:00

232 lines
10 KiB
INI

:: vax-diag.ini
:: This script will run the available CPU instruction and core
:: functional diagnostics for the different VAX simulators.
::
:: Default output summarizes success or failure.
:: if the script is invoked with -v as a parameter, verbose
:: diagnostic output will be produced.
::
:: Default execution will run at a simulated pseudo speed reflecting
:: the speed of the original system being simulated. If the script
:: is invoked with a -c as a parameter, diagnostics will be run
:: at full speed with a calibrated clock, otherwise diagnostics
:: will be run with a pseudo clock scaled to the speed of the original
:: system that the simulator simulates.
::
:: The related diagnostic files must be located in the same directory
:: as this procedure.
::
#set debug -nrtbp 500 %SIM_BIN_NAME%.dbg
set log debug
set todr debug
set tmr debug
set int-clock debug=calib
set int-clock nodebug=queue;gettime;check
#set -o -t cpu hist=500k:%SIM_BIN_NAME%.hst
#break A3B4 SHOW HIST=40
cd %~p0
set runlimit 2000M instructions
set on
on error ignore
on runtime echof "\r\n*** Test Runtime Limit %SIM_RUNLIMIT% %SIM_RUNLIMIT_UNITS% Exceeded after running %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ***\n"; exit 1
:NEXT_ARG
set env DIAG_QUIET_MODE=0
if ("%1" == "-v") set console notelnet;shift
else set -qu console telnet=localhost:65432,telnet=buffered=1048576; set env -a DIAG_QUIET_MODE=1
set env DIAG_UNCALIBRATED_CLOCK=1
if ("%1" == "-c") set env DIAG_UNCALIBRATED_CLOCK=0;shift
if ("%1" != "") goto NEXT_ARG
goto DIAG_%SIM_BIN_NAME%
:DIAG_MICROVAX2
:DIAG_MICROVAX2000
:DIAG_MICROVAX3100M80
:DIAG_RTVAX1000
:DIAG_VAXSTATION3100M76
:DIAG_VAXSTATION4000M60
:DIAG_VAXSTATION4000VLC
echof "No diagnostics are available for the %SIM_NAME% Simulator\n"
exit 0
:DIAG_MICROVAX1
echo Running Hardware Core Test (EHKAA)
if not exist ehkaa-uv1.exe echof "\r\nMISSING - Diagnostic '%~p0ehkaa-uv1.exe' is missing\n"; exit 1
load ehkaa-uv1.exe
go -q 200
if (PC != 0x1150DA51) echof "\r\n*** FAILED - %SIM_NAME% Hardware Core Instruction test EHKAA after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"; exit 1
else echof "\r\n*** PASSED - %SIM_NAME% Hardware Core Instruction test EHKAA after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"; exit 0
:DIAG_INFOSERVER100
:DIAG_INFOSERVER1000
:DIAG_INFOSERVER150VXT
:DIAG_MICROVAX3100
:DIAG_MICROVAX3100E
:DIAG_VAX
:DIAG_MICROVAX3900
:DIAG_VAXSTATION3100M30
:DIAG_VAXSTATION3100M38
echo Running Hardware Core Test (EHKAA)
if not exist ehkaa.exe echof "\r\nMISSING - Diagnostic '%~p0ehkaa.exe' is missing\n"; exit 1
load ehkaa.exe
go -q 200
if (PC != 0x80018AD1) echof "\r\n*** FAILED - %SIM_NAME% Hardware Core Instruction test EHKAA after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"; exit 1
else echof "\r\n*** PASSED - %SIM_NAME% Hardware Core Instruction test EHKAA after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"; exit 0
:DIAG_VAX730
set env CPU_SPEED_FACTOR=320
goto CORE_DIAG
:DIAG_VAX750
set env CPU_SPEED_FACTOR=600
goto CORE_DIAG
:DIAG_VAX780
set env CPU_SPEED_FACTOR=1000
goto CORE_DIAG
:DIAG_VAX8200
set env CPU_SPEED_FACTOR=900
goto CORE_DIAG
:DIAG_VAX8600
set env CPU_SPEED_FACTOR=4000
goto CORE_DIAG
:CORE_DIAG
if (("%DIAG_UNCALIBRATED_CLOCK%") && ("%CPU_SPEED_FACTOR%" != "")) set CLOCK BASE=1995/02/01-00:00:00.000,NOCALIBRATE=%CPU_SPEED_FACTOR%K
echo Running Hardware Core Test (EVKAA)
if not exist evkaa.exe echof "\r\nMISSING - Diagnostic '%~p0evkaa.exe' is missing\n"; exit 1
load evkaa.exe
expect "Hit any key to continue" send "\r"; go -q
expect [2] "done!" echof "\r\n*** PASSED - %SIM_NAME% Hardware Core Instruction test EVKAA after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"; goto extended_tests
go -q 200
echof "\r\n*** FAILED - %SIM_NAME% Hardware Core Instruction test EVKAA after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"
exit 1
:extended_tests
reset -p
#set todr debug
#set tmr debug
#set int-clock debug=calib
#set int-clock nodebug=queue;gettime;check
if (DIAG_QUIET_MODE) echof "\nStarting VAX Diagnostic Supervisor\n"
if not exist VAX_MINIMUM_DIAGS.dsk echof "\r\nMISSING - Diagnostic disk image '%~p0VAX_MINIMUM_DIAGS.dsk' is missing\n"; exit 1
attach -rq rq0 VAX_MINIMUM_DIAGS.dsk
goto %SIM_BIN_NAME%
:VAX730
# VAX 11/730 Diagnostic Supervisor Setup for EVKAB/C/D/E
expect "DS> " send "ATTACH KA730 HUB KA0 no 0 0 2048 no no\r"; go -q
expect "DS> " send "ATTACH DW730 HUB DW0\r"; go -q
call Common
call do_test EVKAB "VAX Basic Instructions Exerciser" "" TRACE
call do_test EVKAC "VAX Floating Point Instructions Exerciser" /PASSES=2 TRACE
call do_test EVKAD "VAX Compatibility Mode Instructions Exerciser" "" TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /TEST=1:7/PASSES=1 TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /TEST=9/PASSES=1 TRACE
echof "\n*** All Diagnostic Supervisor tests PASSED after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ***\n"
echof "\n*** Processed %SIM_PROCESSED_EVENTS% events with %SIM_ASYNC_EVENTS% asynchronous events processed ***\n"
exit 0
:VAX750
# VAX 11/750 Diagnostic Supervisor Setup for EVKAB/C/D/E
expect "DS> " send "ATTACH KA750 CMI KA0 yes yes yes 0 0\r"; go -q
expect "DS> " send "ATTACH DW750 CMI DW0 8\r"; go -q
call Common
call do_test EVKAB "VAX Basic Instructions Exerciser" ""
call do_test EVKAC "VAX Floating Point Instructions Exerciser" /PASSES=2
call do_test EVKAD "VAX Compatibility Mode Instructions Exerciser" "" TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /TEST=1:7/PASSES=1 TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /TEST=9/PASSES=1 TRACE
echof "\n*** All Diagnostic Supervisor tests PASSED after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ***\n"
echof "\n*** Processed %SIM_PROCESSED_EVENTS% events with %SIM_ASYNC_EVENTS% asynchronous events processed ***\n"
exit 0
:VAX780
# VAX 11/780 Diagnostic Supervisor Setup for EVKAB/C/D/E
expect "DS> " send "ATTACH KA780 SBI KA0 yes yes 0 0\r"; go -q
expect "DS> " send "ATTACH DW780 SBI DW0 3 5\r"; go -q
call Common
call do_test EVKAB "VAX Basic Instructions Exerciser" "" TRACE
call do_test EVKAC "VAX Floating Point Instructions Exerciser" /PASSES=2 TRACE
call do_test EVKAD "VAX Compatibility Mode Instructions Exerciser" "" TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /PASSES=1 TRACE
echof "\n*** All Diagnostic Supervisor tests PASSED after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ***\n"
echof "\n*** Processed %SIM_PROCESSED_EVENTS% events with %SIM_ASYNC_EVENTS% asynchronous events processed ***\n"
exit 0
:VAX8200
# VAX 8200 Diagnostic Supervisor Setup for EVKAB/C/D/E
expect "DS> " send "ATTACH KA820 HUB KA0 4096 0\r"; go -q
expect "DS> " send "ATTACH DWBUA HUB DW0 4 5\r"; go -q
# VAX 8200 simulates the floating point accelerator which then
# inspires tests to use it. This takes more time.
set runlimit 2000M instructions
call Common
call do_test EVKAB "VAX Basic Instructions Exerciser" "" TRACE
call do_test EVKAC "VAX Floating Point Instructions Exerciser" /PASSES=2 TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /TEST=1:5/PASSES=1 TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /TEST=7:7/PASSES=1 TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /TEST=9/PASSES=1 TRACE
echof "\n*** All Diagnostic Supervisor tests PASSED after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ***\n"
echof "\n*** Processed %SIM_PROCESSED_EVENTS% events with %SIM_ASYNC_EVENTS% asynchronous events processed ***\n"
exit 0
:VAX8600
# VAX 8600 Diagnostic Supervisor Setup for EVKAB/C/D/E
expect "DS> " send "ATTACH KA780 ABUS KA0 yes yes 0 0\r"; go -q
expect "DS> " send "ATTACH DW780 ABUS DW0 3 5\r"; go -q
call Common
call do_test EVKAB "VAX Basic Instructions Exerciser" "" TRACE
call do_test EVKAC "VAX Floating Point Instructions Exerciser" "" TRACE
call do_test EVKAD "VAX Compatibility Mode Instructions Exerciser" "" TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /TEST=1:7/PASSES=1 TRACE
call do_test EVKAE "VAX Privileged Architecture Exerciser" /TEST=9/PASSES=1 TRACE
echof "\n*** All Diagnostic Supervisor tests PASSED after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ***\n"
echof "\n*** Processed %SIM_PROCESSED_EVENTS% events with %SIM_ASYNC_EVENTS% asynchronous events processed ***\n"
exit 0
:Common
expect "DS> " send "ATTACH UDA50 DW0 DUA 772150 154 5 10\r"; go -q
expect "DS> " send "ATTACH RA81 DUA DUA0\r"; go -q
expect "DS> " send "SET LOAD DUA0:[SYSMAINT]\r"; go -q
expect "DS> " send "SELECT KA0\r"; go -q
expect "DS> " echof "\r\nDiagnostic Supervisor Startup ready after %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"; show clock
boot -q RQ0 /R5:10
#set todr debug
#set tmr debug
#set int-clock debug=calib
#set int-clock nodebug=queue;gettime;check
#set nodebug
return
:do_test
set env DIAG_TEST=%1
set env DIAG_DESC=%2
set env -a DIAG_ERRORS=1
noexpect
if (SIM_REGEX_TYPE == "") echof "Missing Regular Expression support - skipping %DIAG_TEST% test\n"; exit 0
if (DIAG_QUIET_MODE) echof "\nRunning - %DIAG_DESC% %DIAG_TEST% starting after %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"
expect -r "Latency time detected: ([0-9]+) us.\r\n" show clock; go -q
expect -r "Hard error" go -q
expect -r "Pass (d+), test ([0-9][0-9]*), subtest ([0-9][0-9]*), error ([0-9][0-9]*)," set env -a DIAG_ERRORS=_EXPECT_MATCH_GROUP_4; show clock; return
expect -r "System fatal error while testing" go -q
expect -r "\.\. End of run, ([0-9][0-9]*) (error|errors) detected, pass count is [0-9][0-9]*," set env -a DIAG_ERRORS=_EXPECT_MATCH_GROUP_1; show clock; go -q
expect "DS> "
if ("%4" != "") expect "DS> "; send "SET FLAGS TRACE\r"; go -q
send "RUN %DIAG_TEST%%3\r"
go -q
if (DIAG_ERRORS > 0) goto show_log
if (DIAG_QUIET_MODE) echof "\n*** PASSED - %DIAG_DESC% %DIAG_TEST% after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"
return
:show_log
expect "DS> " send "SHOW SECTIONS\r"; expect "DS> "; go -q
send "SHOW STATUS\r"
go -q
if (DIAG_QUIET_MODE) set -q console telnet=log=diag_fail.log; set -q console telnet=nolog; type diag_fail.log;delete diag_fail.log
echof "\n*** FAILED - %DIAG_DESC% %DIAG_TEST% after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n"
echof "\n*** Processed %SIM_PROCESSED_EVENTS% events with %SIM_ASYNC_EVENTS% asynchronous events processed ***\n"
show clock
exit 1