diff --git a/VAX/tests/vax-diag_test.ini b/VAX/tests/vax-diag_test.ini index ae13610b..cd8adb16 100644 --- a/VAX/tests/vax-diag_test.ini +++ b/VAX/tests/vax-diag_test.ini @@ -82,33 +82,60 @@ goto %SIM_BIN_NAME% # 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 -goto Common +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" +echof "\n*** All Diagnostic Supervisor tests PASSED ***\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 -goto Common +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" +echof "\n*** All Diagnostic Supervisor tests PASSED ***\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 -goto Common +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" +echof "\n*** All Diagnostic Supervisor tests PASSED ***\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 -# Extended tests failing so skipped for now -echof "\n*** Diagnostic Supervisor tests SKIPPED ***\n" +expect "DS> " send "ATTACH KA820 HUB KA0 4096 0\r"; go -q +expect "DS> " send "ATTACH DWBUA HUB DW0 4 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 EVKAE "VAX Privileged Architecture Exerciser" +echof "\n*** All Diagnostic Supervisor tests PASSED ***\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 -goto Common +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" +echof "\n*** All Diagnostic Supervisor tests PASSED ***\n" +exit 0 :Common expect "DS> " send "ATTACH UDA50 DW0 DUA 772150 154 5 10\r"; go -q @@ -122,12 +149,7 @@ boot -q RQ0 /R5:10 #set int-clock debug=calib #set int-clock nodebug=queue;gettime;check #set nodebug -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" -echof "\n*** All Diagnostic Supervisor tests PASSED ***\n" -exit 0 +return :do_test set env DIAG_TEST=%1 diff --git a/VAX/vax820_bi.c b/VAX/vax820_bi.c index f75e8977..b4b050c3 100644 --- a/VAX/vax820_bi.c +++ b/VAX/vax820_bi.c @@ -46,6 +46,11 @@ #define WCSD_WR 0xFFFFFFFF /* write */ #define MBRK_RW 0x1FFF /* microbreak */ +/* Accelerator control/status register */ + +#define ACCS_ON 0x1 /* enable F-chip */ +#define ACCS_RW (ACCS_ON) + /* KA820 boot device definitions */ struct boot_dev { @@ -60,6 +65,7 @@ uint32 nexus_req[NEXUS_HLVL]; /* nexus int req */ int32 ipr_int = 0; int32 rxcd_int = 0; int32 ipir = 0; +int32 accs = 0; int32 sys_model = 0; int32 mchk_flag[KA_NUM] = { 0 }; char cpu_boot_cmd[CBUFSIZE] = { 0 }; /* boot command */ @@ -326,8 +332,8 @@ switch (rg) { val = 0; break; - case MT_ACCS: /* ACCS (not impl) */ - val = 0; + case MT_ACCS: /* ACCS */ + val = accs & ACCS_RW; break; case MT_WCSA: /* WCSA */ @@ -441,7 +447,8 @@ switch (rg) { mchk_flag[cur_cpu] = 0; break; - case MT_ACCS: /* ACCS (not impl) */ + case MT_ACCS: /* ACCS */ + accs = val & ACCS_RW; break; case MT_WCSA: /* WCSA */ @@ -695,6 +702,7 @@ return SCPE_OK; t_stat bi_reset (DEVICE *dptr) { +accs = ACCS_ON; /* enabled by default */ wcs_addr = 0; wcs_data = 0; ipr_int = 0; diff --git a/VAX/vax820_defs.h b/VAX/vax820_defs.h index 9d9321d5..efaeafef 100644 --- a/VAX/vax820_defs.h +++ b/VAX/vax820_defs.h @@ -181,6 +181,7 @@ extern t_stat cpu_show_memory (FILE* st, UNIT* uptr, int32 val, CONST void* desc /* Node window space */ #define WINAWIDTH 18 /* VAXBI node window width */ +#define WINSIZE (1u << WINAWIDTH) /* VAXBI node window length */ #define WINBASE 0x20400000 /* VAXBI node window base */ #define WINADDR(n) (WINBASE + (n << WINAWIDTH)) /* node -> window addr */ diff --git a/VAX/vax820_uba.c b/VAX/vax820_uba.c index f3276054..c0954bc3 100644 --- a/VAX/vax820_uba.c +++ b/VAX/vax820_uba.c @@ -291,17 +291,15 @@ switch (ofs) { /* case on offset */ break; case BI_SA: - *val = UBADDRBASE; - //*val = uba_biic.sa; + *val = uba_biic.sa; break; case BI_EA: - *val = UBADDRBASE + 0x40000; - //*val = uba_biic.ea; + *val = uba_biic.ea; break; case BI_BCIC: - *val = uba_biic.bcic; + *val = uba_biic.bcic & BIBCI_RD; break; case BI_UIIC: @@ -389,11 +387,8 @@ if (ofs >= UBAMAP_OF) { /* map? */ switch (ofs) { /* case on offset */ case BI_CSR: - if (val & BICSR_RST) { /* unibus power init */ + if (val & BICSR_RST) /* unibus power init */ uba_reset (&uba_dev); /* reset adapter */ - uba_aiip = 1; /* set init in prog */ - uba_ubpdn (uba_aitime); /* power fail UB */ - } uba_biic.csr = (uba_biic.csr & ~BICSR_RW) | (val & BICSR_RW); break; @@ -410,6 +405,10 @@ switch (ofs) { /* case on offset */ uba_biic.idest = val & BIID_RW; break; + case BI_BCIC: + uba_biic.bcic = val & BIBCI_RW; + break; + case BI_UIIC: break; @@ -468,7 +467,6 @@ if (ADDR_IS_IOP (pa)) { /* iopage,!init */ } uba_biic.ber = uba_biic.ber | BIBER_RDS; uba_ub_nxm (pa); /* UB nxm */ -//MACH_CHECK (MCHK_BIERR); /* machine check */ return 0; } @@ -916,6 +914,8 @@ uba_biic.csr = (1u << BICSR_V_IF) | BICSR_STS | (TR_UBA & BICSR_NODE); uba_biic.ber = 0; uba_biic.eicr = 0; uba_biic.idest = 0; +uba_biic.sa = UBADDRBASE; +uba_biic.ea = UBADDRBASE + WINSIZE; uba_biic.uiic = BIICR_EXV; uba_biic.gpr0 = BIGPR0_UPU; return SCPE_OK; diff --git a/VAX/vax_bi.h b/VAX/vax_bi.h index bda620f6..2dc2eed8 100644 --- a/VAX/vax_bi.h +++ b/VAX/vax_bi.h @@ -125,6 +125,26 @@ #define BIID_RW 0x0000FFFF #define BIID_RD BIID_RW +/* VAXBI BCI control and status register */ + +#define BIBCI_BE 0x00020000 /* burst enable */ +#define BIBCI_IPI 0x00010000 /* IPINTR/STOP */ +#define BIBCI_MCS 0x00008000 /* multicast enable */ +#define BIBCI_BDC 0x00004000 /* BDCST enable */ +#define BIBCI_STP 0x00002000 /* STOP enable */ +#define BIBCI_RSE 0x00001000 /* RESERVED enable */ +#define BIBCI_IDE 0x00000800 /* IDENT enable */ +#define BIBCI_IVE 0x00000400 /* INVAL enable */ +#define BIBCI_WRI 0x00000200 /* WRITE invalidate enable */ +#define BIBCI_UCE 0x00000100 /* user CSR space enable */ +#define BIBCI_BIE 0x00000080 /* BIIC CSR space enable */ +#define BIBCI_INE 0x00000040 /* INTR enable */ +#define BIBCI_IPE 0x00000020 /* IPINTR enable */ +#define BIBCI_PEN 0x00000010 /* pipeline next enable */ +#define BIBCI_RTO 0x00000008 /* RTO EV enable */ +#define BIBCI_RW 0x0003FFF8 +#define BIBCI_RD (BIBCI_RW) + /* VAXBI user interface interrupt control register */ #define BIICR_ABO 0xF0000000 /* interrupt abort */