mirror of
https://github.com/wfjm/w11.git
synced 2026-05-05 07:34:43 +00:00
add dz11 backend
- RtraceTools: TraceBuffer: add level 5 (full word dump)
- Rw11Cntl: UnitSetupAll(): now virtual
- Rw11CntlBase: add kNUnit constant
- RtclRw11CntlFactory: add DZ11
- Rw11{Cntl,Unit}DZ11: added
- rw11/util.tcl: add dz11 support
- oskit/*/*_boot.tcl: add dz11 line handling in setup_tt call
This commit is contained in:
103
tools/tcl/ibd_dz11/util.tcl
Normal file
103
tools/tcl/ibd_dz11/util.tcl
Normal file
@@ -0,0 +1,103 @@
|
||||
# $Id: util.tcl 1150 2019-05-19 17:52:54Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# 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 3, 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
|
||||
# 2019-05-18 1150 1.0 Initial version
|
||||
# 2019-05-04 1146 0.1 First draft
|
||||
#
|
||||
|
||||
package provide ibd_dz11 1.0
|
||||
|
||||
package require rlink
|
||||
package require rw11util
|
||||
package require rw11
|
||||
|
||||
namespace eval ibd_dz11 {
|
||||
#
|
||||
# setup register descriptions for ibd_dz11 ---------------------------------
|
||||
#
|
||||
|
||||
regdsc CSR {trdy 15} {tie 14} {sa 13} {sae 12} {tline 10 3} \
|
||||
{rdone 7} {rie 6} {mse 5} {clr 4} {maint 3}
|
||||
regdsc RBUF {val 15} {ferr 13} {line 10 3} {data 7 8}
|
||||
regdsc LPR {rxon 12} {line 2 3}
|
||||
regdsc TCR {dtr 15 8} {lena 7 8}
|
||||
regdsc MSR {co 15 8} {ring 7 8}
|
||||
regdsc TDR {brk 15 8} {tbuf 7 8}
|
||||
|
||||
regdsc RCNTLR {awdth 10 3} {sam 7} {ssel 4 2 "s:DTLE:BRRX:CORI:RLCN"} \
|
||||
{mse 2} {maint 1}
|
||||
regdsc RCNTLW {data 15 8} {sam 7} {rcl 6} {tcl 5} \
|
||||
{ssel 4 2 "s:DTLE:BRRX:CORI:RLCN"} \
|
||||
{func 2 3 "s:NOOP:SCO:SRING:SRLIM:F4:F5:F6:F7"}
|
||||
regdsc RRLIMW {rrlim 14 3} {trlim 10 3} {rcl 6} {tcl 5} \
|
||||
{ssel 4 2 "s:DTLE:BRRX:CORI:RLCN"} \
|
||||
{func 2 3 "s:NOOP:SCO:SRING:SRLIM:F4:F5:F6:F7"}; # func=SRLIM
|
||||
regdsc RSTAT {dath 15 8} {datl 7 8}
|
||||
regdsc RSDTLE {dtr 15 8} {lena 7 8}
|
||||
regdsc RSBRRX {brk 15 8} {rxon 7 8}
|
||||
regdsc RSCORI {co 15 8} {ring 7 8}
|
||||
regdsc RSRLCN {rrlim 14 3} {trlim 10 3} {rir 7} {tir 6} {mse 5} {maint 3}
|
||||
regdsc RFUSE {rfuse 14 7 "d"} {tfuse 6 7 "d"}
|
||||
regdsc RFDAT {val 15} {last 14} {ferr 13} {cal 11} {line 10 3} {data 7 8}
|
||||
|
||||
variable CAL_DTR [bvi b3 "000"]
|
||||
variable CAL_BRK [bvi b3 "001"]
|
||||
variable CAL_RXON [bvi b3 "010"]
|
||||
variable CAL_CSR [bvi b3 "011"]
|
||||
|
||||
rw11util::regmap_add ibd_dz11 dz?.csr {l? CSR rr RCNTLR rw RCNTLW}
|
||||
rw11util::regmap_add ibd_dz11 dz?.rbuf {lr RBUF lw LPR rr RSTAT}
|
||||
rw11util::regmap_add ibd_dz11 dz?.tcr {l? TCR r? RFUSE}
|
||||
rw11util::regmap_add ibd_dz11 dz?.tdr {lr MSR lw TDR r? RFDAT}
|
||||
|
||||
variable ANUM 3; # DZ11
|
||||
|
||||
#
|
||||
# setup: create controller with default attributes -------------------------
|
||||
#
|
||||
proc setup {{cpu "cpu0"}} {
|
||||
return [rw11::setup_cntl $cpu "dz11" "dza"]
|
||||
}
|
||||
#
|
||||
# rdump: register dump - rem view ------------------------------------------
|
||||
#
|
||||
proc rdump {{cpu "cpu0"}} {
|
||||
set rval {}
|
||||
$cpu cp -rma "dza.csr" csr \
|
||||
-ribr "dza.csr" cntl \
|
||||
-ribr "dza.tcr" fuse \
|
||||
-wibr "dza.csr" [regbld ibd_dz11::RCNTLW {ssel "DTLE"}] \
|
||||
-ribr "dza.rbuf" dtle \
|
||||
-ribr "dza.rbuf" brrx \
|
||||
-ribr "dza.rbuf" cori \
|
||||
-ribr "dza.rbuf" rlcn
|
||||
append rval "Controller registers:"
|
||||
append rval [format "\n csr: %6.6o %s" $csr \
|
||||
[regtxt ibd_dz11::CSR $csr ]]
|
||||
append rval [format "\n cntl: %6.6o %s" $cntl \
|
||||
[regtxt ibd_dz11::RCNTLR $cntl]]
|
||||
append rval [format "\n fuse: %6.6o %s" $fuse \
|
||||
[regtxt ibd_dz11::RFUSE $fuse]]
|
||||
append rval [format "\n dtle: %6.6o %s" $dtle \
|
||||
[regtxt ibd_dz11::RSDTLE $dtle]]
|
||||
append rval [format "\n brrx: %6.6o %s" $brrx \
|
||||
[regtxt ibd_dz11::RSBRRX $brrx]]
|
||||
append rval [format "\n cori: %6.6o %s" $cori \
|
||||
[regtxt ibd_dz11::RSCORI $cori]]
|
||||
append rval [format "\n rlcn: %6.6o %s" $rlcn \
|
||||
[regtxt ibd_dz11::RSRLCN $rlcn]]
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: util.tcl 1140 2019-04-28 10:21:21Z mueller $
|
||||
# $Id: util.tcl 1148 2019-05-12 10:10:44Z mueller $
|
||||
#
|
||||
# Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
@@ -13,6 +13,7 @@
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-04 1146 1.3.13 add dz11 support
|
||||
# 2019-04-27 1140 1.3.12 setup_tt: add dl{rxqlim,txrlim}; dlrrlim->dlrxrlim
|
||||
# 2019-04-20 1134 1.3.11 setup_pp: add {pr,pp}rlim and prqlim options
|
||||
# 2019-04-14 1131 1.3.10 setup_lp: add rlim option
|
||||
@@ -75,6 +76,7 @@ namespace eval rw11 {
|
||||
}
|
||||
cpu0 add dl11
|
||||
cpu0 add dl11 -base 0176500 -lam 2
|
||||
cpu0 add dz11
|
||||
cpu0 add rk11
|
||||
cpu0 add rl11
|
||||
cpu0 add rhrp
|
||||
@@ -92,15 +94,15 @@ namespace eval rw11 {
|
||||
proc setup_tt {{cpu "cpu0"} args} {
|
||||
# process and check options
|
||||
args2opts opt {ndl 2 dlrxqlim 0 dlrxrlim 0 dltxrlim 0
|
||||
ndz 0
|
||||
ndz 0 dzrxqlim 0 dzrxrlim 0 dztxrlim 0 dzmodcntl 0
|
||||
to7bit 0 app 0 nbck 1} {*}$args
|
||||
|
||||
# check option values
|
||||
if {$opt(ndl) < 1 || $opt(ndl) > 2} {
|
||||
error "ndl option must be 1 or 2"
|
||||
}
|
||||
if {$opt(ndz) != 0} {
|
||||
error "ndz option must be 0 (till dz11 support is added)"
|
||||
if {$opt(ndz) < 0 || $opt(ndz) > 8} {
|
||||
error "ndz option must be 0...8"
|
||||
}
|
||||
|
||||
# setup attach url options
|
||||
@@ -122,12 +124,27 @@ namespace eval rw11 {
|
||||
# handle DL11 controllers
|
||||
foreach {cntl port} $dllist {
|
||||
set unit "${cntl}0"
|
||||
${cpu}${unit} att "tcp:?port=${port}"
|
||||
${cpu}${unit} set log "tirri_${unit}.log${urlopt}"
|
||||
${cpu}${cntl} set rxqlim $opt(dlrxqlim)
|
||||
${cpu}${cntl} set rxrlim $opt(dlrxrlim)
|
||||
${cpu}${cntl} set txrlim $opt(dltxrlim)
|
||||
${cpu}${unit} set to7bit $opt(to7bit)
|
||||
${cpu}${unit} att "tcp:?port=${port}"
|
||||
${cpu}${unit} set log "tirri_${unit}.log${urlopt}"
|
||||
}
|
||||
|
||||
# handle DZ11 controller and DZ11 units
|
||||
if {$opt(ndz) > 0} {
|
||||
${cpu}dza set rxqlim $opt(dzrxqlim)
|
||||
${cpu}dza set rxrlim $opt(dzrxrlim)
|
||||
${cpu}dza set txrlim $opt(dztxrlim)
|
||||
${cpu}dza set modcntl $opt(dzmodcntl)
|
||||
for {set i 0} {$i < $opt(ndz)} {incr i} {
|
||||
set unit "dza$i"
|
||||
set port [expr {8002+$i}]
|
||||
${cpu}${unit} set to7bit $opt(to7bit)
|
||||
${cpu}${unit} att "tcp:?port=${port}"
|
||||
${cpu}${unit} set log "tirri_${unit}.log${urlopt}"
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: regmap.tcl 1143 2019-05-01 13:25:51Z mueller $
|
||||
# $Id: regmap.tcl 1146 2019-05-05 06:25:13Z mueller $
|
||||
#
|
||||
# Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
@@ -13,6 +13,7 @@
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-04 1146 1.0.4 add ibd_dz11
|
||||
# 2019-04-30 1143 1.0.3 add ibd_m9312
|
||||
# 2019-03-03 1118 1.0.2 add ibd_ibtst
|
||||
# 2017-03-04 858 1.0.1 add ibd_deuna
|
||||
@@ -86,6 +87,7 @@ namespace eval rw11util {
|
||||
package require rw11
|
||||
package require ibd_deuna
|
||||
package require ibd_dl11
|
||||
package require ibd_dz11
|
||||
package require ibd_ibmon
|
||||
package require ibd_ibtst
|
||||
package require ibd_lp11
|
||||
@@ -99,5 +101,4 @@ namespace eval rw11util {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env tclshcpp
|
||||
# $Id: setup_packages 1143 2019-05-01 13:25:51Z mueller $
|
||||
# $Id: setup_packages 1146 2019-05-05 06:25:13Z mueller $
|
||||
#
|
||||
# pkg_mkIndex uses tclLog to write, which by default writes to stderr
|
||||
# this is 'make -s' unfriendly, so redefined tclLog to use plain puts
|
||||
@@ -29,6 +29,7 @@ pkg_mkIndex -verbose rw11util *.tcl
|
||||
# each package in following section should be also included in regmap.tcl
|
||||
pkg_mkIndex -verbose ibd_deuna *.tcl
|
||||
pkg_mkIndex -verbose ibd_dl11 *.tcl
|
||||
pkg_mkIndex -verbose ibd_dz11 *.tcl
|
||||
pkg_mkIndex -verbose ibd_ibmon *.tcl
|
||||
pkg_mkIndex -verbose ibd_ibtst *.tcl
|
||||
pkg_mkIndex -verbose ibd_lp11 *.tcl
|
||||
|
||||
Reference in New Issue
Block a user