mirror of
https://github.com/wfjm/w11.git
synced 2026-03-06 11:34:31 +00:00
tmuconv updates [skip ci]
- add -emcancel; drop em 'cancel' when -t-ib - print ru after em,ib, best for reg from mem cases - map r6,r7 to sp,pc for rdst,1reg,rsrc instructions
This commit is contained in:
@@ -53,7 +53,9 @@ The full set of tests is only run for tagged releases.
|
||||
- njobihtm: add -n and -h options
|
||||
- tbrun_tbwrri: fully implement --r(l|b)mon
|
||||
- ti_w11: update --help text, add -ar,-n4d,-bn4d; add -w and -to options
|
||||
- tmuconv: add DEUNA defs; add -t_vf -t_all; fis mnemos; add headers
|
||||
- tmuconv:
|
||||
- add DEUNA defs; add -t_vf,-t_all,-emcancel; fis mnemos; add headers
|
||||
- don't print em 'cancel' lines when -t-ib
|
||||
- tools/tcl
|
||||
- w11/tcodes.tcl: driver for tcode execution
|
||||
- tools/oskit/\*
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: tmuconv 1258 2022-07-18 10:07:22Z mueller $
|
||||
# $Id: tmuconv 1283 2022-08-22 10:07:58Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2008-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-08-22 1283 1.1.8 print ru after em,ib, best for reg from mem cases
|
||||
# map r6,r7 to sp,pc for rdst,1reg,rsrc instructions
|
||||
# 2022-07-23 1261 1.1.7 add -emcancel; drop em 'cancel' when -t-ib
|
||||
# 2022-07-17 1258 1.1.6 add -t_vf -t_all; fis mnemos; add headers
|
||||
# 2022-07-06 1246 1.1.5 add DEUNA defs
|
||||
# 2019-07-13 1189 1.1.4 drop superfluous exists for $opts
|
||||
@@ -85,7 +88,7 @@ use Getopt::Long;
|
||||
|
||||
my %opts = ();
|
||||
|
||||
GetOptions(\%opts, "help", "dump", "cdump",
|
||||
GetOptions(\%opts, "help", "dump", "cdump", "emcancel",
|
||||
"t_id", "t_ru", "t_em","t_vf", "t_ib", "t_all")
|
||||
or bailout("bad command options");
|
||||
|
||||
@@ -729,6 +732,7 @@ sub do_file {
|
||||
if ($val_curr[$ind_vm_emmreq_cancel]) {
|
||||
$emreq_str .= " cancel";
|
||||
$emcurr_we = undef;
|
||||
$emres_str = "" if $opts{t_ib} and not $opts{emcancel};
|
||||
} else {
|
||||
if ($val_curr[$ind_vm_emsres_ack_r]) {
|
||||
$emreq_str .= sprintf " %6.6o", $val_curr[$ind_vm_emsres_dout];
|
||||
@@ -822,7 +826,6 @@ sub do_file {
|
||||
}
|
||||
|
||||
print "$cyc_str id $id_str\n" if $id_str;
|
||||
print "$cyc_str ru $ru_str\n" if $ru_str;
|
||||
if ($emres_str) {
|
||||
printf "$cyc_str em $emreq_str $emres_str (%d) $emtyp_str\n",
|
||||
$cyc_curr-$emreq_cyc;
|
||||
@@ -831,6 +834,7 @@ sub do_file {
|
||||
printf "$cyc_str ib %s $ibreq_str $ibres_str (%d) $ibreq_nam\n",
|
||||
$ibreq_typ, $cyc_curr-$ibreq_cyc;
|
||||
}
|
||||
print "$cyc_str ru $ru_str\n" if $ru_str;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -863,16 +867,15 @@ sub code2mnemo {
|
||||
return "$name $src_str,$dst_str";
|
||||
|
||||
} elsif ($type eq "rdst") {
|
||||
my $reg = ($code>>6) & 07;
|
||||
my $dst = ($code>>6) & 07;
|
||||
my $src = $code & 077;
|
||||
my $src_str = regmod($src);
|
||||
return "$name $src_str,r$reg";
|
||||
my $dst_str = regmod($dst);
|
||||
return "$name $src_str,$dst_str";
|
||||
|
||||
} elsif ($type eq "1reg") {
|
||||
my $reg = $code & 07;
|
||||
my $reg_str = "r$reg";
|
||||
$reg_str = "sp" if $reg == 6;
|
||||
$reg_str = "pc" if $reg == 7;
|
||||
my $reg_str = regmod($reg);
|
||||
return "$name $reg_str";
|
||||
|
||||
} elsif ($type eq "br") {
|
||||
@@ -922,10 +925,11 @@ sub code2mnemo {
|
||||
return $str;
|
||||
|
||||
} elsif ($type eq "rsrc") {
|
||||
my $reg = ($code>>6) & 07;
|
||||
my $src = ($code>>6) & 07;
|
||||
my $dst = $code & 077;
|
||||
my $src_str = regmod($src);
|
||||
my $dst_str = regmod($dst);
|
||||
return "$name r$reg,$dst_str";
|
||||
return "$name $src_str,$dst_str";
|
||||
|
||||
} elsif ($type eq "mark") {
|
||||
my $off = $code & 077;
|
||||
@@ -994,6 +998,7 @@ sub print_help {
|
||||
print " --help this message\n";
|
||||
print " --dump dump all information\n";
|
||||
print " --cdump dump only changes relative to prev cycle\n";
|
||||
print " --emcancel show em 'cancel' cycles when --t_ib active\n";
|
||||
print " --t_id trace instruction decodes\n";
|
||||
print " --t_ru trace register updates\n";
|
||||
print " --t_em trace em transactions\n";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- nroff -*-
|
||||
.\" $Id: ti_w11.1 1250 2022-07-10 10:21:03Z mueller $
|
||||
.\" $Id: ti_w11.1 1261 2022-07-23 16:15:03Z mueller $
|
||||
.\" SPDX-License-Identifier: GPL-3.0-or-later
|
||||
.\" Copyright 2013-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
.\"
|
||||
@@ -101,10 +101,12 @@ use 2nd serport with switched xon
|
||||
.PD
|
||||
.RE
|
||||
.IP \fB-tmu\fP
|
||||
activate trace and monitoring unit
|
||||
activate in simulations the trace and monitoring unit and write a trace of
|
||||
all w11 state transitions to file \fItmu_ofile\fP that can be analysed with
|
||||
\fBtmuconv\fP(1).
|
||||
.IP \fB-ghw\fP
|
||||
activate GHDL wave dump, will write a dump file with the name
|
||||
\fB<tb>.ghw\fR where <tb> is the filename of the test bench
|
||||
activate in simulations the GHDL wave dump, will write a dump file with the
|
||||
name \fB<tb>.ghw\fR where <tb> is the filename of the test bench
|
||||
.PD 0
|
||||
.PD
|
||||
.
|
||||
@@ -166,6 +168,7 @@ to file \fItmu_ofile\fP and can be analysed with \fBtmuconv\fP(1).
|
||||
.SH "SEE ALSO"
|
||||
.BR ti_rri (1),
|
||||
.BR asm-11 (1),
|
||||
.BR tmuconv (1),
|
||||
.BR lda-11 (5)
|
||||
|
||||
.\" ------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- nroff -*-
|
||||
.\" $Id: tmuconv.1 1258 2022-07-18 10:07:22Z mueller $
|
||||
.\" $Id: tmuconv.1 1261 2022-07-23 16:15:03Z mueller $
|
||||
.\" SPDX-License-Identifier: GPL-3.0-or-later
|
||||
.\" Copyright 2013-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
.\"
|
||||
@@ -13,14 +13,7 @@ tmuconv \- convert w11a tmu output into human readable format
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.SY tmuconv
|
||||
.OP \-dump
|
||||
.OP \-cdump
|
||||
.OP \-t_id
|
||||
.OP \-t_ru
|
||||
.OP \-t_em
|
||||
.OP \-t_vf
|
||||
.OP \-t_ib
|
||||
.OP \-t_all
|
||||
.RI [ OPTION ]...
|
||||
.I FILE
|
||||
.
|
||||
.SY tmuconv
|
||||
@@ -45,6 +38,10 @@ dump all information.
|
||||
dump only changes relative to previous cycle.
|
||||
.
|
||||
.\" ----------------------------------------------
|
||||
.IP "\fB\-emcancel\fR"
|
||||
show em 'cancel' cycles when \fB\-t_ib\fR active.
|
||||
.
|
||||
.\" ----------------------------------------------
|
||||
.IP "\fB\-t_id\fR"
|
||||
trace instruction decodes.
|
||||
.
|
||||
@@ -55,6 +52,10 @@ trace register updates.
|
||||
.\" ----------------------------------------------
|
||||
.IP "\fB\-t_em\fR"
|
||||
trace em transactions (external memory bus).
|
||||
em transactions that converted to an ib transaction are labeled 'cancel'.
|
||||
They are not shown when \fB\-t_ib\fR is active and no \fB\-emcancel\fR option
|
||||
is given. This gives the most readable output for \fB\-t_all\fR.
|
||||
|
||||
Reads from well known vector addresses are labeled 'VFETCH'.
|
||||
This is very helpful for the detection of interrupts.
|
||||
See also \fB\-t_vf\fR.
|
||||
@@ -68,7 +69,8 @@ trace only vector fetch em transactions (subset of \fB\-t_em\fR)
|
||||
.
|
||||
.\" ----------------------------------------------
|
||||
.IP "\fB\-t_ib\fR"
|
||||
trace ib transactions (ibus cycles)
|
||||
trace ib transactions (ibus cycles). em 'cancel' transactions are not shown
|
||||
unless the \fB\-emcancel\fR option is given.
|
||||
.
|
||||
.\" ----------------------------------------------
|
||||
.IP "\fB\-t_all\fR"
|
||||
@@ -202,8 +204,9 @@ if known, the symbolic name of the register
|
||||
.EE
|
||||
|
||||
The w11 CPU starts a cache cycle for each read or write, and cancels the
|
||||
cache request when an ibus access is detected. That's why an 'ib' line
|
||||
is usually preceded by an 'em' line with the 'cancel' flag, like
|
||||
cache request when an ibus access is detected. These transactions are usually
|
||||
suppressed when \fB\-t_ib\fP is active but are shown when \fB\-emcancel\fP
|
||||
is given, resulting in output like
|
||||
|
||||
.EX
|
||||
52582 em w 11 00177570 000001 cancel 1000 (1)
|
||||
@@ -222,12 +225,11 @@ accesses the output CSR of a DL11 interface will look like
|
||||
429 id 002002 000340 152764 bisb #nnn,nnn(r4) (5)
|
||||
431 em r 01 00002004 000004 0100 (1)
|
||||
433 em r 11 00002006 000004 0100 (1)
|
||||
435 em r 01 00177564 cancel 1100 (1)
|
||||
436 ib -- rm01 177564 000200 1 (0) to.csr
|
||||
439 ib -- wm01 177564 000204 1 (0) to.csr
|
||||
.EE
|
||||
|
||||
and shows the canceled em access and the ibus read-modify-write.
|
||||
and shows the ibus read-modify-write.
|
||||
|
||||
.IP "\fBtmuconv --t_all tmu_ofile\fR" 4
|
||||
Like above, in addition, also all register updates are shown. The execution
|
||||
@@ -235,7 +237,6 @@ of a 'cmp (r2),(r4)+' where r2 points to the psw will look like
|
||||
|
||||
.EX
|
||||
934 id 003014 000011 021224 cmp (r2),(r4)+ (9)
|
||||
936 em r 11 00177776 cancel 1000 (1)
|
||||
937 ib -- r 11 177776 000011 1 (0) psw
|
||||
939 ru 0 04 005676 003036 003040 177776 005700 005676*005570 r04
|
||||
940 em r 11 00005674 000011 0101 (1)
|
||||
|
||||
Reference in New Issue
Block a user