From b2e7c1cdbbd88003d910fa596f8d8c95c336f54e Mon Sep 17 00:00:00 2001 From: "Walter F.J. Mueller" Date: Sat, 31 Dec 2016 11:04:22 +0100 Subject: [PATCH] rw11::shell.tcl now default environemnt in ti_w11 - tools/bin/ti_w11: use rw11::shell by default; add -ns to suppress it - tools/oskit/*/*_boot.tcl: remove activation of cpucons and cpumon - tools/src/librwxxtpp - RtclRw11Cpu.cpp: use 'ssr' instead of 'mmr' for MMU register names - tools/tcl/rw11: - defs.tcl: fix typo in regmap_add for SDR's - shell.tcl: add '@' command - shell_simh.tcl: added, simh command converter - *: README updates --- rtl/sys_gen/w11a/README.md | 11 ++++ tools/bin/ti_w11 | 24 ++++++-- tools/man/man1/ti_w11.1 | 4 +- tools/oskit/211bsd_rk/211bsd_rk_boot.tcl | 4 +- tools/oskit/211bsd_rk/README.md | 2 +- tools/oskit/211bsd_rl/211bsd_rl_boot.tcl | 4 +- tools/oskit/211bsd_rl/README.md | 2 +- tools/oskit/211bsd_rp/211bsd_rp_boot.tcl | 4 +- tools/oskit/211bsd_rp/README.md | 3 +- tools/oskit/211bsd_tm/211bsd_rm05_boot.tcl | 4 +- tools/oskit/211bsd_tm/211bsd_tm_rm05_boot.tcl | 4 +- tools/oskit/211bsd_tm/211bsd_tm_rp06_boot.tcl | 4 +- .../oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl | 4 +- .../oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl | 4 +- .../rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl | 4 +- tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl | 4 +- tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl | 4 +- tools/oskit/unix-v5_rk/README.md | 2 +- tools/oskit/unix-v5_rk/uv5_rk_boot.tcl | 4 +- tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl | 4 +- tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl | 4 +- tools/src/librwxxtpp/RtclRw11Cpu.cpp | 59 ++++++++++--------- tools/tcl/rw11/defs.tcl | 5 +- tools/tcl/rw11/shell.tcl | 16 ++++- tools/tcl/rw11/shell_simh.tcl | 53 +++++++++++++++++ 25 files changed, 152 insertions(+), 85 deletions(-) create mode 100644 rtl/sys_gen/w11a/README.md create mode 100644 tools/tcl/rw11/shell_simh.tcl diff --git a/rtl/sys_gen/w11a/README.md b/rtl/sys_gen/w11a/README.md new file mode 100644 index 00000000..99ba75e0 --- /dev/null +++ b/rtl/sys_gen/w11a/README.md @@ -0,0 +1,11 @@ +This directory sub-tree contains **w11a systems** +and is organized in + +| Directory | Content | +| --------- | ------- | +| [arty_bram](arty_bram) | design for Digilent Arty, using BRAM only | +| [basys3](basys3) | design for Digilent Basys3 | +| [nexys2](nexys2) | design for Digilent Nexys2 | +| [nexys3](nexys3) | design for Digilent Nexys3 | +| [nexys4](nexys4) | design for Digilent Nexys4 (old CRAM version !!) | +| [s3board](s3board) | design for Digilent S3BOARD | diff --git a/tools/bin/ti_w11 b/tools/bin/ti_w11 index 73da2c2e..e0a9cb8b 100755 --- a/tools/bin/ti_w11 +++ b/tools/bin/ti_w11 @@ -1,11 +1,12 @@ #!/usr/bin/perl -w -# $Id: ti_w11 832 2016-12-28 09:49:47Z mueller $ +# $Id: ti_w11 835 2016-12-31 10:00:14Z mueller $ # # Copyright 2013-2016 by Walter F.J. Mueller # License disclaimer see License.txt in $RETROBASE directory # # Revision History: # Date Rev Version Comment +# 2016-12-31 834 1.4 use rw11::shell by default; add -ns to suppress it # 2016-06-18 776 1.3.5 use ti_rri --tout now # 2016-03-20 748 1.3.4 BUGFIX: add portsel oob for -fx; # use 120 sec timeout for simulation; add -ll,-dl,-tl @@ -32,6 +33,7 @@ my $sysbase = "$ENV{RETROBASE}/rtl/sys_gen/w11a"; my $opt_dry; my $opt_b; +my $opt_ns; my $opt_io = ''; my $opt_f = ''; my $opt_ll = '2'; @@ -68,6 +70,10 @@ while (scalar(@ARGV)) { $opt_b = 1; shift @ARGV; + } elsif ($curarg =~ m{^-ns$} ) { # -ns + $opt_ns = 1; + shift @ARGV; + } elsif ($curarg =~ m{^-tmu$} ) { # -tmu $opt_tmu = 1; shift @ARGV; @@ -273,6 +279,13 @@ push @arglist, 'rlc init' if $opt_io eq 'f'; # push @arglist, 'rw11::setup_sys'; +# +# start w11 shell +# +unless ($opt_ns) { + push @arglist, 'rw11::shell_start'; +} + # # handle -e option # @@ -283,8 +296,6 @@ if (defined $val_e) { } else { push @arglist, "cpu0 ldabs $val_e"; } - push @arglist, 'rw11::cpumon'; - push @arglist, 'rw11::cpucons'; push @arglist, 'cpu0 cp -stapc 0200'; } @@ -305,7 +316,7 @@ if ($tirri eq '' || ! -e $tirri) { # print command line # if (1) { - print 'ti_rri ', join (' ', map {(m{\s}) ? "\"$_\"" : $_} @arglist) , "\n"; + print 'ti_rri ', join (' ', map {(m{\s}) ? "\"$_\"" : $_} @arglist) , "\n"; } # @@ -347,6 +358,11 @@ sub print_usage { print " -tu*[,opts] use /dev/ttyUSB* (* is device number)\n"; print " opts can be ',break', ',xon'\n"; print " common options:\n"; + print " -ll set rlink logging level to (using --logl=)\n"; + print " -dl set rlink dump level to (using --dmpl=)\n"; + print " -tl set rlink trace level to (using --tiol=)\n"; + print " -b batch mode\n"; + print " -ns don't start w11 shell\n"; print " -e load and execute file\n"; print " file type '.mac': on the fly compile with asm-11\n"; print " any other file type: assume lda format\n"; diff --git a/tools/man/man1/ti_w11.1 b/tools/man/man1/ti_w11.1 index 925abc06..48a0fd92 100644 --- a/tools/man/man1/ti_w11.1 +++ b/tools/man/man1/ti_w11.1 @@ -1,5 +1,5 @@ .\" -*- nroff -*- -.\" $Id: ti_w11.1 748 2016-03-20 15:18:50Z mueller $ +.\" $Id: ti_w11.1 834 2016-12-30 15:19:09Z mueller $ .\" .\" Copyright 2013-2015 by Walter F.J. Mueller .\" @@ -89,7 +89,7 @@ use 2nd serport with switched xon activate trace and monitoring unit .IP \fB-ghw\fP activate ghdl wave dump, will write a dump file with the name -\f.ghw\fR where is the filename of the test bench +\fB.ghw\fR where is the filename of the test bench .PD 0 .PD . diff --git a/tools/oskit/211bsd_rk/211bsd_rk_boot.tcl b/tools/oskit/211bsd_rk/211bsd_rk_boot.tcl index edbd1f89..1a5bf1fe 100644 --- a/tools/oskit/211bsd_rk/211bsd_rk_boot.tcl +++ b/tools/oskit/211bsd_rk/211bsd_rk_boot.tcl @@ -1,4 +1,4 @@ -# $Id: 211bsd_rk_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: 211bsd_rk_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for 211bsd RK05 based system # @@ -26,6 +26,4 @@ cpu0rka4 att 211bsd_rk_usr.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rka0 diff --git a/tools/oskit/211bsd_rk/README.md b/tools/oskit/211bsd_rk/README.md index 40abd32f..a4c1d838 100644 --- a/tools/oskit/211bsd_rk/README.md +++ b/tools/oskit/211bsd_rk/README.md @@ -109,7 +109,7 @@ Download, unpack and copy the disk images (*.dsk), e.g. While the system was running the server process display the ``` - cpumon> + cpu0> ``` prompt. When the w11 has halted after 211bsd shutdown a message like diff --git a/tools/oskit/211bsd_rl/211bsd_rl_boot.tcl b/tools/oskit/211bsd_rl/211bsd_rl_boot.tcl index 30ca8e90..af095ef0 100644 --- a/tools/oskit/211bsd_rl/211bsd_rl_boot.tcl +++ b/tools/oskit/211bsd_rl/211bsd_rl_boot.tcl @@ -1,4 +1,4 @@ -# $Id: 211bsd_rl_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: 211bsd_rl_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for 211bsd RL02 based system # @@ -23,6 +23,4 @@ cpu0rla1 att 211bsd_rl_usr.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rla0 diff --git a/tools/oskit/211bsd_rl/README.md b/tools/oskit/211bsd_rl/README.md index ba12626e..dae460a6 100644 --- a/tools/oskit/211bsd_rl/README.md +++ b/tools/oskit/211bsd_rl/README.md @@ -110,7 +110,7 @@ Download, unpack and copy the disk images (*.dsk), e.g. While the system was running the server process display the ``` - cpumon> + cpu0> ``` prompt. When the w11 has halted after 211bsd shutdown a message like diff --git a/tools/oskit/211bsd_rp/211bsd_rp_boot.tcl b/tools/oskit/211bsd_rp/211bsd_rp_boot.tcl index 096cb76e..be556abe 100644 --- a/tools/oskit/211bsd_rp/211bsd_rp_boot.tcl +++ b/tools/oskit/211bsd_rp/211bsd_rp_boot.tcl @@ -1,4 +1,4 @@ -# $Id: 211bsd_rp_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: 211bsd_rp_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for 211bsd RP06 based system # @@ -25,6 +25,4 @@ cpu0rpa0 att 211bsd_rp.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rpa0 diff --git a/tools/oskit/211bsd_rp/README.md b/tools/oskit/211bsd_rp/README.md index ce1e0918..0cabda1d 100644 --- a/tools/oskit/211bsd_rp/README.md +++ b/tools/oskit/211bsd_rp/README.md @@ -118,14 +118,13 @@ Download, unpack and copy the disk images (*.dsk), e.g. While the system was running the server process display the ``` - cpumon> + cpu0> ``` prompt. When the w11 has halted after 211bsd shutdown a message like ``` CPU down attention - Processor registers and status: Processor registers and status: PS: 030350 cm,pm=k,u s,p,t=0,7,0 NZVC=1000 rust: 01 HALTed R0: 177560 R1: 010330 R2: 056172 R3: 000010 diff --git a/tools/oskit/211bsd_tm/211bsd_rm05_boot.tcl b/tools/oskit/211bsd_tm/211bsd_rm05_boot.tcl index 70064f25..e7adfadb 100644 --- a/tools/oskit/211bsd_tm/211bsd_rm05_boot.tcl +++ b/tools/oskit/211bsd_tm/211bsd_rm05_boot.tcl @@ -1,4 +1,4 @@ -# $Id: 211bsd_rm05_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: 211bsd_rm05_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for 211bsd RM05 based system # @@ -25,6 +25,4 @@ cpu0rpa0 att 211bsd_rm05.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rpa0 diff --git a/tools/oskit/211bsd_tm/211bsd_tm_rm05_boot.tcl b/tools/oskit/211bsd_tm/211bsd_tm_rm05_boot.tcl index 102ded5a..c081efea 100644 --- a/tools/oskit/211bsd_tm/211bsd_tm_rm05_boot.tcl +++ b/tools/oskit/211bsd_tm/211bsd_tm_rm05_boot.tcl @@ -1,4 +1,4 @@ -# $Id: 211bsd_tm_rm05_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: 211bsd_tm_rm05_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for creating a 211bsd RM05 system from a TM11 dist kit # @@ -29,6 +29,4 @@ cpu0tma0 att 211bsd_tm.tap?wpro # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot tma0 diff --git a/tools/oskit/211bsd_tm/211bsd_tm_rp06_boot.tcl b/tools/oskit/211bsd_tm/211bsd_tm_rp06_boot.tcl index 85a2db3e..d944b675 100644 --- a/tools/oskit/211bsd_tm/211bsd_tm_rp06_boot.tcl +++ b/tools/oskit/211bsd_tm/211bsd_tm_rp06_boot.tcl @@ -1,4 +1,4 @@ -# $Id: 211bsd_tm_rp06_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: 211bsd_tm_rp06_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for creating a 211bsd RP06 system from a TM11 dist kit # @@ -29,6 +29,4 @@ cpu0tma0 att 211bsd_tm.tap?wpro # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot tma0 diff --git a/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl b/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl index 288270fe..5a447ac7 100644 --- a/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl +++ b/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rsx11m-31_rk_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: rsx11m-31_rk_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for RSX11-M V3.1 RK05 based system # @@ -25,6 +25,4 @@ cpu0rka2 att RSX11M_USER.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rka0 diff --git a/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl b/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl index 3820d9ab..1839ebca 100644 --- a/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl +++ b/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rsx11m-40_rk_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: rsx11m-40_rk_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for RSX11-M V4.0 RK05 based system # @@ -25,6 +25,4 @@ cpu0rka2 att RSX11M_USER.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rka0 diff --git a/tools/oskit/rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl b/tools/oskit/rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl index 124bfb5f..39a3d899 100644 --- a/tools/oskit/rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl +++ b/tools/oskit/rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rsx11mp-30_rp_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: rsx11mp-30_rp_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for RSX11-M+ V3.0 RP06 based system # @@ -25,6 +25,4 @@ cpu0rpa0 att rsx11mp-30.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rpa0 diff --git a/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl b/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl index 5a752cb4..bd97812d 100644 --- a/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl +++ b/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rt11-40_rk_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: rt11-40_rk_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for RT-11 V4.0 RK05 based system # @@ -22,6 +22,4 @@ cpu0rka0 att rtv4_rk.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rka0 diff --git a/tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl b/tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl index 3316083f..f5e2399f 100644 --- a/tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl +++ b/tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rt11-53_rl_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: rt11-53_rl_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for RT-11 V5.3 RL02 based system # @@ -22,6 +22,4 @@ cpu0rla0 att RT11_V5.3_SYSTEM.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rla0 diff --git a/tools/oskit/unix-v5_rk/README.md b/tools/oskit/unix-v5_rk/README.md index 1ec68033..f89ab4b8 100644 --- a/tools/oskit/unix-v5_rk/README.md +++ b/tools/oskit/unix-v5_rk/README.md @@ -57,7 +57,7 @@ Download, unpack and copy the disk images (*.dsk), e.g. There is no `halt` or `shutdown` command, just terminate the server session with a ``` - tirri_exit + .qq ``` command. The disks aren't cached, so no need to sync either. diff --git a/tools/oskit/unix-v5_rk/uv5_rk_boot.tcl b/tools/oskit/unix-v5_rk/uv5_rk_boot.tcl index 06bedda4..c786f5da 100644 --- a/tools/oskit/unix-v5_rk/uv5_rk_boot.tcl +++ b/tools/oskit/unix-v5_rk/uv5_rk_boot.tcl @@ -1,4 +1,4 @@ -# $Id: uv5_rk_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: uv5_rk_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for Unix V5 RK05 based system # @@ -20,6 +20,4 @@ cpu0rka0 att unix_v5_rk.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rka0 diff --git a/tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl b/tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl index f1ecc0a7..97a1987b 100644 --- a/tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl +++ b/tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl @@ -1,4 +1,4 @@ -# $Id: xxdp22_rl_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: xxdp22_rl_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for XXDP V2.2 RL02 based system # @@ -22,6 +22,4 @@ cpu0rla0 att xxdp22.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rla0 diff --git a/tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl b/tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl index 3f4b653e..5289c8de 100644 --- a/tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl +++ b/tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl @@ -1,4 +1,4 @@ -# $Id: xxdp25_rl_boot.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: xxdp25_rl_boot.tcl 835 2016-12-31 10:00:14Z mueller $ # # Setup file for XXDP V2.5 RL02 based system # @@ -22,6 +22,4 @@ cpu0rla0 att xxdp25.dsk # and boot rutil::dohook "preboothook" -rw11::cpumon -rw11::cpucons cpu0 boot rla0 diff --git a/tools/src/librwxxtpp/RtclRw11Cpu.cpp b/tools/src/librwxxtpp/RtclRw11Cpu.cpp index 63dff88a..bbf99f2a 100644 --- a/tools/src/librwxxtpp/RtclRw11Cpu.cpp +++ b/tools/src/librwxxtpp/RtclRw11Cpu.cpp @@ -1,6 +1,6 @@ -// $Id: RtclRw11Cpu.cpp 718 2015-12-26 15:59:48Z mueller $ +// $Id: RtclRw11Cpu.cpp 835 2016-12-31 10:00:14Z mueller $ // -// Copyright 2013-2015 by Walter F.J. Mueller +// Copyright 2013-2016 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2016-12-30 834 1.2.9 use 'ssr' instead of 'mmr' for MMU registers // 2015-12-26 718 1.2.8 use BlockSizeMax() for 'cp -b[rw]m' and 'ldasm' // 2015-07-12 700 1.2.4 use ..CpuAct instead ..CpuGo (new active based lam); // add probe and map setup for optional cpu components @@ -37,7 +38,7 @@ /*! \file - \version $Id: RtclRw11Cpu.cpp 718 2015-12-26 15:59:48Z mueller $ + \version $Id: RtclRw11Cpu.cpp 835 2016-12-31 10:00:14Z mueller $ \brief Implemenation of RtclRw11Cpu. */ @@ -1273,7 +1274,7 @@ int RtclRw11Cpu::M_show(RtclArgs& args) sos << endl; } else if (opt == "-mmu") { - uint16_t mmr[4]; + uint16_t ssr[4]; uint16_t asr[3][32]; const char* pmode[3] = {"km","sm","um"}; const char* acf[8] = {"nres ", @@ -1288,9 +1289,9 @@ int RtclRw11Cpu::M_show(RtclArgs& args) boost::lock_guard lock(Connect()); RlinkCommandList clist; clist.AddWreg(base + Rw11Cpu::kCPAL, 0177572); - clist.AddRblk(base + Rw11Cpu::kCPMEMI, mmr, 3); + clist.AddRblk(base + Rw11Cpu::kCPMEMI, ssr, 3); clist.AddWreg(base + Rw11Cpu::kCPAL, 0172516); - clist.AddRblk(base + Rw11Cpu::kCPMEMI, mmr+3, 1); + clist.AddRblk(base + Rw11Cpu::kCPMEMI, ssr+3, 1); if (!Server().Exec(clist, emsg)) return args.Quit(emsg); clist.Clear(); clist.AddWreg(base + Rw11Cpu::kCPAL, 0172300); @@ -1301,31 +1302,31 @@ int RtclRw11Cpu::M_show(RtclArgs& args) clist.AddRblk(base + Rw11Cpu::kCPMEMI, asr[2], 32); if (!Server().Exec(clist, emsg)) return args.Quit(emsg); } - uint16_t mmr1_0_reg = (mmr[1] ) & 07; - int16_t mmr1_0_val = (mmr[1]>> 3) & 37; - uint16_t mmr1_1_reg = (mmr[1]>> 8) & 07; - int16_t mmr1_1_val = (mmr[1]>>11) & 37; - uint16_t mmr3_ubmap = (mmr[3]>> 5) & 01; - uint16_t mmr3_22bit = (mmr[3]>> 4) & 01; - uint16_t mmr3_d_km = (mmr[3]>> 2) & 01; - uint16_t mmr3_d_sm = (mmr[3]>> 1) & 01; - uint16_t mmr3_d_um = (mmr[3] ) & 01; + uint16_t ssr1_0_reg = (ssr[1] ) & 07; + int16_t ssr1_0_val = (ssr[1]>> 3) & 37; + uint16_t ssr1_1_reg = (ssr[1]>> 8) & 07; + int16_t ssr1_1_val = (ssr[1]>>11) & 37; + uint16_t ssr3_ubmap = (ssr[3]>> 5) & 01; + uint16_t ssr3_22bit = (ssr[3]>> 4) & 01; + uint16_t ssr3_d_km = (ssr[3]>> 2) & 01; + uint16_t ssr3_d_sm = (ssr[3]>> 1) & 01; + uint16_t ssr3_d_um = (ssr[3] ) & 01; sos << "mmu:" << endl; - sos << "mmr0=" << RosPrintBvi(mmr[0],8) << endl; - if (mmr1_0_val & 020) mmr1_0_val |= 0177740; - if (mmr1_1_val & 020) mmr1_1_val |= 0177740; - sos << "mmr1=" << RosPrintBvi(mmr[1],8); - if (mmr1_0_val) sos << " r" << mmr1_0_reg - << ":" << RosPrintf(mmr1_0_val,"d",3); - if (mmr1_1_val) sos << " r" << mmr1_1_reg - << ":" << RosPrintf(mmr1_1_val,"d",3); + sos << "ssr0=" << RosPrintBvi(ssr[0],8) << endl; + if (ssr1_0_val & 020) ssr1_0_val |= 0177740; + if (ssr1_1_val & 020) ssr1_1_val |= 0177740; + sos << "ssr1=" << RosPrintBvi(ssr[1],8); + if (ssr1_0_val) sos << " r" << ssr1_0_reg + << ":" << RosPrintf(ssr1_0_val,"d",3); + if (ssr1_1_val) sos << " r" << ssr1_1_reg + << ":" << RosPrintf(ssr1_1_val,"d",3); sos << endl; - sos << "mmr2=" << RosPrintBvi(mmr[2],8) << endl; - sos << "mmr3=" << RosPrintBvi(mmr[3],8) - << " ubmap=" << mmr3_ubmap - << " 22bit=" << mmr3_22bit - << " d-space k,s,u=" << mmr3_d_km - << "," << mmr3_d_sm << "," << mmr3_d_um << endl; + sos << "ssr2=" << RosPrintBvi(ssr[2],8) << endl; + sos << "ssr3=" << RosPrintBvi(ssr[3],8) + << " ubmap=" << ssr3_ubmap + << " 22bit=" << ssr3_22bit + << " d-space k,s,u=" << ssr3_d_km + << "," << ssr3_d_sm << "," << ssr3_d_um << endl; for (size_t m=0; m<3; m++) { sos << pmode[m] << " " << " I pdr slf aw d acf I par" diff --git a/tools/tcl/rw11/defs.tcl b/tools/tcl/rw11/defs.tcl index 72207cd6..2be0b196 100644 --- a/tools/tcl/rw11/defs.tcl +++ b/tools/tcl/rw11/defs.tcl @@ -1,4 +1,4 @@ -# $Id: defs.tcl 724 2016-01-03 22:53:53Z mueller $ +# $Id: defs.tcl 835 2016-12-31 10:00:14Z mueller $ # # Copyright 2014-2016 by Walter F.J. Mueller # @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2016-12-30 834 1.0.4 fix typo in regmap_add for SDR's # 2016-01-02 724 1.0.3 add s: defs for CP_STAT(rust) # 2015-12-26 719 1.0.2 add regmap_add defs; add CNTRL def # 2015-09-06 710 1.0.1 regdsc PSW: add silent n,z,v,c; *mode syms; fix tflag @@ -101,7 +102,7 @@ namespace eval rw11 { rw11util::regmap_add rw11 ssr0 {?? SSR0} rw11util::regmap_add rw11 ssr1 {?? SSR1} rw11util::regmap_add rw11 ssr3 {?? SSR3} - rw11util::regmap_add rw11 sdr???.? {?? SDR} + rw11util::regmap_add rw11 sdr??.? {?? SDR} rw11util::regmap_add rw11 pirq {?? PIRQ} rw11util::regmap_add rw11 cpuerr {?? CPUERR} # diff --git a/tools/tcl/rw11/shell.tcl b/tools/tcl/rw11/shell.tcl index 7360bd8a..4df664c3 100644 --- a/tools/tcl/rw11/shell.tcl +++ b/tools/tcl/rw11/shell.tcl @@ -1,4 +1,4 @@ -# $Id: shell.tcl 834 2016-12-30 15:19:09Z mueller $ +# $Id: shell.tcl 835 2016-12-31 10:00:14Z mueller $ # # Copyright 2015-2016 by Walter F.J. Mueller # @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2016-12-31 834 2.1 add '@' command # 2016-12-30 833 2.0 major overhaul # 2015-12-23 717 1.1 add e,g,d commands; fix shell_tin # 2015-07-12 700 1.0 Initial version @@ -139,6 +140,19 @@ namespace eval rw11 { set cname [lindex $args 0] set cargs [lreplace $args 0 0] + # handle @ + if {[regexp -- {^\@(.+)$} $cname matched fname]} { + if {![file exists $fname]} { + error "shell-E: file 'fname' not found" + } + if {[regexp -- {^(.+)\.scmd$} $fname]} { + shell_simh $fname + } else { + source $fname + } + return + } + switch $cname { .e {set rval [shell_exa {*}$cargs]} diff --git a/tools/tcl/rw11/shell_simh.tcl b/tools/tcl/rw11/shell_simh.tcl new file mode 100644 index 00000000..7fe55e4e --- /dev/null +++ b/tools/tcl/rw11/shell_simh.tcl @@ -0,0 +1,53 @@ +# $Id: shell_simh.tcl 835 2016-12-31 10:00:14Z mueller $ +# +# Copyright 2016- by Walter F.J. Mueller +# +# This program is free software; you may redistribute and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 2, or at your option any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for complete details. +# +# Revision History: +# Date Rev Version Comment +# 2016-12-30 833 1.0 Initial version (limited to 'dep') +# + +package provide rw11 1.0 + +namespace eval rw11 { + + # + # shell_simh: simh command converter --------------------------------------- + # + proc shell_simh {fname} { + set fd [open $fname r] + while {[gets $fd line] >= 0} { + set cline $line + if {[regexp -- {^(.*);} $line matched nocomm]} {set cline $nocomm} + set cline [string trim $cline] + if {$cline eq ""} {continue} + + set tlist [regexp -inline -all -- {\S+} $cline] + set scmd [lindex $tlist 0] + set sargs [lrange $tlist 1 end] + switch $scmd { + dep {shell_simh_dep {*}$sargs} + default { + error "shell_simh-E: not supported simh command '$cmd'" + } + } + } + return "" + } + + # + # shell_simh_dep: handler for 'dep' --------------------------------------- + # + proc shell_simh_dep {addr val} { + .d "0$addr" "0$val" + } +}