diff --git a/README.md b/README.md index d35e5a94..1cad229b 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ For more information look into: sections on [feature set](https://wfjm.github.io/home/w11/impl/) and [overall architecture](https://wfjm.github.io/home/w11/impl/architecture.html). - w11 project [blog](https://wfjm.github.io/blogs/w11/). -- [change log](doc/CHANGELOG.md). +- [change log](doc/CHANGELOG.md) and [installation notes](doc/INSTALL.md). -- guides to build bit files and test benches. +- guides to build bit files and test benches with [Xilinx Vivado](doc/README_buildsystem_Vivado.md) and [Xilinx ISE](doc/README_buildsystem_ISE.md). - guides to [run test benches](doc/w11a_tb_guide.md) diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 6d5a8b0e..cac2269b 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -28,6 +28,7 @@ software or firmware builds or that the documentation is consistent. The full set of tests is only run for tagged releases. ### Summary +- Doxygen support now for V1.9.6 ### New features - tools/mcode: added folders rk11 and rlink ### Changes diff --git a/doc/w11a_os_guide.md b/doc/w11a_os_guide.md index 49f6a05d..a7eaa141 100644 --- a/doc/w11a_os_guide.md +++ b/doc/w11a_os_guide.md @@ -13,11 +13,11 @@ be installed separately, see instructions in the respective READMEs. The typical startup procedure starts some `vt100` emulator windows with the `console_starter` and executes the backend server like -``` - cd $RETROBASE/tools/oskit/ - console_starter -d DL0 & - console_starter -d DL1 & - ti_w11 @_boot.tcl +```bash + cd $RETROBASE/tools/oskit/ + console_starter -d DL0 & + console_starter -d DL1 & + ti_w11 @_boot.tcl ``` with the options `` as described in [Rlink and Backend Server setup](w11a_backend_setup.md). diff --git a/doc/w11a_simh_setup.md b/doc/w11a_simh_setup.md index 229aeeca..3800f2a7 100644 --- a/doc/w11a_simh_setup.md +++ b/doc/w11a_simh_setup.md @@ -21,14 +21,15 @@ finished. All examples below use the same basic setup - set up vt100 emulator window for 1st and 2nd DL11 - - console_starter -s -d DL0 & - console_starter -s -d DL1 & - + ```bash + console_starter -s -d DL0 & + console_starter -s -d DL1 & + ``` **Note**: the `-s` ensures that the port numbers used by SimH are taken! - the simulator is usually started with `.scmd` command file, for [oskits](../tools/oskit/README.md) for example with - - cd $RETROBASE/tools/oskit/ - pdp11 _boot.scmd + ```bash + cd $RETROBASE/tools/oskit/ + pdp11 _boot.scmd + ``` diff --git a/tools/asm-11/lib/vec_cpucatch.mac b/tools/asm-11/lib/vec_cpucatch.mac index 0cbad18c..86bd2ffe 100644 --- a/tools/asm-11/lib/vec_cpucatch.mac +++ b/tools/asm-11/lib/vec_cpucatch.mac @@ -1,4 +1,4 @@ -; $Id: vec_cpucatch.mac 1357 2023-01-26 19:24:10Z mueller $ +; $Id: vec_cpucatch.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later ; Copyright 2013-2023 by Walter F.J. Mueller ; @@ -16,4 +16,3 @@ vecini 240,v..pir ; vec 240 (PIRQ) vecini 244,v..fpp ; vec 244 (FPP) vecini 250,v..mmu ; vec 250 (MMU) -; diff --git a/tools/asm-11/lib/vec_cpucatch_reset.mac b/tools/asm-11/lib/vec_cpucatch_reset.mac index 3f6738d7..40dc94e5 100644 --- a/tools/asm-11/lib/vec_cpucatch_reset.mac +++ b/tools/asm-11/lib/vec_cpucatch_reset.mac @@ -1,4 +1,4 @@ -; $Id: vec_cpucatch_reset.mac 1357 2023-01-26 19:24:10Z mueller $ +; $Id: vec_cpucatch_reset.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later ; Copyright 2015-2023 by Walter F.J. Mueller ; @@ -16,4 +16,3 @@ vecclr v..pir ; vec 240 (PIRQ) vecclr v..fpp ; vec 244 (FPP) vecclr v..mmu ; vec 250 (MMU) -; diff --git a/tools/asm-11/lib/vec_devcatch.mac b/tools/asm-11/lib/vec_devcatch.mac index 61c93b9d..7d1efd89 100644 --- a/tools/asm-11/lib/vec_devcatch.mac +++ b/tools/asm-11/lib/vec_devcatch.mac @@ -1,4 +1,4 @@ -; $Id: vec_devcatch.mac 1357 2023-01-26 19:24:10Z mueller $ +; $Id: vec_devcatch.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later ; Copyright 2015-2023 by Walter F.J. Mueller ; @@ -49,4 +49,3 @@ vecini 304,v..d2t ; vec 304 (DL11-TX 2nd) vecini 310,v..dzr ; vec 310 (DZ11-RX) vecini 314,v..dzt ; vec 314 (DZ11-TX) -; diff --git a/tools/asm-11/lib/vec_devcatch_reset.mac b/tools/asm-11/lib/vec_devcatch_reset.mac index 34c39a26..359a9afb 100644 --- a/tools/asm-11/lib/vec_devcatch_reset.mac +++ b/tools/asm-11/lib/vec_devcatch_reset.mac @@ -1,4 +1,4 @@ -; $Id: vec_devcatch_reset.mac 1357 2023-01-26 19:24:10Z mueller $ +; $Id: vec_devcatch_reset.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later ; Copyright 2015-2023 by Walter F.J. Mueller ; @@ -23,4 +23,3 @@ vecclr v..d2t ; vec 304 (DL11-TX 2nd) vecclr v..dzr ; vec 310 (DZ11-RX) vecclr v..dzt ; vec 314 (DZ11-TX) -; diff --git a/tools/dox/w11_cpp.Doxyfile b/tools/dox/w11_cpp.Doxyfile index 902a02fd..0e025373 100644 --- a/tools/dox/w11_cpp.Doxyfile +++ b/tools/dox/w11_cpp.Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.9.5 +# Doxyfile 1.9.6 #--------------------------------------------------------------------------- # Project related configuration options @@ -104,6 +104,7 @@ WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_IF_INCOMPLETE_DOC = YES WARN_NO_PARAMDOC = NO +WARN_IF_UNDOC_ENUM_VAL = NO WARN_AS_ERROR = NO WARN_FORMAT = "$file:$line: $text" WARN_LINE_FORMAT = "at line $line of file $file" diff --git a/tools/dox/w11_vhd_all.Doxyfile b/tools/dox/w11_vhd_all.Doxyfile index 95365e3a..57cbbf15 100644 --- a/tools/dox/w11_vhd_all.Doxyfile +++ b/tools/dox/w11_vhd_all.Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.9.5 +# Doxyfile 1.9.6 #--------------------------------------------------------------------------- # Project related configuration options @@ -104,6 +104,7 @@ WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_IF_INCOMPLETE_DOC = YES WARN_NO_PARAMDOC = NO +WARN_IF_UNDOC_ENUM_VAL = NO WARN_AS_ERROR = NO WARN_FORMAT = "$file:$line: $text" WARN_LINE_FORMAT = "at line $line of file $file" diff --git a/tools/mcode/.gitignore b/tools/mcode/.gitignore index 3296df07..a7bd1de6 100644 --- a/tools/mcode/.gitignore +++ b/tools/mcode/.gitignore @@ -9,3 +9,7 @@ tmu_ofile # Simh stuff simh_*.dat + +# w11 stuff +w11_*.dat +tirri_*.dat diff --git a/tools/mcode/README.md b/tools/mcode/README.md index c8c75398..6eeac898 100644 --- a/tools/mcode/README.md +++ b/tools/mcode/README.md @@ -1,4 +1,7 @@ -This directory tree contains **miscellaneous codes** and is organized in +This directory tree contains **miscellaneous codes**. + +The _mcodes_ are MACRO-11 stand-alone codes. They demonstrate system or +device capabilities or measure performance. The tree is organized in | Directory | Content | | --------- | ------- | @@ -10,3 +13,4 @@ This directory tree contains **miscellaneous codes** and is organized in | [rk11](rk11) | for RK11 | | [rlink](rlink) | for rlink | | [sys](sys) | for whole system | +| [tm11](tm11) | for TM11 | diff --git a/tools/mcode/dl11/README.md b/tools/mcode/dl11/README.md index 6c4a7328..fbc58a0e 100644 --- a/tools/mcode/dl11/README.md +++ b/tools/mcode/dl11/README.md @@ -1,5 +1,5 @@ This directory tree contains **DL11 test codes** and contains | File | Docu | Comments | -| --------- | --------- | ------- | -| [dl11echo.mac](dl11echo.mac) | - | echo test for DL11 | +| ---- | ---- | -------- | +| [dl11echo.mac](dl11echo.mac) | [docu](dl11echo.md) | echo test for DL11 | diff --git a/tools/mcode/dl11/dl11echo.mac b/tools/mcode/dl11/dl11echo.mac index b31ee85d..6587d055 100644 --- a/tools/mcode/dl11/dl11echo.mac +++ b/tools/mcode/dl11/dl11echo.mac @@ -1,15 +1,16 @@ -; $Id: dl11echo.mac 1275 2022-08-10 08:10:40Z mueller $ +; $Id: dl11echo.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2019-2022 by Walter F.J. Mueller +; Copyright 2019-2023 by Walter F.J. Mueller ; ; Revision History: ; Date Rev Version Comment +; 2023-02-04 1367 1.0.2 use .mcall and vecdef ; 2022-08-09 1275 1.0.1 use call/return ; 2019-04-21 1134 1.0 Initial version ; ; DL11 echo -; default is direct echo, only modification is to add a LF after CR -; other mode can be selected by two ESC plus a character: +; Default is direct echo, only modification is to add a LF after CR. +; Other modes can be selected by two ESC plus a character: ; ESC + ESC + u -> uppercase ; ESC + ESC + l -> lowercase ; ESC + ESC + o -> octal echo (16 per line) @@ -32,18 +33,11 @@ ; .include |lib/vec_cpucatch.mac| .include |lib/vec_devcatch.mac| - - . = v..tti ; DL11 rx vector - .word vh.tti - .word cp.ars!cp.pr7 ; use alt-reg-set ! - - . = v..tto ; DL11 tx vector - .word vh.tto - .word cp.ars!cp.pr7 ; use alt-reg-set ! - - . = v..kwl ; KW11-L vector - .word vh.kwl - .word cp.ars!cp.pr7 ; use alt-reg-set ! + .mcall vecdef +; + vecdef v..tti,vh.tti,cp.ars!cp.pr7 ; DL11 rx vector, alt-reg-set ! + vecdef v..tto,vh.tto,cp.ars!cp.pr7 ; DL11 tx vector, alt-reg-set ! + vecdef v..kwl,vh.kwl,cp.ars!cp.pr7 ; KW11-L vector, alt-reg-set ! ; ; stack area ----------------------------------------------- ; diff --git a/tools/mcode/dl11/dl11echo.md b/tools/mcode/dl11/dl11echo.md new file mode 100644 index 00000000..a04a359d --- /dev/null +++ b/tools/mcode/dl11/dl11echo.md @@ -0,0 +1,31 @@ +# DL11 echo tester + +The `dl11echo` code simply echos any input entered on the console DL11 device. +Default is direct echo, only modification is to add a `LF` after `CR`. +Other modes can be selected by two ESC plus a character: +``` + ESC + ESC + u -> uppercase + ESC + ESC + l -> lowercase + ESC + ESC + o -> octal echo (16 per line) + ESC + ESC + a -> direct echo +``` +If the board has LEDs they will show an RSX-style light pattern. + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +Start `dl11echo` on an FPGA board or a GHDL simulation with +```bash + console_starter -d DL0 & + ti_w11 @dl11echo_run.tcl +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). + +### Start on SimH +```bash + console_starter -s -d DL0 & + pdp11 dl11echo.scmd +``` diff --git a/tools/mcode/dl11/dl11echo.scmd b/tools/mcode/dl11/dl11echo.scmd index ee660480..88a69001 100644 --- a/tools/mcode/dl11/dl11echo.scmd +++ b/tools/mcode/dl11/dl11echo.scmd @@ -1,4 +1,4 @@ -; $Id: dl11echo.scmd 1275 2022-08-10 08:10:40Z mueller $ +; $Id: dl11echo.scmd 1367 2023-02-06 14:11:34Z mueller $ ; ; Setup file for dl11echo ; @@ -10,4 +10,7 @@ do ../../simh/setup_w11a_mcode.scmd set cons telnet=5670 ; load dl11echo.lda +; +echo stop with ^E and q +; cont diff --git a/tools/mcode/dl11/dl11echo_run.tcl b/tools/mcode/dl11/dl11echo_run.tcl new file mode 100644 index 00000000..092ce274 --- /dev/null +++ b/tools/mcode/dl11/dl11echo_run.tcl @@ -0,0 +1,9 @@ +# $Id: dl11echo_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +rw11::setup_tt cpu0 +cpu0 ldasm -file dl11echo.mac -sym sym +cpu0 cp -stapc $sym(...end) +# +puts "dl11echo running, quit with .qq" diff --git a/tools/mcode/dz11/README.md b/tools/mcode/dz11/README.md new file mode 100644 index 00000000..f8dd235d --- /dev/null +++ b/tools/mcode/dz11/README.md @@ -0,0 +1,5 @@ +This directory tree contains **DZ11 test codes** and contains + +| File | Docu | Comments | +| ---- | ---- | -------- | +| [dz11echo.mac](dz11echo.mac) | [docu](dz11echo.md) | echo test for DZ11 | diff --git a/tools/mcode/dz11/dz11echo.mac b/tools/mcode/dz11/dz11echo.mac index a9caad07..7bc4716b 100644 --- a/tools/mcode/dz11/dz11echo.mac +++ b/tools/mcode/dz11/dz11echo.mac @@ -1,16 +1,17 @@ -; $Id: dz11echo.mac 1275 2022-08-10 08:10:40Z mueller $ +; $Id: dz11echo.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2019-2022 by Walter F.J. Mueller +; Copyright 2019-2023 by Walter F.J. Mueller ; ; Revision History: ; Date Rev Version Comment +; 2023-02-04 1367 1.1.1 use .mcall and vecdef ; 2022-08-09 1275 1.1 use call/return; better ? text, startup message ; 2019-05-25 1152 1.0 Initial version ; 2019-05-05 1147 0.1 First draft ; ; DZ11 echo -; default is direct echo, only modification is to add a LF after CR -; other mode can be selected by two ESC plus a character: +; Default is direct echo, only modification is to add a LF after CR. +; Other mode can be selected by two ESC plus a character: ; ESC + ESC + u -> uppercase ; ESC + ESC + l -> lowercase ; ESC + ESC + o -> octal echo (16 per line) @@ -59,26 +60,13 @@ ; .include |lib/vec_cpucatch.mac| .include |lib/vec_devcatch.mac| - - . = v..tti ; DL11 rx vector - .word vh.tti - .word cp.ars!cp.pr7 ; use alt-reg-set ! - - . = v..tto ; DL11 tx vector - .word vh.tto - .word cp.ars!cp.pr7 ; use alt-reg-set ! - - . = v..kwl ; KW11-L vector - .word vh.kwl - .word cp.ars!cp.pr7 ; use alt-reg-set ! - - . = v..dzr ; DZ11 rx vector - .word vh.dzr - .word cp.ars!cp.pr7 ; use alt-reg-set ! - - . = v..dzt ; DZ11 tx vector - .word vh.dzt - .word cp.ars!cp.pr7 ; use alt-reg-set ! + .mcall vecdef +; + vecdef v..tti,vh.tti,cp.ars!cp.pr7 ; DL11 rx vector, alt-reg-set ! + vecdef v..tto,vh.tto,cp.ars!cp.pr7 ; DL11 tx vector, alt-reg-set ! + vecdef v..kwl,vh.kwl,cp.ars!cp.pr7 ; KW11-L vector, alt-reg-set ! + vecdef v..dzr,vh.dzr,cp.ars!cp.pr7 ; DZ11 rx vector, alt-reg-set ! + vecdef v..dzt,vh.dzt,cp.ars!cp.pr7 ; DZ11 tx vector, alt-reg-set ! ; ; stack area ----------------------------------------------- ; @@ -101,13 +89,14 @@ start: mov #stack,sp ; setup stack clrb @#dz.brk ; no brk ; spl 7 - mov #ti.ie,@#ti.csr ; activate console input - mov #kl.ie,@#kl.csr ; activate clock - mov #,@#dz.csr - spl 0 ; allow interrupts + mov #ti.ie,@#ti.csr ;;; activate console input + mov #kl.ie,@#kl.csr ;;; activate clock + mov #,@#dz.csr ;;; ; - mov #msgsta,r1 ; print startup message - call dlwstr + mov #msgsta,r1 ;;; print startup message + call dlwstr ;;; +; + spl 0 ; allow interrupts ; ; blinking lights null task (pattern setup in clock handler) ; diff --git a/tools/mcode/dz11/dz11echo.md b/tools/mcode/dz11/dz11echo.md new file mode 100644 index 00000000..044ba8fa --- /dev/null +++ b/tools/mcode/dz11/dz11echo.md @@ -0,0 +1,61 @@ +# DZ11 echo tester + +The `dz11echo` code echos any input entered or prints generated output on +all DZ11 lines. +Default is direct echo, only modification is to add a `LF` after `CR`. +Other modes can be selected by two ESC plus a character: +``` + ESC + ESC + u -> uppercase + ESC + ESC + l -> lowercase + ESC + ESC + o -> octal echo (16 per line) + ESC + ESC + a -> direct echo +``` +The DZ11 device and line state and automatic generation of output can be +controlled and inspected via single character commands entered on the console +``` + ? help text + c char: only rie + s silo: only sae + a auto: rie or sae + i info: print line status + 0-7 define current line + h hangup: set dtr=0 + r ready: set dtr=1 + b break: set brk=0 and send one char + u unbreak: set brk=1 + g generate test output on line + q quit generating test output +``` +`0` selects line 0, and a subsequent `g` will start generated output on that +line 0. + +If the board has LEDs the light pattern depends on DZ11 device state +``` + no lines connected: 2.11BSD style + >0 lines connected: RSX11-M style + ring active: msb: 11111111-00000000 lsb: ring mask + co change: : msb: 10101010-01010101 lsb: co mask +``` + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +Start `dl11echo` on an FPGA board for 2 DZ windows with +```bash + console_starter -d DL0 & + console_starter -d DZ0 & + console_starter -d DZ1 & + ti_w11 @dz11echo_run.tcl +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). + +### Start on SimH +```bash + console_starter -s -d DL0 & + console_starter -s -d DZ0 & + console_starter -s -d DZ1 & + pdp11 dz11echo.scmd +``` diff --git a/tools/mcode/dz11/dz11echo.scmd b/tools/mcode/dz11/dz11echo.scmd index e5c56689..a855c2fb 100644 --- a/tools/mcode/dz11/dz11echo.scmd +++ b/tools/mcode/dz11/dz11echo.scmd @@ -1,4 +1,4 @@ -; $Id: dz11echo.scmd 1275 2022-08-10 08:10:40Z mueller $ +; $Id: dz11echo.scmd 1367 2023-02-06 14:11:34Z mueller $ ; ; Setup file for dz11echo ; @@ -10,4 +10,7 @@ set cons telnet=5670 att dz -m 5672 ; load dz11echo.lda +; +echo stop with ^E and q +; cont diff --git a/tools/mcode/dz11/dz11echo_run.tcl b/tools/mcode/dz11/dz11echo_run.tcl new file mode 100644 index 00000000..c57fcefb --- /dev/null +++ b/tools/mcode/dz11/dz11echo_run.tcl @@ -0,0 +1,9 @@ +# $Id: dz11echo_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +rw11::setup_tt cpu0 ndl 1 ndz 8 dzmodcntl 1 +cpu0 ldasm -file dz11echo.mac -sym sym +cpu0 cp -stapc $sym(...end) +# +puts "dz11echo running, quit with .qq" diff --git a/tools/mcode/lp11/README.md b/tools/mcode/lp11/README.md index 3c087724..fa2af7d6 100644 --- a/tools/mcode/lp11/README.md +++ b/tools/mcode/lp11/README.md @@ -1,5 +1,5 @@ This directory tree contains **LP11 test codes** and contains | File | Docu | Comments | -| --------- | --------- | ------- | -| [lp11write.mac](lp11write.mac) | - | write test for LP11 | +| ---- | ---- | -------- | +| [lp11write.mac](lp11write.mac) | [docu](lp11write.md) | write test for LP11 | diff --git a/tools/mcode/lp11/lp11write.mac b/tools/mcode/lp11/lp11write.mac index fd7ab3ea..782bfbfa 100644 --- a/tools/mcode/lp11/lp11write.mac +++ b/tools/mcode/lp11/lp11write.mac @@ -1,9 +1,10 @@ -; $Id: lp11write.mac 1276 2022-08-12 10:25:13Z mueller $ +; $Id: lp11write.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2019-2022 by Walter F.J. Mueller +; Copyright 2019-2023 by Walter F.J. Mueller ; ; Revision History: ; Date Rev Version Comment +; 2023-02-04 1367 1.0.3 use .mcall and vecdef; fix stop handling ; 2022-08-10 1276 1.0.2 check line count after last char is accepted ; 2022-08-09 1275 1.0.1 use call/return ; 2019-04-21 1134 1.0 Initial version @@ -24,10 +25,9 @@ ; .include |lib/vec_cpucatch.mac| .include |lib/vec_devcatch.mac| - - . = v..lp - .word vh.lp - .word cp.pr7 + .mcall vecdef +; + vecdef v..lp,vh.lp ; ; stack area ----------------------------------------------- ; @@ -43,8 +43,8 @@ stack: ; start/stop area --------------------------------- ; start: br start1 -stop: halt ; sucessfull stop - reset ; and allow re-start +stop1: halt ; sucessfull stop +stop: reset ; and allow re-start ; ; main program ------------------------------------ ; @@ -86,7 +86,7 @@ vh.lp: tst @#lp.csr ; printer offline ? mov #bnum,r1 ; ready for next line rti -200$: jmp stop +200$: jmp stop1 perr: halt ; printer error halt br perr diff --git a/tools/mcode/lp11/lp11write.md b/tools/mcode/lp11/lp11write.md new file mode 100644 index 00000000..f67380d6 --- /dev/null +++ b/tools/mcode/lp11/lp11write.md @@ -0,0 +1,28 @@ +# LP11 write tester + +The `lp11write` code prints 1000 lines of the form +``` +0000: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*() +0001: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*() +... +0999: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*() +``` + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +Start `lp11write` on an FPGA board with +```bash +ti_w11 -b @lp11write_run.tcl +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). +The run will produce a file `w11_lp11write.dat`. + +### Start on SimH +```bash +pdp11 lp11write.scmd +``` +The run will produce a file `simh_lp11write.dat`. diff --git a/tools/mcode/lp11/lp11write.scmd b/tools/mcode/lp11/lp11write.scmd index ef518f9d..a787653f 100644 --- a/tools/mcode/lp11/lp11write.scmd +++ b/tools/mcode/lp11/lp11write.scmd @@ -1,4 +1,4 @@ -; $Id: lp11write.scmd 1275 2022-08-10 08:10:40Z mueller $ +; $Id: lp11write.scmd 1367 2023-02-06 14:11:34Z mueller $ ; ; Setup file for lp11write ; @@ -12,3 +12,4 @@ att lpt simh_lp11write.dat ; load lp11write.lda cont +quit diff --git a/tools/mcode/lp11/lp11write_run.tcl b/tools/mcode/lp11/lp11write_run.tcl new file mode 100644 index 00000000..87e96664 --- /dev/null +++ b/tools/mcode/lp11/lp11write_run.tcl @@ -0,0 +1,8 @@ +# $Id: lp11write_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +cpu0lpa0 att w11_lp11write.dat +cpu0 ldasm -file lp11write.mac -sym sym +cpu0 cp -stapc $sym(...end) +rw11::asmwait cpu0 sym diff --git a/tools/mcode/m9312/README.md b/tools/mcode/m9312/README.md new file mode 100644 index 00000000..ec354b81 --- /dev/null +++ b/tools/mcode/m9312/README.md @@ -0,0 +1,5 @@ +This directory tree contains **M9312 boot codes** and contains + +| File | Docu | Comments | +| ---- | ---- | -------- | +| [bootw11.mac](bootw11.mac) | [docu](bootw11.md) | Interactive boot | diff --git a/tools/mcode/m9312/bootw11.mac b/tools/mcode/m9312/bootw11.mac index 4f83bf92..5dc980c4 100644 --- a/tools/mcode/m9312/bootw11.mac +++ b/tools/mcode/m9312/bootw11.mac @@ -1,6 +1,6 @@ -; $Id: bootw11.mac 1275 2022-08-10 08:10:40Z mueller $ +; $Id: bootw11.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2019-2022 by Walter F.J. Mueller +; Copyright 2019-2023 by Walter F.J. Mueller ; ; Revision History: ; Date Rev Version Comment @@ -161,7 +161,10 @@ bootgo: clr r2 ; why ? clr pc ; ; RK11 boot loader +++++++++++++++++++++++++++++++++++++++++ -; RK boot loader code adapted from simh project +; RK boot loader code adapted from SimH project +; in r0 unit number +; out r0 unit number +; out r1 csr address ; .include |lib/defs_rk.mac| ; @@ -184,7 +187,10 @@ bootrk: mov r0,r3 jmp bootgo ; ; RL11 boot loader +++++++++++++++++++++++++++++++++++++++++ -; RL boot loader code adapted from simh project +; RL boot loader code adapted from SimH project +; in r0 unit number +; out r0 unit number +; out r1 csr address ; .include |lib/defs_rl.mac| ; @@ -229,7 +235,10 @@ bootrl: mov r0,r3 jmp bootgo ; ; RH70 boot loader +++++++++++++++++++++++++++++++++++++++++ -; RH70 boot loader code adapted from simh project +; RH70 boot loader code adapted from SimH project +; in r0 unit number +; out r0 unit number +; out r1 csr address ; .include |lib/defs_rp.mac| ; @@ -259,7 +268,10 @@ bootrp: mov #rp.cs1,r1 ; . = hirom ; ; TM11 boot loader +++++++++++++++++++++++++++++++++++++++++ -; TM boot loader code adapted from simh project +; TM boot loader code adapted from SimH project +; in r0 unit number +; out r0 unit number +; out r1 csr address ; .include |lib/defs_tm.mac| boottm: mov #tm.cr,r1 ; load csr @@ -288,6 +300,8 @@ boottm: mov #tm.cr,r1 ; load csr ; ; PC11 boot loader +++++++++++++++++++++++++++++++++++++++++ ; PC boot loader code adapted pc11boot.mac +; loads lda file from PR0 and starts loaded code at transfer address or +; or at 0200 in case none is given ; .include |lib/defs_pc.mac| ; diff --git a/tools/mcode/m9312/bootw11.md b/tools/mcode/m9312/bootw11.md new file mode 100644 index 00000000..4446a528 --- /dev/null +++ b/tools/mcode/m9312/bootw11.md @@ -0,0 +1,41 @@ +# M9312: bootw11: interactive boot + +The `bootw11` code is a proof-of-principle boot code for the w11. +Intended usage is the test of the M9312 emulation. It supports +- DK: RK11/RK05 boot +- DL: RL11/RL02 boot +- DB: RH70/RP06 boot +- MT: TM11 boot +- PR: PC11 boot + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +First, connect to an FPGA board or in a GHDL simulation with +```bash +ti_w11 +``` +Then load the `bootw11` code into the emulated M9312. Because software +sees the M9312 as a read-only memory area, the code can't be loaded with +the usual methods. Instead, a dedicated interface is used: +``` + package require ibd_m9312 + set start [ibd_m9312::load cpu0 "bootw11.mac"] +``` +The code is started with +``` + cpu0 cp -stapc $start +``` +and writes a `@` prompt to console. To test a boot device, first attach +a bootable disk or a `ram:` disk with dummy boot block, and then enter the +boot device name, with optional unit number and a `CR`. Like +``` + cpu0rka0 att "ram:dk0?noboot;pat=dead" + < DK0 +``` +This uses the `<` command that injects tests into the console directly. +The dummy boot block will write a message to console and halt the CPU. +The code can be restarted, it's in an emulated PROM after all, for additional +tests. diff --git a/tools/mcode/pc11/README.md b/tools/mcode/pc11/README.md index be8ab623..99fdbc0b 100644 --- a/tools/mcode/pc11/README.md +++ b/tools/mcode/pc11/README.md @@ -1,7 +1,7 @@ This directory tree contains **PC11 test codes** and contains | File | Docu | Comments | -| --------- | --------- | ------- | -| [pc11copy.mac](pc11copy.mac) | - | copy test for PC11 | -| [pc11read.mac](pc11read.mac) | - | read test for PC11 | -| [pc11write.mac](pc11write.mac) | - | write test for PC11 | +| ---- | ---- | -------- | +| [pc11copy.mac](pc11copy.mac) | [docu](pc11wcr.md) | copy test for PC11 | +| [pc11read.mac](pc11read.mac) | [docu](pc11wcr.md) | read test for PC11 | +| [pc11write.mac](pc11write.mac) | [docu](pc11wcr.md) | write test for PC11 | diff --git a/tools/mcode/pc11/pc11copy.mac b/tools/mcode/pc11/pc11copy.mac index 6a9240ed..6844a9e6 100644 --- a/tools/mcode/pc11/pc11copy.mac +++ b/tools/mcode/pc11/pc11copy.mac @@ -1,9 +1,10 @@ -; $Id: pc11copy.mac 1277 2022-08-12 15:00:20Z mueller $ +; $Id: pc11copy.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2019-2022 by Walter F.J. Mueller +; Copyright 2019-2023 by Walter F.J. Mueller ; ; Revision History: ; Date Rev Version Comment +; 2023-02-04 1367 1.2.1 use .mcall and vecdef; fix stop handling ; 2022-08-10 1276 1.2 kw11-p: use 100 kHz/13.; ensure last puncher irupt ; 2019-04-25 1138 1.1 add kw11-l/p stress ; 2019-04-21 1134 1.0 Initial version @@ -26,23 +27,12 @@ ; .include |lib/vec_cpucatch.mac| .include |lib/vec_devcatch.mac| - - . = v..ptr ; PC11 pr vector - .word vh.ptr - .word cp.pr7 - - . = v..ptp ; PC11 pp vector - .word vh.ptp - .word cp.pr7 - - . = v..kwl ; KW11-L vector - .word vh.kwl - .word cp.ars!cp.pr7 ; use alt-reg-set ! - - . = v..kwp ; KW11-P vector - .word vh.kwp - .word cp.ars!cp.pr7 ; use alt-reg-set ! - + .mcall vecdef +; + vecdef v..ptr,vh.ptr ; PC11 pr vector + vecdef v..ptp,vh.ptp ; PC11 pp vector + vecdef v..kwl,vh.kwl,cp.ars!cp.pr7 ; KW11-L vector, alt-reg-set ! + vecdef v..kwp,vh.kwp,cp.ars!cp.pr7 ; KW11-P vector, alt-reg-set ! ; ; stack area ----------------------------------------------- ; @@ -62,8 +52,8 @@ stack: ; start/stop area --------------------------------- ; start: br start1 -stop: halt ; sucessfull stop - reset ; and allow re-start +stop1: halt ; sucessfull stop +stop: reset ; and allow re-start ; ; main program ------------------------------------ ; @@ -129,7 +119,7 @@ vh.ptr: tst @#pr.csr ; at eof ? beq 320$ ; if not stop wait ; if yes wait br 310$ -320$: jmp stop +320$: jmp stop1 rerr: halt ; reader error halt br rerr @@ -161,7 +151,7 @@ vh.ptp: tst @#pp.csr ; punch error bic #pp.ie,@#pp.csr ; otherwise stop punch 110$: rti -200$: jmp stop +200$: jmp stop1 perr: halt ; puncher error halt br perr diff --git a/tools/mcode/pc11/pc11copy.scmd b/tools/mcode/pc11/pc11copy.scmd index 758667f0..93e74e7c 100644 --- a/tools/mcode/pc11/pc11copy.scmd +++ b/tools/mcode/pc11/pc11copy.scmd @@ -1,4 +1,4 @@ -; $Id: pc11copy.scmd 1275 2022-08-10 08:10:40Z mueller $ +; $Id: pc11copy.scmd 1367 2023-02-06 14:11:34Z mueller $ ; ; Setup file for pc11copy ; @@ -13,3 +13,4 @@ att ptp simh_pc11copy.dat ; load pc11copy.lda cont +quit diff --git a/tools/mcode/pc11/pc11copy_run.tcl b/tools/mcode/pc11/pc11copy_run.tcl new file mode 100644 index 00000000..f257c313 --- /dev/null +++ b/tools/mcode/pc11/pc11copy_run.tcl @@ -0,0 +1,9 @@ +# $Id: pc11copy_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +cpu0pr att w11_pc11write.dat +cpu0pp att w11_pc11copy.dat +cpu0 ldasm -file pc11copy.mac -sym sym +cpu0 cp -stapc $sym(...end) +rw11::asmwait cpu0 sym diff --git a/tools/mcode/pc11/pc11read.mac b/tools/mcode/pc11/pc11read.mac index eb5bf4bd..af053379 100644 --- a/tools/mcode/pc11/pc11read.mac +++ b/tools/mcode/pc11/pc11read.mac @@ -1,9 +1,10 @@ -; $Id: pc11read.mac 1275 2022-08-10 08:10:40Z mueller $ +; $Id: pc11read.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2019-2022 by Walter F.J. Mueller +; Copyright 2019-2023 by Walter F.J. Mueller ; ; Revision History: ; Date Rev Version Comment +; 2023-02-04 1367 1.0.2 use .mcall and vecdef; fix stop handling ; 2022-08-09 1275 1.0.1 use call/return ; 2019-04-21 1134 1.0 Initial version ; @@ -23,10 +24,9 @@ ; .include |lib/vec_cpucatch.mac| .include |lib/vec_devcatch.mac| - - . = v..ptr - .word vh.ptr - .word cp.pr7 + .mcall vecdef +; + vecdef v..ptr,vh.ptr ; PC11 pr vector ; ; stack area ----------------------------------------------- ; @@ -42,8 +42,8 @@ stack: ; start/stop area --------------------------------- ; start: br start1 -stop: halt ; sucessfull stop - reset ; and allow re-start +stop1: halt ; sucessfull stop +stop: reset ; and allow re-start ; ; main program ------------------------------------ ; @@ -86,7 +86,7 @@ vh.ptr: tst @#pr.csr ; reader error 100$: inc @#pr.csr ; go for next char rti -200$: jmp stop +200$: jmp stop1 rerr: halt ; reader error halt br rerr diff --git a/tools/mcode/pc11/pc11read.scmd b/tools/mcode/pc11/pc11read.scmd index ee800cc9..afb5c6dc 100644 --- a/tools/mcode/pc11/pc11read.scmd +++ b/tools/mcode/pc11/pc11read.scmd @@ -1,4 +1,4 @@ -; $Id: pc11read.scmd 1275 2022-08-10 08:10:40Z mueller $ +; $Id: pc11read.scmd 1367 2023-02-06 14:11:34Z mueller $ ; ; Setup file for pc11read ; @@ -12,3 +12,4 @@ det ptp ; load pc11read.lda cont +quit diff --git a/tools/mcode/pc11/pc11read_run.tcl b/tools/mcode/pc11/pc11read_run.tcl new file mode 100644 index 00000000..d78bb4ce --- /dev/null +++ b/tools/mcode/pc11/pc11read_run.tcl @@ -0,0 +1,8 @@ +# $Id: pc11read_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +cpu0pr att w11_pc11copy.dat +cpu0 ldasm -file pc11read.mac -sym sym +cpu0 cp -stapc $sym(...end) +rw11::asmwait cpu0 sym diff --git a/tools/mcode/pc11/pc11wcr.md b/tools/mcode/pc11/pc11wcr.md new file mode 100644 index 00000000..d0ebd7c8 --- /dev/null +++ b/tools/mcode/pc11/pc11wcr.md @@ -0,0 +1,39 @@ +# PC11 write, copy and read tester + +The `pc11write` code punches a file containing 1000 lines of the form +``` +0000: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*() +0001: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*() +... +0999: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*() +``` + +The `pc11copy` code reads a file of the format written by `pc11write` +and punches the read content. +The `pc11read` code reads a file of the format written by `pc11write` +and verifies the content. + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +Run the three codes in sequence with +```bash +ti_w11 -b @pc11write_run.tcl +ti_w11 -b @pc11copy_run.tcl +ti_w11 -b @pc11read_run.tcl +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). +The first command will produce a file `w11_pc11write.dat`. +The second command reads that file and produce a file `w11_pc11copy.dat`. +The final command reads the file `w11_pc11copy.dat`. + +### Start on SimH +```bash +pdp11 pc11write.scmd +pdp11 pc11copy.scmd +pdp11 pc11read.scmd +``` +The logic is as decribed for w11, except the file names start with `simh_`. diff --git a/tools/mcode/pc11/pc11write.mac b/tools/mcode/pc11/pc11write.mac index 88923c08..f6c49753 100644 --- a/tools/mcode/pc11/pc11write.mac +++ b/tools/mcode/pc11/pc11write.mac @@ -1,9 +1,10 @@ -; $Id: pc11write.mac 1276 2022-08-12 10:25:13Z mueller $ +; $Id: pc11write.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2019-2022 by Walter F.J. Mueller +; Copyright 2019-2023 by Walter F.J. Mueller ; ; Revision History: ; Date Rev Version Comment +; 2023-02-04 1367 1.0.3 use .mcall and vecdef; fix stop handling ; 2022-08-10 1276 1.0.2 check line count after last char is accepted ; 2022-08-09 1275 1.0.1 use call/return ; 2019-04-21 1134 1.0 Initial version @@ -24,10 +25,9 @@ ; .include |lib/vec_cpucatch.mac| .include |lib/vec_devcatch.mac| - - . = v..ptp - .word vh.ptp - .word cp.pr7 + .mcall vecdef +; + vecdef v..ptp,vh.ptp ; PC11 pp vector ; ; stack area ----------------------------------------------- ; @@ -43,8 +43,8 @@ stack: ; start/stop area --------------------------------- ; start: br start1 -stop: halt ; sucessfull stop - reset ; and allow re-start +stop1: halt ; sucessfull stop +stop: reset ; and allow re-start ; ; main program ------------------------------------ ; @@ -82,7 +82,7 @@ vh.ptp: tst @#pp.csr ; punch error mov #bnum,r1 ; ready for next line 100$: rti -200$: jmp stop +200$: jmp stop1 perr: halt ; puncher error halt br perr diff --git a/tools/mcode/pc11/pc11write.scmd b/tools/mcode/pc11/pc11write.scmd index a171b02d..5bc688f7 100644 --- a/tools/mcode/pc11/pc11write.scmd +++ b/tools/mcode/pc11/pc11write.scmd @@ -1,4 +1,4 @@ -; $Id: pc11write.scmd 1275 2022-08-10 08:10:40Z mueller $ +; $Id: pc11write.scmd 1367 2023-02-06 14:11:34Z mueller $ ; ; Setup file for pc11write ; @@ -13,3 +13,4 @@ att ptp simh_pc11write.dat ; load pc11write.lda cont +quit diff --git a/tools/mcode/pc11/pc11write_run.tcl b/tools/mcode/pc11/pc11write_run.tcl new file mode 100644 index 00000000..1589e79b --- /dev/null +++ b/tools/mcode/pc11/pc11write_run.tcl @@ -0,0 +1,8 @@ +# $Id: pc11write_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +cpu0pp att w11_pc11write.dat +cpu0 ldasm -file pc11write.mac -sym sym +cpu0 cp -stapc $sym(...end) +rw11::asmwait cpu0 sym diff --git a/tools/mcode/rk11/README.md b/tools/mcode/rk11/README.md index f8775a05..3dd62874 100644 --- a/tools/mcode/rk11/README.md +++ b/tools/mcode/rk11/README.md @@ -1,5 +1,5 @@ This directory tree contains **RK11 test codes** and contains | File | Docu | Comments | -| --------- | --------- | ------- | -| [rk11perf.tcl](rk11perf.tcl) | - | performance tester for RK11 | +| ---- | ---- | -------- | +| [rk11perf.tcl](rk11perf.tcl) | [docu](rk11perf.md) | performance tester for RK11 | diff --git a/tools/mcode/rk11/rk11perf.md b/tools/mcode/rk11/rk11perf.md new file mode 100644 index 00000000..07cc367e --- /dev/null +++ b/tools/mcode/rk11/rk11perf.md @@ -0,0 +1,94 @@ +# Performance tester for RK11 +The `rk11perf.tcl` script measures the performance of RK11 `read` and `write` +transfer requests. It tests transfer sizes of 1, 2, 4, 8, 12, 16, 24, and +32 disk blocks of 512 bytes.. To study backpressure due to CPU activities, four +different CPU run modes are tested: +``` + 0 CPU executes a WAIT instruction + 1 CPU executes `inc r1` (just 2 cycles per instruction) + 2 CPU executes `ashc @v,r2` with v=31. (the currently slowest instruction) + 3 CPU copies data with maximal cache contention +``` +The scripts prints a table with test results, typical results are given below. + +For a test of the bare rlink speed see [dmaperf](../rlink/dmaperf.md). +When comparing, note that an RK11 `read` request causes a memory write +via a `wblk` and a RK11 `write` request causes a memory read via an `rblk`. + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +To run the `noboot` code use +```bash + ti_w11 -b @rk11perf_run.tcl +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). + +### Typical results +#### FT2232HQ based board +The FT2232HQ based serial interface on newer Digilent boards provides a +serial link speed of 12 MBit/s. `rk11perf.tcl` gives on a Basys3 board +(data taken 2023-02-06): +``` + code= 'wait' 'inc r1' 'ashc ...' 'mov ...' + nblk req/s KB/s req/s KB/s req/s KB/s req/s KB/s + read + 1 497 249 497 249 496 248 498 249 + 2 333 333 332 332 332 332 332 332 + 4 248 497 249 498 249 498 249 498 + 6 200 600 199 598 197 590 199 597 + 8 166 663 166 662 142 566 165 662 + 12 125 749 124 746 100 598 124 744 + 16 90 723 90 722 77 612 90 718 + 24 67 798 66 797 53 630 66 792 + 32 50 794 50 798 42 665 50 793 + write + 1 497 249 498 249 498 249 499 249 + 2 348 348 357 357 357 357 370 370 + 4 331 663 333 665 331 661 330 661 + 6 249 747 249 748 250 749 250 749 + 8 167 666 166 665 167 666 166 665 + 12 125 749 124 747 125 748 125 748 + 16 92 739 93 742 94 754 92 735 + 24 66 798 66 798 66 798 66 797 + 32 52 839 52 838 52 838 52 838 +``` +For small transfer sizes the throughput is limited by the link command latency +while for larger transfer sizes the throughput approaches the link speed. +Some Backpressure from CPU activities is seen for the `ashc @v,r2` case +for read requests. + +#### Cypress FX2 based board +The Cypress FX2 based interface on Digilent Nexys 2 and Nexys 3 boards provides +a link speed and a command latency only limited by USB2 properties. +`rk11perf.tcl` gives on a Nexys 2 board (data taken 2015-01-03 with a fixed +chunksize of 1792): +``` + code= 'wait' 'inc r1' 'ashc ...' 'mov ...' + nblk req/s KB/s req/s KB/s req/s KB/s req/s KB/s + read + 1 1987 994 1986 993 1566 783 1946 973 + 2 1972 1972 1959 1959 1303 1303 1592 1592 + 4 1595 3189 1582 3164 878 1756 1137 2274 + 6 1327 3981 1328 3984 665 1995 986 2959 + 8 992 3969 891 3563 489 1957 710 2840 + 12 883 5298 727 4365 358 2145 538 3228 + 16 664 5310 590 4721 281 2245 399 3194 + 24 471 5656 411 4931 190 2276 275 3296 + 32 378 6044 335 5365 147 2354 212 3388 + write + 1 2614 1307 2607 1303 1597 799 1992 996 + 2 1990 1990 1992 1992 1323 1323 1594 1594 + 4 1987 3974 1971 3942 993 1986 1288 2576 + 6 1561 4682 1570 4710 717 2151 998 2994 + 8 1135 4539 1137 4547 531 2123 738 2952 + 12 990 5940 988 5928 398 2389 586 3517 + 16 795 6358 795 6359 307 2454 450 3604 + 24 495 5934 467 5606 195 2335 306 3676 + 32 376 6014 330 5276 142 2273 237 3788 +``` +With such an inherently fast connection, the backpressure due to CPU +activities is clearly visible. diff --git a/tools/mcode/rk11/rk11perf_run.tcl b/tools/mcode/rk11/rk11perf_run.tcl new file mode 100644 index 00000000..4dfd82b2 --- /dev/null +++ b/tools/mcode/rk11/rk11perf_run.tcl @@ -0,0 +1,6 @@ +# $Id: rk11perf_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +source rk11perf.tcl +rk11perf cpu0 1000 diff --git a/tools/mcode/rlink/README.md b/tools/mcode/rlink/README.md index d024b40f..17620deb 100644 --- a/tools/mcode/rlink/README.md +++ b/tools/mcode/rlink/README.md @@ -1,5 +1,5 @@ This directory tree contains **rlink test codes** and contains | File | Docu | Comments | -| --------- | --------- | ------- | -| [dmaperf.tcl](dmaperf.tcl) | - | performance tester for rlink rblk/wblk | +| ---- | ---- | -------- | +| [dmaperf.tcl](dmaperf.tcl) | [docu](dmaperf.md) | performance tester for rlink rblk/wblk | diff --git a/tools/mcode/rlink/dmaperf.md b/tools/mcode/rlink/dmaperf.md new file mode 100644 index 00000000..95c37625 --- /dev/null +++ b/tools/mcode/rlink/dmaperf.md @@ -0,0 +1,76 @@ +# Performance tester for rlink rblk/wblk +The `dmaperf.tcl` script measures the performance of rlink `rblk` and +`wblk` block transfer commands. It tests transfer sizes of 256, 512, 1024, +and 1536 words of 16 bit. To study backpressure due to CPU activities, five +different CPU run modes are tested: +``` + -1 CPU halted + 0 CPU executes a WAIT instruction + 1 CPU executes `inc r1` (just 2 cycles per instruction) + 2 CPU executes `ashc @v,r2` with v=31. (the currently slowest instruction) + 3 CPU copies data with maximal cache contention +``` +The scripts prints a table with test results, typical results are given below. + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +To run the `noboot` code use +```bash + ti_w11 -b @dmaperf_run.tcl +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). + +### Typical results +#### FT2232HQ based board +The FT2232HQ based serial interface on newer Digilent boards provides a +serial link speed of 12 MBit/s. `dmaperf.tcl` gives on a Basys3 board +(data taken 2023-02-06): +``` + bsize= 256 512 1024 1536 wrd + code blk/s KB/s blk/s KB/s blk/s KB/s blk/s KB/s + wblk + -1 500 250 333 333 250 500 200 601 + 0 499 250 333 333 249 498 200 599 + 1 499 250 333 333 250 499 200 599 + 2 497 249 333 333 250 499 179 538 + 3 499 250 333 333 250 499 200 599 + rblk + -1 499 249 334 334 273 547 250 751 + 0 499 250 352 352 281 562 249 748 + 1 498 249 350 350 295 590 249 748 + 2 499 250 340 340 272 545 249 746 + 3 499 250 335 335 279 558 250 749 +``` +For small transfer sizes the throughput is limited by the link command latency +while for larger transfer sizes the throughput approaches the link speed. +No backpressure from CPU activities is seen with one exception. The modest +reduction seen for `wblk` transfers with maximal size of 1536 words with +a CPU running an endless loop of `ashc @v,r2` is reproducible and most +likely a _lock-in effect_ caused by the highly regular pattern of this test. + +#### Cypress FX2 based board +The Cypress FX2 based interface on Digilent Nexys 2 and Nexys 3 boards provides +a link speed and a command latency only limited by USB2 properties. +`dmaperf.tcl` gives on a Nexys 2 board (data taken 2014-12-27): + ``` + bsize= 256 512 1024 1536 wrd + code blk/s KB/s blk/s KB/s blk/s KB/s blk/s KB/s + wblk + -1 2653 1327 2614 2614 1924 3848 1574 4723 + 0 2644 1322 2644 2644 1990 3980 1594 4782 + 1 2653 1327 2653 2653 1980 3960 1604 4812 + 2 2000 1000 1584 1584 1000 2000 725 2176 + 3 2644 1322 1990 1990 1327 2653 1020 3059 + rblk + -1 3921 1960 2653 2653 2653 5307 2614 7842 + 0 3941 1970 2653 2653 2634 5267 1950 5851 + 1 3832 1916 2624 2624 2624 5248 1990 5970 + 2 1980 990 1594 1594 1149 2297 794 2382 + 3 2594 1297 2208 2208 1495 2990 1238 3713 + ``` +With such an inherently fast connection, the backpressure due to CPU +activities is clearly visible. diff --git a/tools/mcode/rlink/dmaperf_run.tcl b/tools/mcode/rlink/dmaperf_run.tcl new file mode 100644 index 00000000..ca3bd8e0 --- /dev/null +++ b/tools/mcode/rlink/dmaperf_run.tcl @@ -0,0 +1,6 @@ +# $Id: dmaperf_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +source dmaperf.tcl +dmaperf cpu0 1000 diff --git a/tools/mcode/sys/README.md b/tools/mcode/sys/README.md index 8363c5f8..914cd302 100644 --- a/tools/mcode/sys/README.md +++ b/tools/mcode/sys/README.md @@ -1,7 +1,7 @@ This directory tree contains **system codes** and contains | File | Docu | Comments | -| --------- | --------- | ------- | -| [blink.mac](blink.mac) | - | _blinking lights_ demo | -| [memclr.mac](memclr.mac) | - | clear memory | -| [noboot.mac](noboot.mac) | - | boot blocker (for disk block 0) | +| ---- | ---- | -------- | +| [blink.mac](blink.mac) | [docu](blink.md) | _blinking lights_ demo | +| [memclr.mac](memclr.mac) | [docu](memclr.md) | clear memory | +| [noboot.mac](noboot.mac) | [docu](noboot.md) | dummy boot block | diff --git a/tools/mcode/sys/blink.mac b/tools/mcode/sys/blink.mac index a62c8856..6332faf1 100644 --- a/tools/mcode/sys/blink.mac +++ b/tools/mcode/sys/blink.mac @@ -1,9 +1,10 @@ -; $Id: blink.mac 1275 2022-08-10 08:10:40Z mueller $ +; $Id: blink.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2019-2022 by Walter F.J. Mueller +; Copyright 2019-2023 by Walter F.J. Mueller ; ; Revision History: ; Date Rev Version Comment +; 2023-02-04 1367 1.0.2 use .mcall and vecdef ; 2022-08-09 1275 1.0.1 use call/return ; 2019-04-22 1135 1.0 Initial version ; @@ -36,14 +37,10 @@ ; .include |lib/vec_cpucatch.mac| .include |lib/vec_devcatch.mac| - - . = v..tti ; DL11 rx vector - .word vh.tti - .word cp.ars!cp.pr7 ; use alt-reg-set ! - - . = v..kwl ; KW11-L vector - .word vh.kwl - .word cp.ars!cp.pr7 ; use alt-reg-set ! + .mcall vecdef +; + vecdef v..tti,vh.tti,cp.ars!cp.pr7 ; DL11 rx vector, alt-reg-set ! + vecdef v..kwl,vh.kwl,cp.ars!cp.pr7 ; KW11-L vector, alt-reg-set ! ; ; stack area ----------------------------------------------- ; diff --git a/tools/mcode/sys/blink.md b/tools/mcode/sys/blink.md new file mode 100644 index 00000000..add220c7 --- /dev/null +++ b/tools/mcode/sys/blink.md @@ -0,0 +1,31 @@ +# _Blinking Lights_ Demonstrator + +The `blink` code generates the _blinking lights_ pattern of RSX-11M and +2.11BSD and some other patterns. The type of pattern and the update speed +can be controlled with single letter commands entered on the console. +``` + styles + r RSX-11M style + b 2.11BSD style + f flipper + c counter + R random pattern + other controls + 0 use default speed + 1-9 set update speed (1 fastest, 9 slowest) + a auto, cycle styles + s surprise, random styles +``` + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +Start `blink` on an FPGA board, best one with a 16 LED display, with +```bash + console_starter -d DL0 & + ti_w11 @blink_run.tcl +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). diff --git a/tools/mcode/sys/blink_run.tcl b/tools/mcode/sys/blink_run.tcl new file mode 100644 index 00000000..a8b4c31f --- /dev/null +++ b/tools/mcode/sys/blink_run.tcl @@ -0,0 +1,9 @@ +# $Id: blink_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +rw11::setup_tt cpu0 +cpu0 ldasm -file blink.mac -sym sym +cpu0 cp -stapc $sym(...end) +# +puts "blink running, quit with .qq" diff --git a/tools/mcode/sys/memclr.mac b/tools/mcode/sys/memclr.mac index 771df349..07d54b74 100644 --- a/tools/mcode/sys/memclr.mac +++ b/tools/mcode/sys/memclr.mac @@ -1,6 +1,6 @@ -; $Id: memclr.mac 1280 2022-08-15 09:12:03Z mueller $ +; $Id: memclr.mac 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2009-2022 by Walter F.J. Mueller +; Copyright 2009-2023 by Walter F.J. Mueller ; ; Revision History: ; Date Rev Version Comment @@ -34,7 +34,7 @@ beg: clr (r3)+ ; ; main clear routine, will be erased by code at 0 and 2 at the end... ; - .=200 + . = 400 start: mov #start,sp reset mov #end,r0 ; r0=end-of-code address diff --git a/tools/mcode/sys/memclr.md b/tools/mcode/sys/memclr.md new file mode 100644 index 00000000..8f73f354 --- /dev/null +++ b/tools/mcode/sys/memclr.md @@ -0,0 +1,17 @@ +# Memory clear + +The `memclr` code zero's all system memory, only locations 0 and 2 have +a non-zero content when the program halts. Can be used to set the memory +to a well-defined state. + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +To run the `memclr` code use +```bash + ti_w11 -w -e memclr.mac +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). diff --git a/tools/mcode/sys/noboot.md b/tools/mcode/sys/noboot.md new file mode 100644 index 00000000..09f32acb --- /dev/null +++ b/tools/mcode/sys/noboot.md @@ -0,0 +1,26 @@ +# Dummy boot block + +The `noboot` code simply prints the message +``` +++======================================++ +|| This is not a hardware bootable disk || +++======================================++ + +CPU WILL HALT +``` +and halts the CPU. The entry point is 0 and can therefore be started +with a `clr pc` as is done on boot PROMs. Code like this is used as a dummy +boot block in non-bootable disk volumes. The `lda` file is also useful in +PC11 loader tests. + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +To run the `noboot` code use +```bash + ti_w11 -w -e noboot.mac +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). diff --git a/tools/mcode/tm11/.gitignore b/tools/mcode/tm11/.gitignore new file mode 100644 index 00000000..60bac170 --- /dev/null +++ b/tools/mcode/tm11/.gitignore @@ -0,0 +1,2 @@ +# tape images +*.tap diff --git a/tools/mcode/tm11/Makefile b/tools/mcode/tm11/Makefile new file mode 100644 index 00000000..19bcf431 --- /dev/null +++ b/tools/mcode/tm11/Makefile @@ -0,0 +1,10 @@ +# $Id: Makefile 1180 2019-07-08 15:46:59Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2019- by Walter F.J. Mueller +# +# Revision History: +# Date Rev Version Comment +# 2019-06-30 1180 1.0 Initial version +#--- +# +include ${RETROBASE}/tools/make/generic_asm11_def.mk diff --git a/tools/mcode/tm11/README.md b/tools/mcode/tm11/README.md new file mode 100644 index 00000000..e4aa3802 --- /dev/null +++ b/tools/mcode/tm11/README.md @@ -0,0 +1,5 @@ +This directory tree contains **TM11 test codes** and contains + +| File | Docu | Comments | +| ---- | ---- | -------- | +| [tm11test.mac](tm11test.mac) | [docu](tm11test.md) | test for TM11 | diff --git a/tools/mcode/tm11/tm11test.mac b/tools/mcode/tm11/tm11test.mac new file mode 100644 index 00000000..f476632e --- /dev/null +++ b/tools/mcode/tm11/tm11test.mac @@ -0,0 +1,469 @@ +; $Id: tm11test.mac 1367 2023-02-06 14:11:34Z mueller $ +; SPDX-License-Identifier: GPL-3.0-or-later +; Copyright 2019-2023 by Walter F.J. Mueller +; +; Revision History: +; Date Rev Version Comment +; 2023-02-04 1367 1.0.2 use .mcall and vecdef; fix stop handling +; 2022-08-09 1275 1.0.1 use call/return +; 2019-07-09 1183 1.0 Initial version +; 2019-06-30 1180 0.1 First draft +; +; write/read test for one TM11 drive (unit 0) +; +; definitions ---------------------------------------------- +; + .include |lib/defs_cpu.mac| + .include |lib/defs_kwl.mac| + .include |lib/defs_tm.mac| + .include |lib/defs_bits.mac| +; + bufblk = 4. ; wbuf/rbuf size in blocks of 256 bytes + bufsiz = 256.*bufblk ; wbuf/rbuf size in bytes + tout = 100. ; default timeout (in 50Hz ticks) +; + c.rew = 0 ; rewind + c.wdat = 1 ; write data + c.weof = 2 ; write eof + c.rdat = 3 ; read data + c.reof = 4 ; read eof + c.sfr = 5 ; space forw record + c.sbr = 6 ; space back record + c.sff = 7 ; space forw file + c.sbf = 10 ; space back file +; +; vector area ---------------------------------------------- +; + .include |lib/vec_cpucatch.mac| + .include |lib/vec_devcatch.mac| + .mcall vecdef +; + vecdef v..tm,vh.tm,cp.ars!cp.pr7 ; TM11 vector, alt-reg-set ! + vecdef v..kwl,vh.kwl,cp.ars!cp.pr7 ; KW11-L vector, alt-reg-set ! +; +; stack area ----------------------------------------------- +; + . = 1000 ; stack (below); code (above) +stack: +; +; code area ------------------------------------------------ +; start/stop area --------------------------------- +; +start: br start1 +stop1: halt ; sucessfull stop +stop: br stop ; no restart (yet) +; +; main program ------------------------------------ +; +start1: mov #stack,sp ; setup stack + call inibuf ; setup wbuf +; + spl 7 + call doinit ; check for unit ready + mov #kl.ie,@#kl.csr ; activate clock + spl 0 ; allow interrupts +; +100$: call getdsp ; setup display pattern + wait ; and wait + br 100$ +; +; getdsp: determine display pattern -------------- +; sssccccccrrrrrrr +; -> sec: 15:13 +; -> cmd: 12:07 +; -> cnt: 06:00 +; +getdsp: spl 7 + mov pcsec,r0 ; get ptr into section table + sub #sectbl,r0 ; get word index + bne 100$ ; if ne not in init + mov scnt,r0 ; else show scnt + bic #160000,r0 ; and keep sect=0 + br 200$ +; +100$: ash #12.,r0 ; set sect number field + mov pcstp,r1 + sub @pcsec,r1 ; get step number *4 + ash #5.,r1 + bic #160177,r1 ; mask step part + bis r1,r0 ; and or in step number field + mov scnt,r1 + bic #^c177,r1 ; mask cnt part + bis r1,r0 ; and or in count field +; +200$: spl 0 + mov r0,dsppat + return +; +; tm11 interrupt handler ------------------------- +; +vh.tm: mov ccind,r0 + mov @#tm.sr,r1 ; get status + mov r1,r2 + bic #,r1 ; ignore eof,bot flags + cmp #,r1 ; check no errors and online + bne 991$ + bic r1,r2 ; get eof,bot flags only + cmp ccsta,r2 ; and check them + bne 992$ +; +100$: call @cmdver(r0) ; and verify last command + inc scnt ; bump repeat count + call docmd ; and issue next command + rti +991$: halt +992$: halt +; +; kw11-l interrupt handler ------------------------ +; +vh.kwl: cmp #sectbl,pcsec ; in init ? + bne 100$ + call doinit ; if yes, check unit +100$: tst timer ; timer active + beq 900$ ; if eq not + dec timer ; run down timer + bne 900$ ; if ne ok + halt ; else expired +900$: rti +; +; doinit: check for tm11 unit ready -------------- +; +doinit: inc scnt ; count up for display + mov #tm.d98,@#tm.cr ; set den=d98,unit=0,ie=0 + mov @#tm.sr,r0 + bit #tm.onl,r0 ; unit online ? + beq 900$ ; if not continue + cmp #,r0 ; bot=1 and wrl=0 ? + beq 100$ + halt ; if not halt +100$: call dosect ; and start section +900$: return +; +; dosect: next setup test section ---------------- +; +dosect: add #2,pcsec ; next section + mov @pcsec,r0 ; get step list start + bne 100$ ; if eq end of sectbl seen + jmp stop1 ; and stop +; +100$: mov r0,pcstp ; setup step ptr + br dostep ; continue with step setup +; +; dostep: setup step ----------------------------- +; +dostep: mov @pcstp,r0 ; load step cmd and cnt + bne 100$ ; if eq end seen + br dosect ; do dosect instead +; +100$: clr scnt ; clear repeat count + br docmd ; continue init cmd +; +; docmd: setup command --------------------------- +; +docmd: mov pcstp,r0 ; load step ptr + mov (r0)+,r1 ; load cmd and cnt + mov (r0)+,ccpar ; keep current command parameter + mov (r0)+,ccsta ; keep current command status + mov r1,r2 + bic #^c,r2 ; get cnt + cmp scnt,r2 ; all repeats done ? + blt 100$ ; if lt no, issue one more + mov r0,pcstp ; else point to next step + br dostep ; and setup next step +; +100$: ash #-11.,r1 + bic #^c<2*17>,r1 ; get cmd word index + mov r1,ccind + mov ccpar,r2 + neg r2 + mov r2,@#tm.bc ; common tm.bc init (cmd parameter) + mov #160000,@#tm.ba ; common tm.ba init (inval addr) + call @cmdact(r1) ; and issue command + bis #,r0 ; finish command + mov r0,@#tm.cr ; and execute tm11 command + mov #tout,timer ; and setup timout + return +; +; command action handlers ------------------------ +; -- c.rew = 0 rewind ------------------- +carew: mov #tm.frw,r0 ; Rewind cmd + return +; +; -- c.wdat = 1 write data --------------- +cawdat: call setbuf ; setup wbuf for write + mov #wbuf,@#tm.ba + mov #tm.fwr,r0 ; Write cmd + return +; +; -- c.weof = 2 write eof ---------------- +caweof: mov #tm.fwe,r0 ; Write EOF cmd + return +; +; -- c.rdat = 3 read data --------------- +; -- c.reof = 4 read eof ---------------- +cardat: call setbuf ; setup wbuf for compare + call clrbuf ; setup rbuf +; +careof: mov #bufsiz,r0 + neg r0 + mov r0,@#tm.bc + mov #rbuf,@#tm.ba + mov #tm.frd,r0 ; Read cmd + return +; +; -- c.sfr = 5 space forw record -------- +casfr: mov #tm.fsf,r0 ; Space forward cmd + return +; +; -- c.sbr = 6 space back record -------- +casbr: mov #tm.fsr,r0 ; Space reverse cmd + return +; +; -- c.sff = 7 space forw file ---------- +casff: clr @#tm.bc + mov #tm.fsf,r0 ; Space forward cmd + return +; +; -- c.sbf = 10 space back file ---------- +casbf: clr @#tm.bc + mov #tm.fsr,r0 ; Space reverse cmd + return +; +; command verification handlers ------------------ +; called with ccind in r0 +; -- c.rew = 0 rewind ------------------- +cvrew: ; FIXME: bot state check ! + clr filno ; again at file 0 + clr recno ; again at record 0 + return +; +; -- c.wdat = 1 write data --------------- +cvwdat: tst @#tm.bc ; all bytes written ? + bne 991$ ; if ne not + inc recno ; next record + return +991$: halt +; +; -- c.weof = 2 write eof ---------------- +cvweof: inc filno ; next file + clr recno + return +; +; -- c.rdat = 3 read data --------------- +cvrdat: mov #bufsiz,r1 + neg r1 ; initial tm.bc value + add ccpar,r1 ; tm.bc after expected record read + cmp r1,@#tm.bc ; does it match ? + bne 991$ ; if ne no + call chkbuf ; verify rbuf against wbuf + inc recno ; next record + return +991$: halt +; +; -- c.reof = 4 read eof ---------------- +cvreof: bit #tm.err,@#tm.cr ; err should be set (because of eof) + beq 991$ ; if eq tm.err not seen + inc filno ; next file + clr recno + return +991$: halt +; +; -- c.sfr = 5 space forw record -------- +cvsfr: + add ccpar,recno ; update record number + return +; +; -- c.sbr = 6 space back record -------- +cvsbr: + sub ccpar,recno ; update record number + return +; +; -- c.sff = 7 space forw file ---------- +cvsff: + inc filno ; next file + clr recno + return +; +; -- c.sbf = 10 space back file ---------- +cvsbf: + dec filno ; previous file + clr recno ; !! weof-weof-sbf sequence + return +; +; inibuf: initialize write buffer ---------------- +; +inibuf: mov #wbuf,r0 ; ptr to buffer + mov #bufblk,r1 ; get number of 256 byte blocks + clr r2 +100$: movb r2,(r0)+ ; write chunk number + inc r2 + mov #255.,r3 + clr r4 +200$: inc r4 + movb r4,(r0)+ ; write byte in chunk number + sob r3,200$ + sob r1,100$ + return +; +; setbuf: setup write buffer --------------------- +; +setbuf: mov #wbuf,r0 ; ptr to buffer + mov filno,(r0)+ ; write file number + mov recno,(r0)+ ; write record number + mov ccpar,(r0)+ ; write record length + return +; +; clrbuf: setup read buffer ---------------------- +; +clrbuf: mov #rbuf,r0 + add ccpar,r0 ; ptr beyond expected data end + sub #2.,r0 ; ptr 2 byte before data end + clrb (r0)+ ; clear 2 byte for data check + clrb (r0)+ + clrb (r0)+ ; clear 2 more bytes for length check + clrb (r0)+ + return +; +; chkbuf: compare read with write buffer --------- +; +chkbuf: mov #rbuf,r0 + mov #wbuf,r1 + mov ccpar,r2 + mov r2,r3 + asr r2 ; word count +100$: cmp (r0)+,(r1)+ ; check buf word wise + bne 991$ + sob r2,100$ + ror r3 ; shift lsb of ccpar into c + bcc 200$ ; if cc even record length + cmpb (r0)+,(r1)+ ; else check last byte + bne 992$ +200$: tstb (r0)+ ; check for not overwrite + bne 993$ + return +; +991$: halt +992$: halt +993$: halt +; +; data area ------------------------------------------------ +; +dsppat: .word 0 +timer: .word 0 ; timer +pcsec: .word sectbl ; ptr to current section +pcstp: .word 0 ; ptr to current step +filno: .word 0 ; file number +recno: .word 0 ; record number +scnt: .word 0 ; step repeat count +ccind: .word 0 ; current command index +ccpar: .word 0 ; current command parameter +ccsta: .word 0 ; current command status +; +cmdact: .word carew ; c.rew = 0 + .word cawdat ; c.wdat = 1 + .word caweof ; c.weof = 2 + .word cardat ; c.rdat = 3 + .word careof ; c.reof = 4 + .word casfr ; c.sfr = 5 + .word casbr ; c.sbr = 6 + .word casff ; c.sff = 7 + .word casbf ; c.sbf = 10 +; +cmdver: .word cvrew ; c.rew = 0 + .word cvwdat ; c.wdat = 1 + .word cvweof ; c.weof = 2 + .word cvrdat ; c.rdat = 3 + .word cvreof ; c.reof = 4 + .word cvsfr ; c.sfr = 5 + .word cvsbr ; c.sbr = 6 + .word cvsff ; c.sff = 7 + .word cvsbf ; c.sbf = 10 +; +sectbl: .word 0 ; init state + .word sl.wr1 ; 1st write + .word sl.rd1 ; 1st read + .word sl.wr2 ; 2nd write + .word sl.rd2 ; 2nd read + .word sl.rd2 ; 2nd re-read + .word 0 ; + + .macro tcmd cmd,rcnt,par,sta + .word +rcnt,par,sta + .endm tcmd +; + .macro tweof + tcmd c.weof,2,0,0 + tcmd c.sbf,1,1,tm.eof + .endm tweof +; + .macro treof + tcmd c.reof,1,0,tm.eof + .endm treof +; +sl.wr1: tcmd c.wdat,2,80.,0 + tcmd c.wdat,2,160.,0 + tweof + tcmd c.wdat,3,92.,0 + tcmd c.wdat,2,100.,0 + tcmd c.wdat,2,96.,0 + tcmd c.wdat,1,97.,0 + tcmd c.wdat,1,98.,0 + tcmd c.wdat,1,99.,0 + tcmd c.wdat,1,100.,0 + tweof + .word 0 +; +; after wr1: BOT-2*80-2*160-EOF-3*92-2*100-2*96-97-98-99-100-EOF-EOF +; +sl.rd1: tcmd c.rew,1,0,tm.bot + tcmd c.rdat,2,80.,0 + tcmd c.rdat,2,160.,0 + treof + tcmd c.rdat,3,92.,0 + tcmd c.rdat,2,100.,0 + tcmd c.rdat,2,96.,0 + tcmd c.rdat,1,97.,0 + tcmd c.rdat,1,98.,0 + tcmd c.rdat,1,99.,0 + tcmd c.rdat,1,100.,0 + treof + treof + .word 0 +; +sl.wr2: tcmd c.rew,1,0,tm.bot + tcmd c.sff,1,0,tm.eof ; skip 1 file + tcmd c.sfr,1,4,0 ; skip 4 records + tcmd c.wdat,2,110.,0 + tcmd c.wdat,2,120.,0 + tweof + tcmd c.wdat,2,130.,0 + tcmd c.wdat,2,140.,0 + tweof + .word 0 +; +; after wr2: BOT-2*80-2*160-EOF-3*92-100-2*110-2*120-EOF-2*130-2*140-EOF-EOF +; +sl.rd2: tcmd c.rew,1,0,tm.bot + tcmd c.rdat,2,80.,0 + tcmd c.rdat,2,160.,0 + tcmd c.sbr,1,3,0 ; go back to record 1 + tcmd c.rdat,1,80.,0 ; re-read record 1 + tcmd c.rdat,1,160.,0 ; re-read record 2 + tcmd c.sfr,1,1,0 ; skip record 3 + treof + tcmd c.rdat,3,92.,0 + tcmd c.rdat,1,100.,0 + tcmd c.rdat,2,110.,0 + tcmd c.rdat,2,120.,0 + treof + tcmd c.rdat,2,130.,0 + tcmd c.rdat,2,140.,0 + treof + treof + .word 0 +; +wbuf: .blkb bufsiz ; write buffer +rbuf: .blkb bufsiz ; read buffer + .word 0 ; fence word +; + .end start diff --git a/tools/mcode/tm11/tm11test.md b/tools/mcode/tm11/tm11test.md new file mode 100644 index 00000000..3aca6625 --- /dev/null +++ b/tools/mcode/tm11/tm11test.md @@ -0,0 +1,55 @@ +# TM11 tester + +The `tm11test` code writes and reads back records and files on a TM11 tape unit. + +### Start on w11 +See general notes on +- [FPGA Board setup](../../../doc/w11a_board_connection.md) +- [Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md) + +Start `tm11test` on an FPGA board with +```bash +ti_w11 -b @tm11test_run.tcl +``` +with the options `` as described in +[Rlink and Backend Server setup](../../../doc/w11a_backend_setup.md). +The run will produce a tape container file `w11_tm11test.tap`. +It can be inspected with the `tap2file` command +```bash + tap2file -v w11_tm11test.tap +``` +and give the output +``` + 0, 0 : 80 : 00 00 00 00 50 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 0, 1 : 80 : 00 00 01 00 50 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 0, 2 : 160 : 00 00 02 00 a0 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 0, 3 : 160 : 00 00 03 00 a0 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 0, 4 : ---EOF--- +w11_tm11test_00.dat: 4 records, length min= 80, max= 160 + 1, 0 : 92 : 01 00 00 00 5c 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 1, 1 : 92 : 01 00 01 00 5c 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 1, 2 : 92 : 01 00 02 00 5c 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 1, 3 : 100 : 01 00 03 00 64 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 1, 4 : 110 : 01 00 04 00 6e 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 1, 5 : 110 : 01 00 05 00 6e 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 1, 6 : 120 : 01 00 06 00 78 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 1, 7 : 120 : 01 00 07 00 78 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 1, 8 : ---EOF--- +w11_tm11test_01.dat: 8 records, length min= 92, max= 120 + 2, 0 : 130 : 02 00 00 00 82 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 2, 1 : 130 : 02 00 01 00 82 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 2, 2 : 140 : 02 00 02 00 8c 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 2, 3 : 140 : 02 00 03 00 8c 00 06 07 08 09 0a 0b 0c 0d 0e 0f ... + 2, 4 : ---EOF--- +w11_tm11test_02.dat: 4 records, length min= 130, max= 140 + 3, 0 : ---EOF--- + 4, 0 : ---EOT--- +``` + +### Start on SimH +```bash +pdp11 tm11write.scmd +``` +The run will produce a tape container file `simh_tm11test.tap`. +It can be inspected with the `tap2file` command and should give the same +result as for the w11 run. diff --git a/tools/mcode/tm11/tm11test.scmd b/tools/mcode/tm11/tm11test.scmd new file mode 100644 index 00000000..9e974bfc --- /dev/null +++ b/tools/mcode/tm11/tm11test.scmd @@ -0,0 +1,21 @@ +; $Id: tm11test.scmd 1367 2023-02-06 14:11:34Z mueller $ +; +; Setup file for tm11write +; +! make tm11test.lda +; +do ../../simh/setup_w11a_mcode.scmd +set tm enabled +set tm4 disabled +set tm5 disabled +set tm6 disabled +set tm7 disabled +; +; attach TM11 drive 0, ensure fresh file +! rm -f simh_tm11test.tap +att tm0 simh_tm11test.tap +; +load tm11test.lda +cont +det tm0 +quit diff --git a/tools/mcode/tm11/tm11test_run.tcl b/tools/mcode/tm11/tm11test_run.tcl new file mode 100644 index 00000000..101b01c7 --- /dev/null +++ b/tools/mcode/tm11/tm11test_run.tcl @@ -0,0 +1,8 @@ +# $Id: tm11test_run.tcl 1367 2023-02-06 14:11:34Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2023- by Walter F.J. Mueller +# +cpu0tma0 att w11_tm11test.tap +cpu0 ldasm -file tm11test.mac -sym sym +cpu0 cp -stapc $sym(...end) +rw11::asmwait cpu0 sym diff --git a/tools/simh/setup_w11a_max.scmd b/tools/simh/setup_w11a_max.scmd index fddc4fbe..46742c76 100644 --- a/tools/simh/setup_w11a_max.scmd +++ b/tools/simh/setup_w11a_max.scmd @@ -1,6 +1,12 @@ -; $Id: setup_w11a_max.scmd 1280 2022-08-15 09:12:03Z mueller $ +; $Id: setup_w11a_max.scmd 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2008-2022 by Walter F.J. Mueller +; Copyright 2008-2023 by Walter F.J. Mueller +; +; Revision History: +; Date Rev Version Comment +; 2922-08-14 1280 1.1.1 set sysid, indicate simulator and SimH +; 2022-07-14 1256 1.1 use autoconfig, cleanups +; 2008-12-28 182 1.0 Initial version ; ; Setup file for 'maximal' w11a configuration under simh 3.8 and above ; @@ -21,12 +27,6 @@ ; 1 TM11 + 4 drives 172520/224/BR5 ; 1 DEUNA 174510/120/BR5 * ; -; Revision History: -; Date Rev Version Comment -; 2922-08-14 1280 1.1.1 set sysid, indicate simulator and SimH -; 2022-07-14 1256 1.1 use autoconfig, cleanups -; 2008-12-28 182 1.0 Initial version -; ; processor options ; set cpu 11/70 diff --git a/tools/simh/setup_w11a_mcode.scmd b/tools/simh/setup_w11a_mcode.scmd index 3457e464..54dd3fd6 100644 --- a/tools/simh/setup_w11a_mcode.scmd +++ b/tools/simh/setup_w11a_mcode.scmd @@ -1,6 +1,11 @@ -; $Id: setup_w11a_mcode.scmd 1280 2022-08-15 09:12:03Z mueller $ +; $Id: setup_w11a_mcode.scmd 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2022- by Walter F.J. Mueller +; Copyright 2022-2023 by Walter F.J. Mueller +; +; Revision History: +; Date Rev Version Comment +; 2922-08-14 1280 1.1.1 set sysid, indicate simulator and SimH +; 2022-08-10 1275 1.0 Initial version (derived from setup_w11a_max.scmd) ; ; Setup file for absolut minimal w11a configuration under simh 3.8 and above ; Use for mcodes and other applications. Defines 2 DL11, DZ, KW11-L and KW11-P. @@ -15,11 +20,6 @@ ; 1 LP11 177514/200/BR4 ; 1 PC11 177550/070/BR4 ; -; Revision History: -; Date Rev Version Comment -; 2922-08-14 1280 1.1.1 set sysid, indicate simulator and SimH -; 2022-08-10 1275 1.0 Initial version (derived from setup_w11a_max.scmd) -; ; processor options ; set cpu 11/70 diff --git a/tools/simh/setup_w11a_min.scmd b/tools/simh/setup_w11a_min.scmd index 6693be5c..df036dd9 100644 --- a/tools/simh/setup_w11a_min.scmd +++ b/tools/simh/setup_w11a_min.scmd @@ -1,6 +1,12 @@ -; $Id: setup_w11a_min.scmd 1280 2022-08-15 09:12:03Z mueller $ +; $Id: setup_w11a_min.scmd 1367 2023-02-06 14:11:34Z mueller $ ; SPDX-License-Identifier: GPL-3.0-or-later -; Copyright 2009-2022 by Walter F.J. Mueller +; Copyright 2009-2023 by Walter F.J. Mueller +; +; Revision History: +; Date Rev Version Comment +; 2922-08-14 1280 1.1.1 set sysid, indicate simulator and SimH +; 2022-07-14 1256 1.1 use autoconfig, cleanups +; 2009-09-13 238 1.0 Initial version ; ; Setup file for 'minimal' w11a configuration under simh 3.8 and above ; @@ -23,12 +29,6 @@ ; 0 TM11 + 0 drives - ; 0 DEUNA - ; -; Revision History: -; Date Rev Version Comment -; 2922-08-14 1280 1.1.1 set sysid, indicate simulator and SimH -; 2022-07-14 1256 1.1 use autoconfig, cleanups -; 2009-09-13 238 1.0 Initial version -; ; processor options ; set cpu 11/70