mirror of
https://github.com/wfjm/w11.git
synced 2026-02-13 03:34:39 +00:00
- ibdr_{dl,lp,pc}11_buf: size->fuse rename; re-organize rlim handling
- ibd_{dl,lp,pc}11/util.tcl: size->fuse rename
- tbench/{dl,lp,pc}11/test_*.tcl: size->fuse rename
- librw11/Rw11CntlDL11: size->fuse rename; use unit.StatInc[RT]x
- librw11/Rw11Cntl{LP,LP}11: size->fuse rename
73 lines
2.5 KiB
Tcl
73 lines
2.5 KiB
Tcl
# $Id: util.tcl 1155 2019-05-31 06:38:06Z mueller $
|
|
#
|
|
# Copyright 2015-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-30 1155 1.1.1 size->fuse rename;
|
|
# 2019-04-22 1135 1.1 updates for buffered pc11
|
|
# 2015-12-26 719 1.0 Initial version
|
|
#
|
|
|
|
package provide ibd_pc11 1.0
|
|
|
|
package require rlink
|
|
package require rw11util
|
|
package require rw11
|
|
|
|
namespace eval ibd_pc11 {
|
|
#
|
|
# setup register descriptions for ibd_pc11 ---------------------------------
|
|
#
|
|
|
|
regdsc RCSR {err 15} {busy 11} {done 7} {ie 6} {ena 0}
|
|
regdsc RRCSR {err 15} {rlim 14 3} {busy 11} {type 10 3} \
|
|
{done 7} {ie 6} {ir 5} {rlb 4} {ique 3} {iack 2} {fclr 1}
|
|
regdsc RRBUF {rbusy 15} {rfuse 14 7 "d"} {pfuse 6 7 "d"}
|
|
|
|
regdsc PCSR {err 15} {rdy 7} {ie 6}
|
|
regdsc RPCSR {err 15} {rlim 14 3} {rdy 7} {ie 6} {ir 5} {rlb 4}
|
|
|
|
regdsc RPBUF {val 15} {fuse 14 7 "d"} {data 7 8 "o"}
|
|
|
|
rw11util::regmap_add ibd_pc11 pc?.rcsr {l? RCSR r? RRCSR}
|
|
rw11util::regmap_add ibd_pc11 pc?.rbuf {r? RRBUF}
|
|
rw11util::regmap_add ibd_pc11 pc?.pcsr {l? PCSR r? RPCSR}
|
|
rw11util::regmap_add ibd_pc11 pc?.pbuf {r? RPBUF}
|
|
|
|
variable ANUM 10
|
|
|
|
#
|
|
# setup: create controller with default attributes -------------------------
|
|
#
|
|
proc setup {{cpu "cpu0"}} {
|
|
return [rw11::setup_cntl $cpu "pc11" "pca"]
|
|
}
|
|
#
|
|
# rdump: register dump - rem view ------------------------------------------
|
|
#
|
|
proc rdump {{cpu "cpu0"}} {
|
|
set rval {}
|
|
$cpu cp -ribr "pca.rcsr" rcsr \
|
|
-ribr "pca.rbuf" rbuf \
|
|
-ribr "pca.pcsr" pcsr
|
|
append rval "Controller registers:"
|
|
append rval [format "\n rcsr: %6.6o %s" $rcsr \
|
|
[regtxt ibd_pc11::RRCSR $rcsr]]
|
|
append rval [format "\n rbuf: %6.6o %s" $rbuf \
|
|
[regtxt ibd_pc11::RRBUF $rbuf]]
|
|
append rval [format "\n pcsr: %6.6o %s" $pcsr \
|
|
[regtxt ibd_pc11::RPCSR $pcsr]]
|
|
|
|
}
|
|
}
|