mirror of
https://github.com/wfjm/w11.git
synced 2026-04-02 21:07:12 +00:00
Add first tcode; RtclRw11Cpu BUGFIX
- rtl/sys_gen/w11a/*/tbrun.yml: add tcode execution - tools/tcode: new area for add fast mac-only verification codes - tools/tcl/rw11 - tcodes.tcl: added, driver for tcode execution - tools/src/librwxxtpp - RtclRw11Cpu.cpp: BUGFIX: quit before mem write if asm-11 error seen
This commit is contained in:
@@ -27,11 +27,14 @@ The full set of tests is only run for tagged releases.
|
||||
|
||||
### Summary
|
||||
- cleanup tbrun setup, drop nexys4 and add nexys4d ([see blog](https://wfjm.github.io/blogs/w11/2019-07-27-nexys4-obituary.html))
|
||||
- add fast mac-only verification codes under tool/tcode, integrated with tbrun
|
||||
- add ostest support for rsx11m-31_rk, rsx11m-40_rk and rsx11mp-30_rp oskits
|
||||
- all actively used commands have now a man page
|
||||
- Doxygen support now for V1.9.4; remove discontinued Tcl support
|
||||
- build flow Vivado 2022.1 ready; handle synth 8-3331 -> 8-7129 transition
|
||||
### New features
|
||||
- new verification codes
|
||||
- tools/tcode: fast cpu verification codes
|
||||
### Changes
|
||||
- tools changes
|
||||
- ci.yml: define TBW_GHDL_OPTS and suppress IEEE package warnings at t=0ms
|
||||
@@ -40,6 +43,8 @@ The full set of tests is only run for tagged releases.
|
||||
- njobihtm: add -n and -h options
|
||||
- ti_w11: update --help text, add -ar,-n4d,-bn4d
|
||||
- tmuconv: add DEUNA defs
|
||||
- tools/tcl
|
||||
- w11/tcodes.tcl: driver for tcode execution
|
||||
- tools/dox
|
||||
- w11_(cpp|vhd_all).Doxyfile: for Doxygen V1.9.4
|
||||
- w11_tcl.Doxyfile: removed, Tcl support removed in Doxygen V1.8.18
|
||||
@@ -48,6 +53,8 @@ The full set of tests is only run for tagged releases.
|
||||
### Bug Fixes
|
||||
- tools/mcode
|
||||
- m9312/bootw11.mac: proper init of unit number in getnam
|
||||
- src/librwxxtpp
|
||||
- RtclRw11Cpu.cpp: quit before mem write if asm-11 error seen
|
||||
|
||||
<!-- --------------------------------------------------------------------- -->
|
||||
---
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 1071 2018-11-17 20:53:26Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.1 add rw11::tcodes @cpu_all.dat
|
||||
# 2018-11-17 1071 1.0 Initial version
|
||||
#
|
||||
- default:
|
||||
@@ -27,3 +28,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tbdev --pack rw11 tb_w11a_arty${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [default, viv, sys_w11a, arty, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tccpu --pack rw11 tb_w11a_arty${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 916 2017-06-25 13:30:07Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.2 add rw11::tcodes @cpu_all.dat
|
||||
# 2017-06-25 916 1.1 retire mem70 - now in tbcpu
|
||||
# 2016-09-18 809 1.0.1 use 60 sec tout for run_pdpcp tb_pdp11core_stim
|
||||
# 2016-08-21 799 1.0 Initial version
|
||||
@@ -29,3 +30,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tbdev --pack rw11 tb_w11a_br_arty${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [default, viv, sys_w11a, br_arty, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tccpu --pack rw11 tb_w11a_br_arty${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 1105 2019-01-12 19:52:45Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.1 add rw11::tcodes @cpu_all.dat
|
||||
# 2019-01-12 1105 1.0 Initial version
|
||||
#
|
||||
- default:
|
||||
@@ -27,3 +28,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tbdev --pack rw11 tb_w11a_as7${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [viv, sys_w11a, as7, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tccpu --pack rw11 tb_w11a_as7${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 1038 2018-08-11 12:39:52Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.1 add rw11::tcodes @cpu_all.dat
|
||||
# 2018-08-11 1038 1.0 Initial version
|
||||
#
|
||||
- default:
|
||||
@@ -27,3 +28,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tbdev --pack rw11 tb_w11a_br_as7${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [viv, sys_w11a, br_as7, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tccpu --pack rw11 tb_w11a_br_as7${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 916 2017-06-25 13:30:07Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.3 add rw11::tcodes @cpu_all.dat
|
||||
# 2017-06-25 916 1.2 retire mem70 - now in tbcpu
|
||||
# 2016-09-18 809 1.0.1 use 60 sec tout for run_pdpcp tb_pdp11core_stim
|
||||
# 2016-08-13 798 1.0 Initial version
|
||||
@@ -29,3 +30,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tbdev --pack rw11 tb_w11a_b3${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [default, viv, sys_w11a, b3, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tccpu --pack rw11 tb_w11a_b3${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 916 2017-06-25 13:30:07Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.1 add rw11::tcodes @cpu_all.dat
|
||||
# 2017-06-24 914 1.0 Initial version
|
||||
#
|
||||
- default:
|
||||
@@ -27,3 +28,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tbdev --pack rw11 tb_w11a_c7${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [default, viv, sys_w11a, c7, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --hxon --lsuf tccpu --pack rw11 tb_w11a_c7${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 916 2017-06-25 13:30:07Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.3 add rw11::tcodes @cpu_all.dat
|
||||
# 2017-06-25 916 1.2 retire mem70,mem70_n2 - now in tbcpu
|
||||
# 2016-09-18 809 1.1.1 use 60 sec tout for run_pdpcp tb_pdp11core_stim
|
||||
# 2016-08-28 803 1.1 use ${ise_modes_noisim} when ISim can't be used
|
||||
@@ -30,3 +31,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --cuff --lsuf tbdev --pack rw11 tb_w11a_n2${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [default, ise, sys_w11a, n2, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --cuff --lsuf tccpu --pack rw11 tb_w11a_n2${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 916 2017-06-25 13:30:07Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.3 add rw11::tcodes @cpu_all.dat
|
||||
# 2017-06-25 916 1.2 retire mem70,mem70_n2 - now in tbcpu
|
||||
# 2016-09-18 809 1.1.1 use 60 sec tout for run_pdpcp tb_pdp11core_stim
|
||||
# 2016-08-28 803 1.1 use ${ise_modes_noisim} when ISim can't be used
|
||||
@@ -30,3 +31,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --cuff --lsuf tbdev --pack rw11 tb_w11a_n3${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [default, ise, sys_w11a, n3, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --cuff --lsuf tccpu --pack rw11 tb_w11a_n3${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 1201 2019-08-10 16:51:22Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.3 add rw11::tcodes @cpu_all.dat
|
||||
# 2019-08-10 1201 1.2.1 remove n4 from default
|
||||
# 2017-06-25 916 1.2 retire mem70,mem70_n2 - now in tbcpu
|
||||
# 2016-09-18 809 1.0.1 use 60 sec tout for run_pdpcp tb_pdp11core_stim
|
||||
@@ -30,3 +31,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --lsuf tbdev --pack rw11 tb_w11a_n4${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [viv, sys_w11a, n4, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --lsuf tccpu --pack rw11 tb_w11a_n4${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 1201 2019-08-10 16:51:22Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.1 add rw11::tcodes @cpu_all.dat
|
||||
# 2019-08-10 1201 1.0.1 add n4d to default
|
||||
# 2019-01-02 1101 1.0 Initial version
|
||||
#
|
||||
@@ -28,3 +29,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --lsuf tbdev --pack rw11 tb_w11a_n4d${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [default, viv, sys_w11a, n4d, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --lsuf tccpu --pack rw11 tb_w11a_n4d${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# $Id: tbrun.yml 916 2017-06-25 13:30:07Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2017-06-25 916 1.2 retire mem70 - now in tbcpu
|
||||
# 2022-07-07 1249 1.2 add rw11::tcodes @cpu_all.dat
|
||||
# 2017-06-25 916 1.1 retire mem70 - now in tbcpu
|
||||
# 2017-01-04 800 1.0 Initial version
|
||||
#
|
||||
- default:
|
||||
@@ -28,3 +29,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --lsuf tbdev --pack rw11 tb_w11a_br_n4d${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [viv, sys_w11a, br_n4d, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --lsuf tccpu --pack rw11 tb_w11a_br_n4d${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# $Id: tbrun.yml 916 2017-06-25 13:30:07Z mueller $
|
||||
# $Id: tbrun.yml 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.3 add rw11::tcodes @cpu_all.dat
|
||||
# 2017-06-25 916 1.2 retire mem70,mem70_s3 - now in tbcpu; add --fusp
|
||||
# 2016-09-18 809 1.1.1 use 60 sec tout for run_pdpcp tb_pdp11core_stim
|
||||
# 2016-08-28 803 1.1 use ${ise_modes_noisim} when ISim can't be used
|
||||
@@ -30,3 +31,8 @@
|
||||
test: |
|
||||
tbrun_tbwrri --fusp --lsuf tbdev --pack rw11 tb_w11a_s3${ms} \
|
||||
"rw11::setup_cpu" "rw11::tbench @dev_all.dat"
|
||||
|
||||
- tag: [default, ise, sys_w11a, s3, tccpu]
|
||||
test: |
|
||||
tbrun_tbwrri --fusp --lsuf tccpu --pack rw11 tb_w11a_s3${ms} \
|
||||
"rw11::setup_cpu" "rw11::tcodes @cpu_all.dat"
|
||||
|
||||
@@ -16,5 +16,6 @@ This directory tree contains **many tools** and is organized in
|
||||
| [src](src) | C++ sources for rlink backend |
|
||||
| [sys](sys) | udev rules for USB device handling |
|
||||
| [tbench](tbench) | w11 test bench |
|
||||
| [tcode](tcode) | w11 test codes |
|
||||
| [tcl](tcl) | TCL sources for rlink backend |
|
||||
| [vivado](vivado) | scripts for Xilinx Vivado |
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// $Id: RtclRw11Cpu.cpp 1175 2019-06-30 06:13:17Z mueller $
|
||||
// $Id: RtclRw11Cpu.cpp 1249 2022-07-08 06:27:59Z mueller $
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2022--7-07 1249 1.2.34 BUGFIX: quit before mem write if asm-11 error seen
|
||||
// 2019-06-29 1175 1.2.33 M_ldabs(): add missing OptValid() call
|
||||
// 2019-06-07 1160 1.2.32 use RtclStats::Exec()
|
||||
// 2019-04-30 1143 1.2.31 add HasM9312() getter
|
||||
@@ -1213,8 +1214,14 @@ int RtclRw11Cpu::M_ldasm(RtclArgs& args)
|
||||
if (!Rtcl::SetVar(interp, varlst, Rtcl::NewLinesObj(los))) return kERR;
|
||||
}
|
||||
|
||||
// now, finally, iterate over cmap and write code to memory
|
||||
// in case of asm-11 error quit (after lst and sym processing)
|
||||
if (wexit != 0) {
|
||||
args.AppendResultLines("asm-11 compilation failed with:");
|
||||
args.AppendResultLines(eos);
|
||||
return kERR;
|
||||
}
|
||||
|
||||
// now, finally, iterate over cmap and write code to memory
|
||||
vector<uint16_t> block;
|
||||
uint16_t base = 0;
|
||||
dot = 0;
|
||||
@@ -1237,12 +1244,6 @@ int RtclRw11Cpu::M_ldasm(RtclArgs& args)
|
||||
block.clear();
|
||||
}
|
||||
|
||||
if (wexit != 0) {
|
||||
args.AppendResultLines("asm-11 compilation failed with:");
|
||||
args.AppendResultLines(eos);
|
||||
return kERR;
|
||||
}
|
||||
|
||||
return kOK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: tbench.tcl 1177 2019-06-30 12:34:07Z mueller $
|
||||
# $Id: tbench.tcl 1249 2022-07-08 06:27:59Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# Copyright 2013-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
@@ -35,7 +35,7 @@ namespace eval rw11 {
|
||||
}
|
||||
|
||||
#
|
||||
# tbench_file: execute list of tbench steps
|
||||
# tbench_list: execute list of tbench steps
|
||||
#
|
||||
proc tbench_list {tname tbase} {
|
||||
set errcnt 0
|
||||
|
||||
134
tools/tcl/rw11/tcodes.tcl
Normal file
134
tools/tcl/rw11/tcodes.tcl
Normal file
@@ -0,0 +1,134 @@
|
||||
# $Id: tcodes.tcl 1249 2022-07-08 06:27:59Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2022- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-07 1249 1.0 Initial version (derived from tbench.tcl)
|
||||
#
|
||||
|
||||
package provide rw11 1.0
|
||||
|
||||
package require rlink
|
||||
package require rwxxtpp
|
||||
|
||||
namespace eval rw11 {
|
||||
|
||||
#
|
||||
# tcodes: driver for tcode execution
|
||||
#
|
||||
proc tcodes {tname} {
|
||||
set fname $tname
|
||||
set tbase "."
|
||||
if {[string match "@*" $tname]} {
|
||||
set fname [string range $tname 1 end]
|
||||
}
|
||||
if {![file exists $fname]} {set tbase "$::env(RETROBASE)/tools/tcode"}
|
||||
|
||||
rlink::anena 1; # enable attn notify
|
||||
set errcnt [tcodes_list $tname $tbase]
|
||||
return $errcnt
|
||||
}
|
||||
|
||||
#
|
||||
# tcodes_list: execute list of tcodes
|
||||
#
|
||||
proc tcodes_list {tname tbase} {
|
||||
set errcnt 0
|
||||
|
||||
set rname $tname
|
||||
set islist 0
|
||||
if {[string match "@*" $tname]} {
|
||||
set islist 1
|
||||
set rname [string range $tname 1 end]
|
||||
}
|
||||
|
||||
set dname [file dirname $rname]
|
||||
set fname [file tail $rname]
|
||||
if {$dname ne "."} {
|
||||
set tbase [file join $tbase $dname]
|
||||
}
|
||||
|
||||
if {![file readable "$tbase/$fname"]} {
|
||||
puts "-E: file $tbase/$fname not found or readable"
|
||||
error "-E: file $tbase/$fname not found or readable"
|
||||
}
|
||||
|
||||
if {$islist} {
|
||||
set fh [open "$tbase/$fname"]
|
||||
while {[gets $fh line] >= 0} {
|
||||
set line [string trim $line]; # trim white space
|
||||
if {$line eq ""} {continue}; # skip empty lines
|
||||
if {[string match "#*" $line]} {
|
||||
if {[string match "##*" $line]} { rlc log -bare $line }
|
||||
} elseif {[string match "@*" $line]} {
|
||||
incr errcnt [tcodes_list $line $tbase]
|
||||
} else {
|
||||
incr errcnt [tcodes_exec $line $tbase]
|
||||
}
|
||||
}
|
||||
close $fh
|
||||
|
||||
} else {
|
||||
incr errcnt [tcodes_exec $fname $tbase]
|
||||
}
|
||||
|
||||
if {$islist} {
|
||||
rlc log -bare [format "%s: %s" $tname [rutil::errcnt2txt $errcnt]]
|
||||
}
|
||||
return $errcnt
|
||||
}
|
||||
|
||||
#
|
||||
# tcodes_exec: execute single tcode
|
||||
#
|
||||
proc tcodes_exec {fname tbase} {
|
||||
if {![file readable "$tbase/$fname"]} {
|
||||
error "-E: file $tbase/$fname not found or readable"
|
||||
}
|
||||
|
||||
set cpu "cpu0"
|
||||
set errcnt 0
|
||||
set tout 100.; # tcode timeout
|
||||
set hascmon [$cpu get hascmon]
|
||||
set mwsup 1; # dmcmon
|
||||
set imode 1; # dmcmon
|
||||
set nent 30; # dmcmon: show last 30 instructions
|
||||
|
||||
if { [catch {$cpu ldasm -file "$tbase/$fname" -sym sym -lst lst} errmsg] } {
|
||||
rlc log -error "$fname FAILed to compile"
|
||||
rlc log -bare $errmsg
|
||||
rlc log -bare [format "%s: %s" $fname "FAIL"]
|
||||
return 1
|
||||
}
|
||||
|
||||
if {$hascmon} {rw11::cm_start $cpu mwsup $mwsup imode $imode}
|
||||
rw11::asmrun $cpu sym
|
||||
|
||||
set dt [$cpu wtcpu -reset $tout]
|
||||
if {$hascmon} {rw11::cm_stop}
|
||||
|
||||
if {$dt < 0.} {
|
||||
rlc log -error "$fname FAILed with timeout after $tout s"
|
||||
incr errcnt 1
|
||||
} else {
|
||||
$cpu cp -rpc rpc
|
||||
if {$rpc != $sym(stop)} {
|
||||
rlc log -error [format "%s FAILed with HALT at %06o" $fname $rpc]
|
||||
incr errcnt 1
|
||||
}
|
||||
}
|
||||
|
||||
if {$errcnt > 0} { # in case of an error
|
||||
rlc log -bare [$cpu show -r0ps]; # show registers
|
||||
if {$hascmon} { # show last instructions if cmon present
|
||||
set cmraw [rw11::cm_read $cpu $nent]
|
||||
rlc log -bare [rw11::cm_print $cmraw]
|
||||
}
|
||||
}
|
||||
|
||||
rlc log -bare [format "%s: %s" $fname [rutil::errcnt2txt $errcnt]]
|
||||
return $errcnt
|
||||
}
|
||||
|
||||
}
|
||||
7
tools/tcode/.gitignore
vendored
Normal file
7
tools/tcode/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
*.cof
|
||||
*.lst
|
||||
|
||||
# simulation stuff
|
||||
rlink_cext_conf
|
||||
rlink_cext_fifo_rx
|
||||
rlink_cext_fifo_tx
|
||||
1
tools/tcode/README.md
Normal file
1
tools/tcode/README.md
Normal file
@@ -0,0 +1 @@
|
||||
This directory contains the **w11 test codes**
|
||||
5
tools/tcode/cpu_all.dat
Normal file
5
tools/tcode/cpu_all.dat
Normal file
@@ -0,0 +1,5 @@
|
||||
# $Id: cpu_all.dat 1249 2022-07-08 06:27:59Z mueller $
|
||||
#
|
||||
## steering file for all cpu tests
|
||||
#
|
||||
cpu_basics.mac
|
||||
1369
tools/tcode/cpu_basics.mac
Normal file
1369
tools/tcode/cpu_basics.mac
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user