From 9cc538dc7c527c1274c2c3b66366abdcbe1fd259 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 31 Jan 2023 02:47:31 -1000 Subject: [PATCH] VAX Unibus Systems: Optionally run diagnostics with uncalibrated clock - uncalibrated clock mode executes at a precisely specified instruction rate relative to pseudo wall clock time independent of the host computer's speed or other loads on the host system. - Provide additional failure state if/when diagnostics fail. --- VAX/tests/vax-diag_test.ini | 65 ++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/VAX/tests/vax-diag_test.ini b/VAX/tests/vax-diag_test.ini index 8936e077..b76d9894 100644 --- a/VAX/tests/vax-diag_test.ini +++ b/VAX/tests/vax-diag_test.ini @@ -6,6 +6,11 @@ :: 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. +:: :: The related diagnostic files must be located in the same directory :: as this procedure. :: @@ -23,9 +28,13 @@ 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 -else set -qu console telnet=localhost:65432,telnet=buffered; set env -a DIAG_QUIET_MODE=1 +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 @@ -85,63 +94,68 @@ goto %SIM_BIN_NAME% :VAX730 # VAX 11/730 Diagnostic Supervisor Setup for EVKAB/C/D/E +set env CPU_SPEED_FACTOR=300 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" -call do_test EVKAC "VAX Floating Point Instructions Exerciser" /PASSES=2 -call do_test EVKAD "VAX Compatibility Mode Instructions Exerciser" -#call do_test EVKAE "VAX Privileged Architecture Exerciser" +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" exit 0 :VAX750 # VAX 11/750 Diagnostic Supervisor Setup for EVKAB/C/D/E +set env CPU_SPEED_FACTOR=600 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" -#call do_test EVKAE "VAX Privileged Architecture Exerciser" +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" /PASSES=1 TRACE echof "\n*** All Diagnostic Supervisor tests PASSED after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ***\n" exit 0 :VAX780 # VAX 11/780 Diagnostic Supervisor Setup for EVKAB/C/D/E +set env CPU_SPEED_FACTOR=1000 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" -call do_test EVKAC "VAX Floating Point Instructions Exerciser" /PASSES=2 -call do_test EVKAD "VAX Compatibility Mode Instructions Exerciser" -#call do_test EVKAE "VAX Privileged Architecture Exerciser" +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" exit 0 :VAX8200 # VAX 8200 Diagnostic Supervisor Setup for EVKAB/C/D/E +set env CPU_SPEED_FACTOR=900 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" -call do_test EVKAC "VAX Floating Point Instructions Exerciser" /PASSES=2 -#call do_test EVKAE "VAX Privileged Architecture Exerciser" +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" /PASSES=1 TRACE echof "\n*** All Diagnostic Supervisor tests PASSED after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ***\n" exit 0 :VAX8600 # VAX 8600 Diagnostic Supervisor Setup for EVKAB/C/D/E +set env CPU_SPEED_FACTOR=4000 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" -call do_test EVKAC "VAX Floating Point Instructions Exerciser" -call do_test EVKAD "VAX Compatibility Mode Instructions Exerciser" -#call do_test EVKAE "VAX Privileged Architecture Exerciser" +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" /PASSES=1 TRACE echof "\n*** All Diagnostic Supervisor tests PASSED after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ***\n" exit 0 @@ -151,6 +165,7 @@ 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> " +if (("%DIAG_UNCALIBRATED_CLOCK%") && ("%CPU_SPEED_FACTOR%" != "")) set CLOCK NOCALIBRATE=%CPU_SPEED_FACTOR%K boot -q RQ0 /R5:10 #set todr debug #set tmr debug @@ -165,18 +180,22 @@ 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 "Hard error" go -q -expect -r "Pass 1, test ([0-9][0-9]*), subtest ([0-9][0-9]*), error ([0-9][0-9]*)," set env -a DIAG_ERRORS=_EXPECT_MATCH_GROUP_3; return +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; 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; go -q expect "DS> " -if (DIAG_QUIET_MODE) echof "\nRunning - %DIAG_DESC% %DIAG_TEST% starting after %SIM_RUNTIME% %SIM_RUNTIME_UNITS%\n" +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" exit 1