URL
https://opencores.org/ocsvn/w11/w11/trunk
Subversion Repositories w11
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 20 to Rev 21
- ↔ Reverse comparison
Rev 20 → Rev 21
/w11/trunk/tools/simh/setup_w11a_min.scmd
0,0 → 1,85
; $Id: setup_w11a_min.scmd 518 2013-05-12 16:45:02Z mueller $ |
; |
; Setup file for 'minimal' w11a configuration under simh 3.8 and above |
; |
; This setup reflects the current w11a system on a S3BOARD |
; --> 1MByte, 2 DL11, LP+PC, RK05 |
; |
; 11/70 CPU no FPP, 1 MByte memory |
; 2 DL11 |
; 0 DZ11 |
; 1 LP11 |
; 1 PC11 |
; 1 RK11 + 8 RK05 drives |
; 0 RL11 + 0 RL01/02 drives |
; 0 RH70 + 0 RP06 drives |
; 0 TM11 + 0 drives |
; 0 DEUNA |
; |
; processor options |
; |
set cpu 11/70 |
set cpu nofpp |
set cpu 1m |
set cpu oct |
set cpu idle |
; |
; clock options |
; |
set clk 50hz |
; |
; terminal interface options |
; the default tti time=0 setting gives 50 chars/sec, slow |
; setting time=50000 (means 1 char every 50000 instructions) is much |
; faster and seems still save for old DEC OS like XXDP, RT-11, RXS11-M |
; |
set cons log=simh_dl0.log |
dep tti time 50000 |
set tto 8b |
; |
; 2nd DL11 interface options |
; Note: set dli vector=300 not allowed, rely on autoconf to set vec->300 |
; Note: default for DLO's is UC ! -> set to 8bit |
; |
set dli enabled |
set dli lines=1 |
att dli 5670 |
set dlo0 log=simh_dl1.log |
set dlo0 8b |
; |
; line printer |
; |
set lpt enabled |
att lpt simh_lpt.dat |
; |
; paper tape read/punch |
; |
set ptr enabled |
set ptp enabled |
att ptp simh_ptp.dat |
; |
; disk drives |
; |
set rk enabled |
; |
; tape drives (none) |
; ethernet interfaces (none) |
; |
; DISABLE all else |
; |
set dz disabled |
set rl disabled |
set rha disabled |
set rp disabled |
set tm disabled |
set xu disabled |
; |
set cr disabled |
set vh disabled |
set hk disabled |
set rx disabled |
set rq disabled |
set tq disabled |
; |
;sho conf |
; |
/w11/trunk/tools/simh/setup_w11a_max.scmd
0,0 → 1,97
; $Id: setup_w11a_max.scmd 518 2013-05-12 16:45:02Z mueller $ |
; |
; Setup file for 'maximal' w11a configuration under simh 3.8 and above |
; |
; This setup reflects the planned w11a system on a Nexys[234] board |
; --> 4 MByte, 2 DL11, DZ+LP+PC, RK05+RL02+RP06+TM11, DEUNA |
; |
; 11/70 CPU no FPP, 1 MByte memory |
; 2 DL11 |
; 1 DZ11 |
; 1 LP11 |
; 1 PC11 |
; 1 RK11 + 8 RK05 drives |
; 1 RL11 + 4 RL01/02 drives |
; 1 RH70 + 4 RP06 drives |
; 1 TM11 + 4 drives |
; 1 DEUNA |
; |
; processor options |
; |
set cpu 11/70 |
set cpu nofpp |
set cpu 4m |
set cpu oct |
set cpu idle |
; |
; clock options |
; |
set clk 50hz |
; |
; terminal interface options |
; the default tti time=0 setting gives 50 chars/sec, slow |
; setting time=50000 (means 1 char every 50000 instructions) is much |
; faster and seems still save for old DEC OS like XXDP, RT-11, RXS11-M |
; |
set cons log=simh_dl0.log |
dep tti time 50000 |
set tto 8b |
; |
; 2nd DL11 interface options |
; Note: set dli vector=300 not allowed, rely on autoconf to set vec->300 |
; Note: default for DLO's is UC ! -> set to 8bit |
; |
set dli enabled |
set dli lines=1 |
att dli 5670 |
set dlo0 log=simh_dl1.log |
set dlo0 8b |
; |
set dz enabled |
set dz lines=8 |
set dz vector=310 |
att dz -m 5671 |
set dz log=0=simh_dz0.log |
set dz log=1=simh_dz1.log |
set dz log=2=simh_dz2.log |
; dz log file names must be quoted, otherwise they'll be uppercased ! |
; |
; line printer |
; |
set lpt enabled |
att lpt simh_lpt.dat |
; |
; paper tape read/punch |
; |
set ptr enabled |
set ptp enabled |
att ptp simh_ptp.dat |
; |
; disk drives |
; |
set rk enabled |
; |
set rl enabled |
; |
set rha enabled |
set rp enabled |
; |
; tape drives |
; |
set tm enabled |
; |
; ethernet interfaces |
; |
set xu enabled |
; |
; DISABLE all else |
; |
set cr disabled |
set vh disabled |
set hk disabled |
set rx disabled |
set rq disabled |
set tq disabled |
; |
;sho conf |
; |
w11/trunk/tools/simh
Property changes :
Added: svn:ignore
## -0,0 +1,32 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
Index: w11/trunk/tools/tcl/rutil/util.tcl
===================================================================
--- w11/trunk/tools/tcl/rutil/util.tcl (revision 20)
+++ w11/trunk/tools/tcl/rutil/util.tcl (revision 21)
@@ -1,6 +1,6 @@
-# $Id: util.tcl 502 2013-04-02 19:29:30Z mueller $
+# $Id: util.tcl 517 2013-05-09 21:34:45Z mueller $
#
-# Copyright 2011- by Walter F.J. Mueller
+# Copyright 2011-2013 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
+# 2013-05-09 517 1.0.1 add optlist2arr
# 2011-03-27 374 1.0 Initial version
# 2011-03-19 372 0.1 First draft
#
@@ -23,6 +24,23 @@
namespace eval rutil {
#
+ # optlist2arr: process options arguments given as key value list
+ #
+ proc optlist2arr {outarrname refarrname optlist} {
+ upvar $outarrname outarr
+ upvar $refarrname refarr
+ array set outarr [array get refarr]
+ foreach {key value} $optlist {
+ if {[info exists outarr($key)]} {
+ set outarr($key) $value
+ } else {
+ error "key $key not valid in optlist"
+ }
+ }
+ return ""
+ }
+
+ #
# regdsc: setup a register descriptor
#
proc regdsc {name args} {
@@ -46,18 +64,18 @@
error "error in field dsc \"$arg\": length > start position"
}
- set mskb [expr ( 1 << $flen ) - 1]
- set mskf [expr $mskb << ( $fbeg - ( $flen - 1 ) )]
+ set mskb [expr {( 1 << $flen ) - 1}]
+ set mskf [expr {$mskb << ( $fbeg - ( $flen - 1 ) )}]
set rdsc($fnam) [list $fbeg $flen $mskb $mskf $popt]
if {$fbegmax < $fbeg} {set fbegmax $fbeg}
- set mskftot [expr $mskftot | $mskf]
+ set mskftot [expr {$mskftot | $mskf}]
}
set rdsc(-n) [lsort -decreasing -command regdsc_sort \
[array names rdsc -regexp {^[^-]}] ]
- set rdsc(-w) [expr $fbegmax + 1]
+ set rdsc(-w) [expr {$fbegmax + 1}]
set rdsc(-m) $mskftot
return ""
@@ -85,7 +103,7 @@
set line " "
append line [format "%8s" $fnam]
if {$flen > 1} {
- append line [format " %2d:%2d" $fbeg [expr $fbeg - $flen + 1]]
+ append line [format " %2d:%2d" $fbeg [expr {$fbeg - $flen + 1}]]
} else {
append line [format " %2d" $fbeg]
}
@@ -98,7 +116,7 @@
proc regdsc_sort {a b} {
upvar rdsc urdsc
- return [expr [lindex $urdsc($a) 0] - [lindex $urdsc($b) 0]]
+ return [expr {[lindex $urdsc($a) 0] - [lindex $urdsc($b) 0] }]
}
#
@@ -123,7 +141,7 @@
error "error in field specifier \"$arg\": no value and flen>1"
}
set mskf [lindex $rdsc($fnam) 3]
- set rval [expr $rval | $mskf]
+ set rval [expr {$rval | $mskf}]
} else {
set fval [lindex $arg 1]
@@ -133,12 +151,12 @@
error "error in field specifier \"$arg\": value > $mskb"
}
} else {
- if {$fval < [expr - $mskb]} {
+ if {$fval < [expr {- $mskb}]} {
error "error in field specifier \"$arg\": value < [expr -$mskb]"
}
- set fval [expr $fval & $mskb]
+ set fval [expr {$fval & $mskb}]
}
- set rval [expr $rval | $fval << ( $fbeg - ( $flen - 1 ) )]
+ set rval [expr {$rval | $fval << ( $fbeg - ( $flen - 1 ) )}]
}
}
@@ -153,7 +171,7 @@
set fbeg [lindex $fdsc 0]
set flen [lindex $fdsc 1]
set mskb [lindex $fdsc 2]
- return [expr ( $val >> ( $fbeg - ( $flen - 1 ) ) ) & $mskb]
+ return [expr {( $val >> ( $fbeg - ( $flen - 1 ) ) ) & $mskb}]
}
#
/w11/trunk/tools/tcl/rbemon/test_regs.tcl
1,6 → 1,6
# $Id: test_regs.tcl 440 2011-12-18 20:08:09Z mueller $ |
# $Id: test_regs.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
65,13 → 65,13
# |
#------------------------------------------------------------------------- |
rlc log " test 2: verify addr increments on data reads" |
foreach addr [list 0x0 0x011 [expr $amax - 1]] { |
foreach addr [list 0x0 0x011 [expr {$amax - 1}]] { |
rlc exec -estatdef $esdval $esdmsk \ |
-wreg em.addr $addr \ |
-rreg em.data \ |
-rreg em.addr -edata [expr ( $addr + 1 ) & $amax] \ |
-rreg em.addr -edata [expr {( $addr + 1 ) & $amax}] \ |
-rreg em.data \ |
-rreg em.addr -edata [expr ( $addr + 2 ) & $amax] |
-rreg em.addr -edata [expr {( $addr + 2 ) & $amax}] |
} |
# |
#------------------------------------------------------------------------- |
/w11/trunk/tools/tcl/rbemon/test_rbtest_sim.tcl
1,6 → 1,6
# $Id: test_rbtest_sim.tcl 376 2011-04-17 12:24:07Z mueller $ |
# $Id: test_rbtest_sim.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
62,7 → 62,7
] { |
set bdata {} |
for {set i 0} {$i < $bsize} {incr i} { |
lappend bdata [expr ( $pat << 8 ) | $pat] |
lappend bdata [expr {( $pat << 8 ) | $pat}] |
} |
|
rbemon::clear |
/w11/trunk/tools/tcl/rbemon/util.tcl
1,6 → 1,6
# $Id: util.tcl 376 2011-04-17 12:24:07Z mueller $ |
# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
33,10 → 33,10
# setup: amap definitions for rbd_eyemon |
# |
proc setup {base} { |
rlc amap -insert em.cntl [expr $base + 0x00] |
rlc amap -insert em.rdiv [expr $base + 0x01] |
rlc amap -insert em.addr [expr $base + 0x02] |
rlc amap -insert em.data [expr $base + 0x03] |
rlc amap -insert em.cntl [expr {$base + 0x00}] |
rlc amap -insert em.rdiv [expr {$base + 0x01}] |
rlc amap -insert em.addr [expr {$base + 0x02}] |
rlc amap -insert em.data [expr {$base + 0x03}] |
} |
# |
# init: reset rbd_eyemon (stop monitor, clear rdiv and addr) |
52,12 → 52,12
proc clear {} { |
set clrbit [regbld rbemon::CNTL clr] |
rlc exec -rreg em.cntl cur_cntl |
rlc exec -wreg em.cntl [expr $cur_cntl | $clrbit] |
rlc exec -wreg em.cntl [expr {$cur_cntl | $clrbit}] |
set clrrun $clrbit |
set npoll 0 |
while {$clrrun != 0} { |
rlc exec -rreg em.cntl cur_cntl |
set clrrun [expr $cur_cntl & $clrbit] |
set clrrun [expr {$cur_cntl & $clrbit}] |
incr npoll 1 |
if {$npoll > 10} { |
error "-E: rbemon::clear failed, CNTL.clr didn't go back to 0" |
89,16 → 89,16
set addr 0 |
set rval {} |
while {$nval > 0} { |
set nblk [expr $nval << 1] |
set nblk [expr {$nval << 1}] |
if {$nblk > 256} {set nblk 256} |
rlc exec \ |
-wreg em.addr $addr \ |
-rblk em.data $nblk rawdat |
foreach {dl dh} $rawdat { |
lappend rval [expr ( $dh << 16 ) | $dl] |
lappend rval [expr {( $dh << 16 ) | $dl}] |
} |
incr addr $nblk |
set nval [expr $nval - ( $nblk >> 1 ) ] |
set nval [expr {$nval - ( $nblk >> 1 ) }] |
} |
return $rval |
} |
/w11/trunk/tools/tcl/rbtest/test_fifo.tcl
1,6 → 1,6
# $Id: test_fifo.tcl 375 2011-04-02 07:56:47Z mueller $ |
# $Id: test_fifo.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
77,7 → 77,7
rlc log " test 3b: fifo write error (write 17, read 16)" |
set blk {} |
for { set i 0 } { $i < 17 } { incr i } { |
lappend blk [expr $i | ( $i << 8 ) ] |
lappend blk [expr {$i | ( $i << 8 ) }] |
} |
rlc exec -estatdef $esdval $esdmsk \ |
-wblk te.fifo $blk -estat [regbld rlink::STAT rberr] $esdmsk \ |
124,10 → 124,10
set valc [regbld rbtest::CNTL [list nbusy $nbusy]] |
rlc exec -estatdef $esdval $esdmsk \ |
-wreg te.cntl $valc \ |
-wreg te.fifo [expr $nbusy | ( $nbusy << 8 ) ] \ |
-rreg te.attn -edata [expr $nbusy + 1 ] \ |
-rreg te.fifo -edata [expr $nbusy | ( $nbusy << 8 ) ] \ |
-rreg te.attn -edata [expr $nbusy + 1 ] |
-wreg te.fifo [expr {$nbusy | ( $nbusy << 8 ) }] \ |
-rreg te.attn -edata [expr {$nbusy + 1 }] \ |
-rreg te.fifo -edata [expr {$nbusy | ( $nbusy << 8 ) }] \ |
-rreg te.attn -edata [expr {$nbusy + 1 }] |
} |
# |
#------------------------------------------------------------------------- |
135,8 → 135,8
for {set i 0} {$i < 8} {incr i} { |
set blk {} |
for {set j 0} {$j < 16} {incr j} { |
set bcode [expr 32 * $i + 2 * $j] |
lappend blk [expr ( $bcode << 8 ) | ( $bcode + 1 )] |
set bcode [expr {32 * $i + 2 * $j}] |
lappend blk [expr {( $bcode << 8 ) | ( $bcode + 1 )}] |
} |
rlc exec -estatdef $esdval $esdmsk \ |
-wblk te.fifo $blk \ |
/w11/trunk/tools/tcl/rbtest/test_attn.tcl
1,6 → 1,6
# $Id: test_attn.tcl 375 2011-04-02 07:56:47Z mueller $ |
# $Id: test_attn.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
36,8 → 36,8
# |
set apats {} |
for {set i 0} {$i < 16} {incr i} { |
set apat [expr 1 << $i] |
if {[expr $apat & $attnmsk]} {lappend apats $apat} |
set apat [expr {1 << $i}] |
if {[expr {$apat & $attnmsk}]} {lappend apats $apat} |
} |
# |
set errcnt 0 |
/w11/trunk/tools/tcl/rbtest/test_data.tcl
1,6 → 1,6
# $Id: test_data.tcl 375 2011-04-02 07:56:47Z mueller $ |
# $Id: test_data.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
64,7 → 64,7
rlc log " test 1c: as test 1, now cntl.stat field is used" |
foreach stat {0x1 0x3 0x7 0x0} { |
set valc [regbld rbtest::CNTL [list stat $stat]] |
set vald [expr $stat | ( $stat << 8 ) ] |
set vald [expr {$stat | ( $stat << 8 ) }] |
rlc exec -estatdef $esdval $esdmsk \ |
-wreg te.cntl $valc \ |
-wreg te.data $vald \ |
123,10 → 123,10
set valc [regbld rbtest::CNTL [list nbusy $nbusy]] |
rlc exec -estatdef $esdval $esdmsk \ |
-wreg te.cntl $valc \ |
-wreg te.data [expr $nbusy | ( $nbusy << 8 ) ] \ |
-rreg te.attn -edata [expr $nbusy + 1 ] \ |
-rreg te.data -edata [expr $nbusy | ( $nbusy << 8 ) ] \ |
-rreg te.attn -edata [expr $nbusy + 1 ] |
-wreg te.data [expr {$nbusy | ( $nbusy << 8 ) }] \ |
-rreg te.attn -edata [expr {$nbusy + 1 }] \ |
-rreg te.data -edata [expr {$nbusy | ( $nbusy << 8 ) }] \ |
-rreg te.attn -edata [expr {$nbusy + 1 }] |
} |
# |
# ------------------------------------------------------------------------- |
/w11/trunk/tools/tcl/rbtest/test_stat.tcl
1,6 → 1,6
# $Id: test_stat.tcl 375 2011-04-02 07:56:47Z mueller $ |
# $Id: test_stat.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
41,8 → 41,8
#------------------------------------------------------------------------- |
rlc log " test 1: verify connection of cntl stat bits to stat return" |
for {set i 0} {$i < 3} {incr i} { |
set spat [expr 1 << $i] |
if {[expr $spat & $statmsk]} { |
set spat [expr {1 << $i}] |
if {[expr {$spat & $statmsk}]} { |
set cntl [regbld rbtest::CNTL [list stat $spat]] |
rlc exec \ |
-wreg te.cntl $cntl \ |
/w11/trunk/tools/tcl/rbtest/util.tcl
1,6 → 1,6
# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $ |
# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
33,10 → 33,10
# setup: amap definitions for rbd_tester |
# |
proc setup {{base 0x00f0}} { |
rlc amap -insert te.cntl [expr $base + 0x00] |
rlc amap -insert te.data [expr $base + 0x01] |
rlc amap -insert te.fifo [expr $base + 0x02] |
rlc amap -insert te.attn [expr $base + 0x03] |
rlc amap -insert te.cntl [expr {$base + 0x00}] |
rlc amap -insert te.data [expr {$base + 0x01}] |
rlc amap -insert te.fifo [expr {$base + 0x02}] |
rlc amap -insert te.attn [expr {$base + 0x03}] |
} |
# |
# init: reset rbd_tester (clear via init) |
56,7 → 56,7
-rreg te.attn ncyc |
rlc exec -estatdef 0 $esdmsk \ |
-wreg te.cntl $sav_cntl |
return [expr $ncyc - 1] |
return [expr {$ncyc - 1}] |
} |
# |
# probe: determine rbd_tester environment (max nbusy, stat and attn wiring) |
75,9 → 75,9
set wrerr {} |
set rderr {} |
for {set i 3} { $i < 8 } {incr i} { |
set nbusy0 [expr ( 1 << $i )] |
set nbusy0 [expr {( 1 << $i )}] |
for {set j -1} { $j <= 1 } {incr j} { |
set nbusy [expr $nbusy0 + $j] |
set nbusy [expr {$nbusy0 + $j}] |
set valc [regbld rbtest::CNTL [list nbusy $nbusy]] |
rlc exec \ |
-wreg te.cntl $valc -estat $esdval $esdmsk\ |
97,7 → 97,7
# probe stat wiring |
# |
for {set i 0} { $i < 3 } {incr i} { |
set valc [regbld rbtest::CNTL [list stat [expr 1 << $i]]] |
set valc [regbld rbtest::CNTL [list stat [expr {1 << $i}]]] |
rlc exec -estatdef $esdval $esdmsk \ |
-wreg te.cntl $valc \ |
-rreg te.data dummy statrd |
110,7 → 110,7
rlc exec -attn |
for {set i 0} { $i < 16 } {incr i} { |
rlc exec -estatdef $esdval $esdmskatt \ |
-wreg te.attn [expr 1 << $i] \ |
-wreg te.attn [expr {1 << $i}] \ |
-attn attnpat |
lappend rattn [list $i $attnpat] |
} |
158,7 → 158,7
# |
proc print_bitind {pat} { |
for {set i 0} { $i < 16 } {incr i} { |
if {[expr $pat & [expr 1 << $i]]} { return $i} |
if {[expr {$pat & [expr {1 << $i}] }] } { return $i} |
} |
return -1 |
} |
/w11/trunk/tools/tcl/rbbram/perf.tcl
1,4 → 1,4
# $Id: perf.tcl 469 2013-01-05 12:29:44Z mueller $ |
# $Id: perf.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# |
40,9 → 40,9
set wbuf3 {} |
for {set i 0} {$i < $nblk} {incr i} { |
lappend wbuf0 $i |
lappend wbuf1 [expr 0x1000 + $i] |
lappend wbuf2 [expr 0x2000 + $i] |
lappend wbuf3 [expr 0x3000 + $i] |
lappend wbuf1 [expr {0x1000 + $i}] |
lappend wbuf2 [expr {0x2000 + $i}] |
lappend wbuf3 [expr {0x3000 + $i}] |
} |
|
set pval {} |
55,9 → 55,9
rlc exec \ |
-wreg br.cntl $addr \ |
-wblk br.data $wbuf0 |
set trun [expr [clock clicks -milliseconds] - $tbeg] |
set trun [expr {[clock clicks -milliseconds] - $tbeg}] |
if {$trun > $tmax} { break } |
set addr [expr ( $addr + $nblk ) & $amax] |
set addr [expr {( $addr + $nblk ) & $amax}] |
} |
lappend pval 1 $i $trun |
|
70,9 → 70,9
-wreg br.cntl $addr \ |
-wblk br.data $wbuf0 \ |
-wblk br.data $wbuf1 |
set trun [expr [clock clicks -milliseconds] - $tbeg] |
set trun [expr {[clock clicks -milliseconds] - $tbeg}] |
if {$trun > $tmax} { break } |
set addr [expr ( $addr + 2 * $nblk ) & $amax] |
set addr [expr {( $addr + 2 * $nblk ) & $amax}] |
} |
lappend pval 2 $i $trun |
|
87,9 → 87,9
-wblk br.data $wbuf1 \ |
-wblk br.data $wbuf2 \ |
-wblk br.data $wbuf3 |
set trun [expr [clock clicks -milliseconds] - $tbeg] |
set trun [expr {[clock clicks -milliseconds] - $tbeg}] |
if {$trun > $tmax} { break } |
set addr [expr ( $addr + 4 * $nblk ) & $amax] |
set addr [expr {( $addr + 4 * $nblk ) & $amax}] |
} |
lappend pval 4 $i $trun |
|
101,9 → 101,9
rlc exec \ |
-wreg br.cntl $addr \ |
-rblk br.data $nblk rbuf0 |
set trun [expr [clock clicks -milliseconds] - $tbeg] |
set trun [expr {[clock clicks -milliseconds] - $tbeg}] |
if {$trun > $tmax} { break } |
set addr [expr ( $addr + $nblk ) & $amax] |
set addr [expr {( $addr + $nblk ) & $amax}] |
} |
lappend pval 1 $i $trun |
|
116,9 → 116,9
-wreg br.cntl $addr \ |
-rblk br.data $nblk rbuf0 \ |
-rblk br.data $nblk rbuf1 |
set trun [expr [clock clicks -milliseconds] - $tbeg] |
set trun [expr {[clock clicks -milliseconds] - $tbeg}] |
if {$trun > $tmax} { break } |
set addr [expr ( $addr + 2 * $nblk ) & $amax] |
set addr [expr {( $addr + 2 * $nblk ) & $amax}] |
} |
lappend pval 2 $i $trun |
|
133,16 → 133,16
-rblk br.data $nblk rbuf1 \ |
-rblk br.data $nblk rbuf2 \ |
-rblk br.data $nblk rbuf3 |
set trun [expr [clock clicks -milliseconds] - $tbeg] |
set trun [expr {[clock clicks -milliseconds] - $tbeg}] |
if {$trun > $tmax} { break } |
set addr [expr ( $addr + 4 * $nblk ) & $amax] |
set addr [expr {( $addr + 4 * $nblk ) & $amax}] |
} |
lappend pval 4 $i $trun |
|
set oline [format "\n%4d" $nblk] |
foreach {nr i trun} $pval { |
set ms [expr double($trun) / double($nr*$i)] |
set kb [expr double(2*$nr*$i*$nblk) / double($trun)] |
set ms [expr {double($trun) / double($nr*$i)}] |
set kb [expr {double(2*$nr*$i*$nblk) / double($trun)}] |
if { $ms < 9.94 } { |
append oline [format " %5.2f" $ms] |
} else { |
/w11/trunk/tools/tcl/rbbram/util.tcl
1,6 → 1,6
# $Id: util.tcl 376 2011-04-17 12:24:07Z mueller $ |
# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
27,8 → 27,8
# setup: amap definitions for rbd_bram |
# |
proc setup {{base 0x00f4}} { |
rlc amap -insert br.cntl [expr $base + 0x00] |
rlc amap -insert br.data [expr $base + 0x01] |
rlc amap -insert br.cntl [expr {$base + 0x00}] |
rlc amap -insert br.data [expr {$base + 0x01}] |
} |
# |
# init: reset rbd_bram (clear cntl register) |
/w11/trunk/tools/tcl/rbmoni/test_rbtest.tcl
1,6 → 1,6
# $Id: test_rbtest.tcl 375 2011-04-02 07:56:47Z mueller $ |
# $Id: test_rbtest.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
81,7 → 81,7
rlc exec -estatdef $esdval $esdmsk \ |
-wreg rm.addr $addr \ |
-rreg rm.data -edata [lindex $edat $addr] [lindex $emsk $addr] \ |
-rreg rm.addr -edata [expr $addr + 1] |
-rreg rm.addr -edata [expr {$addr + 1}] |
} |
# |
#------------------------------------------------------------------------- |
89,9 → 89,9
foreach addr {0x1 0x3 0x5 0x6 0x4 0x2 0x0} { |
rlc exec -estatdef $esdval $esdmsk \ |
-wreg rm.addr $addr \ |
-rblk rm.data 2 -edata [lrange $edat $addr [expr $addr + 1] ] \ |
[lrange $emsk $addr [expr $addr + 1] ] \ |
-rreg rm.addr -edata [expr $addr + 2] |
-rblk rm.data 2 -edata [lrange $edat $addr [expr {$addr + 1}] ] \ |
[lrange $emsk $addr [expr {$addr + 1}] ] \ |
-rreg rm.addr -edata [expr {$addr + 2}] |
} |
# |
#------------------------------------------------------------------------- |
/w11/trunk/tools/tcl/rbmoni/util.tcl
1,6 → 1,6
# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $ |
# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
41,10 → 41,10
# setup: amap definitions for rbd_rbmon |
# |
proc setup {{base 0x00fc}} { |
rlc amap -insert rm.cntl [expr $base + 0x00] |
rlc amap -insert rm.alim [expr $base + 0x01] |
rlc amap -insert rm.addr [expr $base + 0x02] |
rlc amap -insert rm.data [expr $base + 0x03] |
rlc amap -insert rm.cntl [expr {$base + 0x00}] |
rlc amap -insert rm.alim [expr {$base + 0x01}] |
rlc amap -insert rm.addr [expr {$base + 0x02}] |
rlc amap -insert rm.data [expr {$base + 0x03}] |
} |
# |
# init: reset rbd_rbmon (stop, reset alim) |
83,13 → 83,13
if {$nent > $nval} {set nent $nval} |
if {$nent == 0} { return {} } |
|
set caddr [expr ( $laddr - $nent ) & $amax] |
set caddr [expr {( $laddr - $nent ) & $amax}] |
rlc exec -wreg rm.addr [regbld rbmoni::ADDR [list laddr $caddr]] |
|
set rval {} |
|
while {$nent > 0} { |
set nblk [expr $nent << 2] |
set nblk [expr {$nent << 2}] |
if {$nblk > 256} {set nblk 256} |
rlc exec -rblk rm.data $nblk rawdat |
|
96,12 → 96,12
foreach {d0 d1 d2 d3} $rawdat { |
set eflag [regget rbmoni::DAT3(flags) $d3] |
set eaddr [regget rbmoni::DAT3(addr) $d3] |
set edly [expr ( [regget rbmoni::DAT0(ndlymsb) $d0] << 16 ) | $d1] |
set edly [expr {( [regget rbmoni::DAT0(ndlymsb) $d0] << 16 ) | $d1 }] |
set enbusy [regget rbmoni::DAT0(nbusy) $d0] |
lappend rval [list $eflag $eaddr $d2 $edly $enbusy] |
} |
|
set nent [expr $nent - ( $nblk >> 2 ) ] |
set nent [expr {$nent - ( $nblk >> 2 ) }] |
} |
|
rlc exec -wreg rm.addr $raddr |
123,7 → 123,7
|
set rval {} |
|
set eind [expr 1 - [llength $mondat]] |
set eind [expr {1 - [llength $mondat] }] |
append rval " ind addr data delay nbusy ac bs er na to in we" |
|
foreach {ele} $mondat { |
165,7 → 165,7
set uedat {} |
set uemsk {} |
|
set m0 [expr 0xffff & ~[regget rbmoni::DAT0(nbusy) -1] ] |
set m0 [expr {0xffff & ~[regget rbmoni::DAT0(nbusy) -1] }] |
set d1 0x0000 |
set m1 0xffff |
set m3 0x0000 |
/w11/trunk/tools/tcl/rbs3hio/util.tcl
1,6 → 1,6
# $Id: util.tcl 406 2011-08-14 21:06:44Z mueller $ |
# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2011-2013 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 |
35,10 → 35,10
# setup: amap definitions for s3_humanio_rbus |
# |
proc setup {base} { |
rlc amap -insert hi.cntl [expr $base + 0x00] |
rlc amap -insert hi.swi [expr $base + 0x01] |
rlc amap -insert hi.led [expr $base + 0x02] |
rlc amap -insert hi.dsp [expr $base + 0x03] |
rlc amap -insert hi.cntl [expr {$base + 0x00}] |
rlc amap -insert hi.swi [expr {$base + 0x01}] |
rlc amap -insert hi.led [expr {$base + 0x02}] |
rlc amap -insert hi.dsp [expr {$base + 0x03}] |
} |
|
# |
65,8 → 65,8
append rval "\n led: [pbvi b8 $led]" |
set dspval "" |
for {set i 3} {$i >= 0} {incr i -1} { |
set digval [expr ( $r_dsp >> ( 4 * $i ) ) & 0x0f] |
set digdp [expr ( $dp >> $i ) & 0x01] |
set digval [expr {( $r_dsp >> ( 4 * $i ) ) & 0x0f}] |
set digdp [expr {( $dp >> $i ) & 0x01}] |
append dspval [format "%x" $digval] |
if {$digdp} {append dspval "."} else {append dspval " "} |
} |
84,7 → 84,7
[list swien $swien] ] |
|
foreach ledval {0x0f 0xf0 0xff} { |
set dpval [expr $ledval & 0x0f] |
set dpval [expr {$ledval & 0x0f}] |
set hiled [regbld rbs3hio::LED [list led $ledval] [list dp $dpval]] |
rlc exec \ |
-wreg hi.led $hiled \ |
93,8 → 93,8
} |
|
for {set i 0} {$i <= 0xf} {incr i} { |
set ledval [expr ( $i << 4 ) | $i] |
set dspval [expr ( $ledval << 8 ) | $ledval] |
set ledval [expr {( $i << 4 ) | $i}] |
set dspval [expr {( $ledval << 8 ) | $ledval}] |
set hiled [regbld rbs3hio::LED [list led $ledval] [list dp $i]] |
rlc exec \ |
-wreg hi.led $hiled \ |
104,14 → 104,14
|
set ledval 0x01 |
for {set i 0} {$i < 32} {incr i} { |
set dpval [expr $ledval & 0x0f] |
set dpval [expr {$ledval & 0x0f}] |
set hiled [regbld rbs3hio::LED [list led $ledval] [list dp $dpval]] |
rlc exec \ |
-wreg hi.led $hiled \ |
-wreg hi.dsp $i |
after 50 |
set ledval [expr $ledval << 1] |
if {$ledval & 0x100} {set ledval [expr ( $ledval & 0xff ) | 0x01]} |
set ledval [expr {$ledval << 1}] |
if {$ledval & 0x100} {set ledval [expr {( $ledval & 0xff ) | 0x01}] } |
} |
|
rlc exec \ |
/w11/trunk/tools/tcl/tst_rlink/perf.tcl
1,4 → 1,4
# $Id: perf.tcl 376 2011-04-17 12:24:07Z mueller $ |
# $Id: perf.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# |
42,10 → 42,10
rlc exec \ |
-attn \ |
-wreg timer.0 $dly |
set trun [expr [clock clicks -milliseconds] - $tbeg] |
set trun [expr {[clock clicks -milliseconds] - $tbeg}] |
if {$trun > $tmax} { break } |
} |
set ms [expr double($trun) / double($i)] |
set ms [expr {double($trun) / double($i)}] |
append rval [format "\n%5d %6.2f" $dly $ms] |
} |
|
/w11/trunk/tools/tcl/tst_rlink/util.tcl
1,4 → 1,4
# $Id: util.tcl 376 2011-04-17 12:24:07Z mueller $ |
# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# |
73,9 → 73,9
rlc close |
rlc open "term:$rldev?baud=${baud};break" |
rlc exec -rreg hi.dsp hidsp |
set mhz [expr double($baud*$hidsp) / 1.e6] |
set mhz [expr {double($baud*$hidsp) / 1.e6}] |
append rval [format "\n%7d 0x%4.4x %6d %6.2f" \ |
$baud $hidsp [expr $hidsp + 1] $mhz] |
$baud $hidsp [expr {$hidsp + 1}] $mhz] |
} |
|
rlc close |
/w11/trunk/tools/tcl/rw11/cpumon.tcl
1,4 → 1,4
# $Id: cpumon.tcl 511 2013-04-27 13:51:46Z mueller $ |
# $Id: cpumon.tcl 512 2013-04-28 07:44:02Z mueller $ |
# |
# Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# |
80,7 → 80,7
|
if {$cpumon_active} { |
puts "CPU down attention" |
puts [cpu0 show -pcps] |
puts [cpu0 show -r0ps] |
# restore ti_rri prompt and eof handling |
if { $tirri_interactive } { |
rename ::tclreadline::prompt1 {} |
/w11/trunk/tools/tcl/rw11/cpucons.tcl
1,4 → 1,4
# $Id: cpucons.tcl 511 2013-04-27 13:51:46Z mueller $ |
# $Id: cpucons.tcl 512 2013-04-28 07:44:02Z mueller $ |
# |
# Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# |
50,10 → 50,10
} |
|
# |
# '?' show current PC and PS and R0-R5 |
# '?' show current PC and PS and R0-R6 |
# |
proc "?" {} { |
return [cpu0 show -pcps -r0r5] |
return [cpu0 show -r0ps] |
} |
|
# |
/w11/trunk/tools/tcl/rw11/util.tcl
1,4 → 1,4
# $Id: util.tcl 510 2013-04-26 16:14:57Z mueller $ |
# $Id: util.tcl 517 2013-05-09 21:34:45Z mueller $ |
# |
# Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# |
13,6 → 13,7
# |
# Revision History: |
# Date Rev Version Comment |
# 2013-05-09 517 1.1.2 add setup_(tt|lp|pp|ostr) device setup procs |
# 2013-04-26 510 1.1.1 split, asm* and tbench* into separate files |
# 2013-04-01 501 1.1 add regdsc's and asm* procs |
# 2013-02-02 380 1.0 Initial version |
55,11 → 56,110
cpu0 add dl11 |
cpu0 add dl11 -base 0176500 -lam 2 |
cpu0 add rk11 |
cpu0 add lp11 |
cpu0 add pc11 |
rlw start |
return "" |
} |
|
# |
# setup_tt: setup terminals |
# |
proc setup_tt {{cpu "cpu0"} {optlist {}}} { |
# process and check options |
array set optref { ndl 2 dlrlim 0 ndz 0 to7bit 0 app 0 nbck 1} |
rutil::optlist2arr opt optref $optlist |
|
# 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)" |
} |
|
# setup attach url options |
set urlopt "?crlf" |
if {$opt(app) != 0} { |
append urlopt ";app" |
} |
if {$opt(nbck) != 0} { |
append urlopt ";bck=$opt(nbck)" |
} |
|
# setup list if DL11 controllers |
set dllist {} |
lappend dllist "tta" "8000" |
if {$opt(ndl) == 2} { |
lappend dllist "ttb" "8001" |
} |
|
# 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}" |
if {$opt(dlrlim) != 0} { |
${cpu}${cntl} set rxrlim 7 |
} |
if {$opt(to7bit) != 0} { |
${cpu}${unit} set to7bit 1 |
} |
} |
return "" |
} |
|
# |
# setup_ostr: setup Ostream device (currently lp or pp) |
# |
proc setup_ostr {cpu unit optlist} { |
# process and check options |
array set optref { app 0 nbck 1} |
rutil::optlist2arr opt optref $optlist |
|
# setup attach url options |
set urloptlist {} |
if {$opt(app) != 0} { |
append urloptlist "app" |
} |
if {$opt(nbck) != 0} { |
append urloptlist "bck=$opt(nbck)" |
} |
set urlopt "" |
if {[llength $urloptlist] > 0} { |
append urlopt "?" |
append urlopt [join $urloptlist ";"] |
} |
|
# handle unit |
${cpu}${unit} att "tirri_${unit}.dat${urlopt}" |
return "" |
} |
|
# |
# setup_lp: setup printer |
# |
proc setup_lp {{cpu "cpu0"} {optlist {}}} { |
# process and check options |
array set optref { nlp 1 app 0 nbck 1} |
rutil::optlist2arr opt optref $optlist |
if {$opt(nlp) != 0} { |
setup_ostr $cpu "lpa0" [list app $opt(app) nbck $opt(nbck)] |
} |
} |
# |
# setup_pp: setup paper puncher |
# |
proc setup_pp {{cpu "cpu0"} {optlist {}}} { |
# process and check options |
array set optref { npc 1 app 0 nbck 1} |
rutil::optlist2arr opt optref $optlist |
if {$opt(npc) != 0} { |
setup_ostr $cpu "pp" [list app $opt(app) nbck $opt(nbck)] |
} |
} |
|
# |
# run_pdpcp: execute pdpcp type command file |
# |
proc run_pdpcp {fname {cpu "cpu0"}} { |
/w11/trunk/tools/src/librw11/Rw11UnitBase.ipp
File deleted
/w11/trunk/tools/src/librw11/Rw11UnitBase.hpp
File deleted
/w11/trunk/tools/src/librw11/Rw11CntlPC11.hpp
0,0 → 1,85
// $Id: Rw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-03 515 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: Rw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11CntlPC11. |
*/ |
|
#ifndef included_Retro_Rw11CntlPC11 |
#define included_Retro_Rw11CntlPC11 1 |
|
#include "Rw11CntlBase.hpp" |
#include "Rw11UnitPC11.hpp" |
|
namespace Retro { |
|
class Rw11CntlPC11 : public Rw11CntlBase<Rw11UnitPC11,2> { |
public: |
|
Rw11CntlPC11(); |
~Rw11CntlPC11(); |
|
void Config(const std::string& name, uint16_t base, int lam); |
|
virtual void Start(); |
|
virtual bool BootCode(size_t unit, std::vector<uint16_t>& code, |
uint16_t& aload, uint16_t& astart); |
|
virtual void UnitSetup(size_t ind); |
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; |
|
// some constants (also defined in cpp) |
static const uint16_t kIbaddr = 0177550; //!< PC11 default address |
static const int kLam = 10; //!< PC11 default lam |
|
static const uint16_t kRCSR = 000; //!< RCSR register address offset |
static const uint16_t kRBUF = 002; //!< RBUF register address offset |
static const uint16_t kPCSR = 004; //!< PCSR register address offset |
static const uint16_t kPBUF = 006; //!< PBUF register address offset |
|
static const uint16_t kUnit_PR = 0; //<! unit number of paper reader |
static const uint16_t kUnit_PP = 1; //<! unit number of paper puncher |
|
static const uint16_t kProbeOff = kRCSR; //!< probe address offset (rcsr) |
static const bool kProbeInt = true; //!< probe int active |
static const bool kProbeRem = true; //!< probr rem active |
|
static const uint16_t kRCSR_M_ERROR = kWBit15; |
static const uint16_t kPCSR_M_ERROR = kWBit15; |
static const uint16_t kPBUF_M_RBUSY = kWBit09; |
static const uint16_t kPBUF_M_PVAL = kWBit08; |
static const uint16_t kPBUF_M_BUF = 0377; |
|
protected: |
int AttnHandler(const RlinkServer::AttnArgs& args); |
void SetOnline(size_t ind, bool online); |
|
protected: |
size_t fPC_pbuf; //!< PrimClist: pbuf index |
}; |
|
} // end namespace Retro |
|
//#include "Rw11CntlPC11.ipp" |
|
#endif |
/w11/trunk/tools/src/librw11/Rw11UnitStream.cpp
0,0 → 1,135
// $Id: Rw11UnitStream.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-04 515 1.0 Initial version |
// 2013-05-01 513 0.1 First draft |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: Rw11UnitStream.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of Rw11UnitStream. |
*/ |
|
#include "librtools/Rexception.hpp" |
|
#include "Rw11UnitStream.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::Rw11UnitStream |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Constructor |
|
Rw11UnitStream::Rw11UnitStream(Rw11Cntl* pcntl, size_t index) |
: Rw11UnitVirt<Rw11VirtStream>(pcntl, index) |
{ |
fStats.Define(kStatNPreAttDrop, "NPreAttDrop", |
"output bytes dropped prior attach"); |
fStats.Define(kStatNPreAttMiss, "NPreAttMiss", |
"input bytes missed prior attach"); |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
Rw11UnitStream::~Rw11UnitStream() |
{} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11UnitStream::SetPos(int pos) |
{ |
if (!Virt()) |
throw Rexception("Rw11UnitStream::SetPos", "no stream attached"); |
|
RerrMsg emsg; |
if (!Virt()->Seek(pos, emsg)) throw Rexception(emsg); |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
int Rw11UnitStream::Pos() const |
{ |
if (!Virt()) |
throw Rexception("Rw11UnitStream::Pos", "no stream attached"); |
|
RerrMsg emsg; |
int irc = Virt()->Tell(emsg); |
if (irc < 0) throw Rexception(emsg); |
return irc; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
int Rw11UnitStream::VirtRead(uint8_t* data, size_t count, RerrMsg& emsg) |
{ |
if (!Virt()) { |
fStats.Inc(kStatNPreAttMiss); |
emsg.Init("Rw11UnitStream::VirtRead", "no stream attached"); |
return -1; |
} |
return Virt()->Read(data, count, emsg); |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
bool Rw11UnitStream::VirtWrite(const uint8_t* data, size_t count, RerrMsg& emsg) |
{ |
if (!Virt()) { |
fStats.Inc(kStatNPreAttDrop, double(count)); |
emsg.Init("Rw11UnitStream::VirtWrite", "no stream attached"); |
return false; |
} |
return Virt()->Write(data, count, emsg); |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
bool Rw11UnitStream::VirtFlush(RerrMsg& emsg) |
{ |
if (!Virt()) { |
emsg.Init("Rw11UnitStream::VirtFlush", "no stream attached"); |
return false; |
} |
return Virt()->Flush(emsg); |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11UnitStream::Dump(std::ostream& os, int ind, const char* text) const |
{ |
RosFill bl(ind); |
os << bl << (text?text:"--") << "Rw11UnitStream @ " << this << endl; |
Rw11UnitVirt<Rw11VirtStream>::Dump(os, ind, " ^"); |
return; |
} |
|
|
} // end namespace Retro |
/w11/trunk/tools/src/librw11/Rw11CntlLP11.cpp
0,0 → 1,195
// $Id: Rw11CntlLP11.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-04 515 1.0 Initial version |
// 2013-05-01 513 0.1 First draft |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: Rw11CntlLP11.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of Rw11CntlLP11. |
*/ |
|
#include "boost/bind.hpp" |
|
#include "librtools/RosFill.hpp" |
#include "librtools/RosPrintBvi.hpp" |
#include "librtools/RosPrintf.hpp" |
#include "librtools/Rexception.hpp" |
#include "librtools/RlogMsg.hpp" |
|
#include "Rw11CntlLP11.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::Rw11CntlLP11 |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
// constants definitions |
|
const uint16_t Rw11CntlLP11::kIbaddr; |
const int Rw11CntlLP11::kLam; |
|
const uint16_t Rw11CntlLP11::kCSR; |
const uint16_t Rw11CntlLP11::kBUF; |
|
const uint16_t Rw11CntlLP11::kProbeOff; |
const bool Rw11CntlLP11::kProbeInt; |
const bool Rw11CntlLP11::kProbeRem; |
|
const uint16_t Rw11CntlLP11::kCSR_M_ERROR; |
const uint16_t Rw11CntlLP11::kBUF_M_VAL; |
const uint16_t Rw11CntlLP11::kBUF_M_BUF; |
|
//------------------------------------------+----------------------------------- |
//! Default constructor |
|
Rw11CntlLP11::Rw11CntlLP11() |
: Rw11CntlBase<Rw11UnitLP11,1>("lp11"), |
fPC_buf(0) |
{ |
// must here because Unit have a back-pointer (not available at Rw11CntlBase) |
for (size_t i=0; i<NUnit(); i++) { |
fspUnit[i].reset(new Rw11UnitLP11(this, i)); |
} |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
Rw11CntlLP11::~Rw11CntlLP11() |
{} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlLP11::Config(const std::string& name, uint16_t base, int lam) |
{ |
ConfigCntl(name, base, lam, kProbeOff, kProbeInt, kProbeRem); |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlLP11::Start() |
{ |
if (fStarted || fLam<0 || !fEnable || !fProbe.Found()) |
throw Rexception("Rw11CntlLP11::Start", |
"Bad state: started, no lam, not enable, not found"); |
|
// setup primary info clist |
fPrimClist.Clear(); |
Cpu().AddIbrb(fPrimClist, fBase); |
fPC_buf = Cpu().AddRibr(fPrimClist, fBase+kBUF); |
|
// add attn handler |
Server().AddAttnHandler(boost::bind(&Rw11CntlLP11::AttnHandler, this, _1), |
uint16_t(1)<<fLam, (void*)this); |
|
fStarted = true; |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlLP11::UnitSetup(size_t ind) |
{ |
Rw11UnitLP11& unit = *fspUnit[ind]; |
SetOnline(unit.Virt()); // online if stream attached |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlLP11::Dump(std::ostream& os, int ind, const char* text) const |
{ |
RosFill bl(ind); |
os << bl << (text?text:"--") << "Rw11CntlLP11 @ " << this << endl; |
os << bl << " fPC_buf: " << fPC_buf << endl; |
|
Rw11CntlBase<Rw11UnitLP11,1>::Dump(os, ind, " ^"); |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
int Rw11CntlLP11::AttnHandler(const RlinkServer::AttnArgs& args) |
{ |
RlinkCommandList* pclist; |
size_t off; |
|
GetPrimInfo(args, pclist, off); |
|
uint16_t buf = (*pclist)[off+fPC_buf].Data(); |
bool val = buf & kBUF_M_VAL; |
uint8_t ochr = buf & kBUF_M_BUF; |
|
if (fTraceLevel>0) { |
RlogMsg lmsg(LogFile()); |
lmsg << "-I LP11." << Name() |
<< " buf=" << RosPrintBvi(buf,8) |
<< " val=" << val; |
if (val) { |
lmsg << " char="; |
if (ochr>=040 && ochr<0177) { |
lmsg << "'" << char(ochr) << "'"; |
} else { |
lmsg << RosPrintBvi(ochr,8); |
} |
} |
} |
|
if (val) { |
RerrMsg emsg; |
bool rc = fspUnit[0]->VirtWrite(&ochr, 1, emsg); |
if (!rc) { |
RlogMsg lmsg(LogFile()); |
lmsg << emsg; |
SetOnline(false); |
} |
if (ochr == 014) { // ^L = FF = FormFeed seen ? |
rc = fspUnit[0]->VirtFlush(emsg); |
} |
} |
|
return 0; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlLP11::SetOnline(bool online) |
{ |
Rw11Cpu& cpu = Cpu(); |
uint16_t csr = online ? 0 : kCSR_M_ERROR; |
RlinkCommandList clist; |
cpu.AddIbrb(clist, fBase); |
cpu.AddWibr(clist, fBase+kCSR, csr); |
Server().Exec(clist); |
return; |
} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librw11/Rw11CntlRK11.cpp
1,4 → 1,4
// $Id: Rw11CntlRK11.cpp 509 2013-04-21 20:46:20Z mueller $ |
// $Id: Rw11CntlRK11.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// Other credits: |
21,7 → 21,7
|
/*! |
\file |
\version $Id: Rw11CntlRK11.cpp 509 2013-04-21 20:46:20Z mueller $ |
\version $Id: Rw11CntlRK11.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of Rw11CntlRK11. |
*/ |
|
224,30 → 224,30
uint16_t& aload, uint16_t& astart) |
{ |
uint16_t kBOOT_START = 02000; |
uint16_t bootcode[] = { // rk05 boot loader - from simh pdp11_rk.c |
0042113, // "KD" |
0012706, kBOOT_START, // MOV #boot_start, SP |
0012700, uint16_t(unit), // MOV #unit, R0 ; unit number |
0010003, // # MOV R0, R3 |
0000303, // # SWAB R3 |
0006303, // # ASL R3 |
0006303, // # ASL R3 |
0006303, // # ASL R3 |
0006303, // # ASL R3 |
0006303, // # ASL R3 |
0012701, 0177412, // # MOV #RKDA, R1 ; rkda |
0010311, // # MOV R3, (R1) ; load da |
0005041, // # CLR -(R1) ; clear ba |
0012741, 0177000, // # MOV #-256.*2, -(R1) ; load wc |
0012741, 0000005, // # MOV #READ+GO, -(R1) ; read & go |
0005002, // # CLR R2 |
0005003, // # CLR R3 |
0012704, uint16_t(kBOOT_START+020), // # MOV #START+20, R4 |
0005005, // # CLR R5 |
0105711, // # TSTB (R1) |
0100376, // # BPL .-4 |
0105011, // # CLRB (R1) |
0005007 // # CLR PC (5007) |
uint16_t bootcode[] = { // rk05 boot loader - from simh pdp11_rk.c |
0042113, // "KD" |
0012706, kBOOT_START, // MOV #boot_start, SP |
0012700, uint16_t(unit), // MOV #unit, R0 ; unit number |
0010003, // MOV R0, R3 |
0000303, // SWAB R3 |
0006303, // ASL R3 |
0006303, // ASL R3 |
0006303, // ASL R3 |
0006303, // ASL R3 |
0006303, // ASL R3 |
0012701, 0177412, // MOV #RKDA, R1 ; rkda |
0010311, // MOV R3, (R1) ; load da |
0005041, // CLR -(R1) ; clear ba |
0012741, 0177000, // MOV #-256.*2, -(R1) ; load wc |
0012741, 0000005, // MOV #READ+GO, -(R1) ; read & go |
0005002, // CLR R2 |
0005003, // CLR R3 |
0012704, uint16_t(kBOOT_START+020), // MOV #START+20, R4 |
0005005, // CLR R5 |
0105711, // TSTB (R1) |
0100376, // BPL .-4 |
0105011, // CLRB (R1) |
0005007 // CLR PC (5007) |
}; |
|
code.clear(); |
/w11/trunk/tools/src/librw11/Rw11VirtStream.cpp
0,0 → 1,238
// $Id: Rw11VirtStream.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-05 516 1.0.1 Open(): support ?app and ?bck=n options |
// 2013-05-04 515 1.0 Initial version |
// 2013-05-01 513 0.1 First draft |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: Rw11VirtStream.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of Rw11VirtStream. |
*/ |
#include <memory> |
|
#include "librtools/Rtools.hpp" |
#include "librtools/Rexception.hpp" |
#include "librtools/RparseUrl.hpp" |
#include "librtools/RosFill.hpp" |
|
#include "Rw11VirtStream.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::Rw11VirtStream |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Default constructor |
|
Rw11VirtStream::Rw11VirtStream(Rw11Unit* punit) |
: Rw11Virt(punit), |
fIStream(false), |
fOStream(false), |
fFile(0) |
{ |
fStats.Define(kStatNVSRead, "NVSRead", "Read() calls"); |
fStats.Define(kStatNVSReadByt, "NVSReadByt", "bytes read"); |
fStats.Define(kStatNVSWrite, "NVSWrite", "Write() calls"); |
fStats.Define(kStatNVSWriteByt,"NVSWriteByt", "bytes written"); |
fStats.Define(kStatNVSFlush, "NVSFlush", "Flush() calls"); |
fStats.Define(kStatNVSTell, "NVSTell", "Tell() calls"); |
fStats.Define(kStatNVSSeek, "NVSSeek", "Seek() calls"); |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
Rw11VirtStream::~Rw11VirtStream() |
{ |
if (fFile) ::fclose(fFile); |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
bool Rw11VirtStream::Open(const std::string& url, RerrMsg& emsg) |
{ |
RparseUrl opts; |
if (!opts.Set(fpUnit->AttachOpts(), "|ronly|wonly|", emsg)) return false; |
fIStream = opts.FindOpt("ronly"); |
fOStream = opts.FindOpt("wonly"); |
if (!(fIStream ^ fOStream)) |
throw Rexception("Rw11VirtStream::Open", |
"Bad state: neither ronly nor wonly seen"); |
|
if (fOStream) { // handle output streams |
if (!fUrl.Set(url, "|app|bck=|", emsg)) return false; |
if (!Rtools::CreateBackupFile(fUrl, emsg)) return false; |
|
fFile = ::fopen(fUrl.Path().c_str(), fUrl.FindOpt("app") ? "a" : "w"); |
|
} else { // handle input streams |
if (!fUrl.Set(url, "", emsg)) return false; |
fFile = ::fopen(fUrl.Path().c_str(), "r"); |
} |
|
if (!fFile) { |
emsg.InitErrno("Rw11VirtStream::Open()", |
string("fopen() for '") + fUrl.Path() + "' failed: ", |
errno); |
return false; |
} |
|
return true; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
int Rw11VirtStream::Read(uint8_t* data, size_t count, RerrMsg& emsg) |
{ |
if (!fIStream) |
throw Rexception("Rw11VirtStream::Read", |
"Bad state: Read() called but fIStream=false"); |
if (!fFile) |
throw Rexception("Rw11VirtStream::Read", "Bad state: file not open"); |
|
fStats.Inc(kStatNVSRead); |
size_t irc = ::fread(data, 1, count, fFile); |
if (irc == 0 && ferror(fFile)) { |
emsg.InitErrno("Rw11VirtStream::Read()", "fread() failed: ", errno); |
return -1; |
} |
|
fStats.Inc(kStatNVSReadByt, double(irc)); |
return int(irc); |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
bool Rw11VirtStream::Write(const uint8_t* data, size_t count, RerrMsg& emsg) |
{ |
if (!fOStream) |
throw Rexception("Rw11VirtStream::Write", |
"Bad state: Write() called but fOStream=false"); |
if (!fFile) |
throw Rexception("Rw11VirtStream::Write", "Bad state: file not open"); |
|
fStats.Inc(kStatNVSWrite); |
size_t irc = ::fwrite(data, 1, count, fFile); |
if (irc != count) { |
emsg.InitErrno("Rw11VirtStream::Write()", "fwrite() failed: ", errno); |
return false; |
} |
|
fStats.Inc(kStatNVSWriteByt, double(count)); |
return true; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
bool Rw11VirtStream::Flush(RerrMsg& emsg) |
{ |
if (!fOStream) return true; |
if (!fFile) |
throw Rexception("Rw11VirtStream::Write", "Bad state: file not open"); |
|
fStats.Inc(kStatNVSFlush); |
size_t irc = ::fflush(fFile); |
if (irc != 0) { |
emsg.InitErrno("Rw11VirtStream::Flush()", "fflush() failed: ", errno); |
return false; |
} |
|
return true; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
int Rw11VirtStream::Tell(RerrMsg& emsg) |
{ |
if (!fFile) |
throw Rexception("Rw11VirtStream::Tell", "Bad state: file not open"); |
|
fStats.Inc(kStatNVSTell); |
long irc = ::ftell(fFile); |
if (irc < 0) { |
emsg.InitErrno("Rw11VirtStream::Tell()", "ftell() failed: ", errno); |
return -1; |
} |
|
return int(irc); |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
bool Rw11VirtStream::Seek(int pos, RerrMsg& emsg) |
{ |
if (!fFile) |
throw Rexception("Rw11VirtStream::Seek", "Bad state: file not open"); |
|
fStats.Inc(kStatNVSSeek); |
int whence = SEEK_SET; |
if (pos < 0) { |
pos = 0; |
whence = SEEK_END; |
} |
int irc = ::fseek(fFile, pos, whence); |
|
if (irc < 0) { |
emsg.InitErrno("Rw11VirtStream::Seek()", "fseek() failed: ", errno); |
return false; |
} |
|
return true; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11VirtStream::Dump(std::ostream& os, int ind, const char* text) const |
{ |
RosFill bl(ind); |
os << bl << (text?text:"--") << "Rw11VirtStream @ " << this << endl; |
|
os << bl << " fIStream: " << fIStream << endl; |
os << bl << " fOStream: " << fOStream << endl; |
os << bl << " fFile: " << fFile << endl; |
Rw11Virt::Dump(os, ind, " ^"); |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
Rw11VirtStream* Rw11VirtStream::New(const std::string& url, Rw11Unit* punit, |
RerrMsg& emsg) |
{ |
unique_ptr<Rw11VirtStream> p; |
p.reset(new Rw11VirtStream(punit)); |
if (p->Open(url, emsg)) return p.release(); |
return 0; |
} |
|
|
} // end namespace Retro |
/w11/trunk/tools/src/librw11/Makefile
1,4 → 1,4
# $Id: Makefile 504 2013-04-13 15:37:24Z mueller $ |
# $Id: Makefile 515 2013-05-04 17:28:59Z mueller $ |
# |
# Revision History: |
# Date Rev Version Comment |
26,11 → 26,15
OBJ_all += Rw11Cntl.o Rw11Unit.o |
OBJ_all += Rw11UnitTerm.o |
OBJ_all += Rw11UnitDisk.o |
OBJ_all += Rw11UnitStream.o |
OBJ_all += Rw11CntlDL11.o Rw11UnitDL11.o |
OBJ_all += Rw11CntlRK11.o Rw11UnitRK11.o |
OBJ_all += Rw11CntlLP11.o Rw11UnitLP11.o |
OBJ_all += Rw11CntlPC11.o Rw11UnitPC11.o |
OBJ_all += Rw11Virt.o |
OBJ_all += Rw11VirtTerm.o Rw11VirtTermPty.o Rw11VirtTermTcp.o |
OBJ_all += Rw11VirtDisk.o Rw11VirtDiskFile.o |
OBJ_all += Rw11VirtStream.o |
# |
DEP_all = $(OBJ_all:.o=.dep) |
# |
/w11/trunk/tools/src/librw11/Rw11Unit.hpp
1,4 → 1,4
// $Id: Rw11Unit.hpp 495 2013-03-06 17:13:48Z mueller $ |
// $Id: Rw11Unit.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,8
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone() |
// 2013-05-01 513 1.0.1 add fAttachOpts, (Set)AttachOpts() |
// 2013-03-06 495 1.0 Initial version |
// 2013-02-13 488 0.1 First draft |
// --------------------------------------------------------------------------- |
20,7 → 22,7
|
/*! |
\file |
\version $Id: Rw11Unit.hpp 495 2013-03-06 17:13:48Z mueller $ |
\version $Id: Rw11Unit.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11Unit. |
*/ |
|
27,6 → 29,8
#ifndef included_Retro_Rw11Unit |
#define included_Retro_Rw11Unit 1 |
|
#include <string> |
|
#include "boost/utility.hpp" |
|
#include "librtools/Rstats.hpp" |
47,6 → 51,9
size_t Index() const; |
std::string Name() const; |
|
void SetAttachOpts(const std::string& opts); |
const std::string& AttachOpts() const; |
|
Rw11Cntl& CntlBase() const; |
Rw11Cpu& Cpu() const; |
Rw11& W11() const; |
66,8 → 73,9
}; |
|
protected: |
virtual void AttachSetup(); |
virtual void AttachDone(); |
virtual void DetachCleanup(); |
virtual void DetachDone(); |
|
private: |
Rw11Unit() {} //!< default ctor blocker |
75,6 → 83,7
protected: |
Rw11Cntl* fpCntlBase; //!< plain Rw11Cntl ptr |
size_t fIndex; //!< unit number |
std::string fAttachOpts; //!< unit context options for attach |
Rstats fStats; //!< statistics |
}; |
|
/w11/trunk/tools/src/librw11/Rw11UnitDiskBase.hpp
1,4 → 1,4
// $Id: Rw11UnitDiskBase.hpp 509 2013-04-21 20:46:20Z mueller $ |
// $Id: Rw11UnitDiskBase.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone() |
// 2013-04-14 506 1.0 Initial version |
// 2013-02-22 490 0.1 First draft |
// --------------------------------------------------------------------------- |
20,7 → 21,7
|
/*! |
\file |
\version $Id: Rw11UnitDiskBase.hpp 509 2013-04-21 20:46:20Z mueller $ |
\version $Id: Rw11UnitDiskBase.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11UnitDiskBase. |
*/ |
|
43,8 → 44,8
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; |
|
protected: |
virtual void AttachSetup(); |
virtual void DetachCleanup(); |
virtual void AttachDone(); |
virtual void DetachDone(); |
|
protected: |
TC* fpCntl; |
/w11/trunk/tools/src/librw11/Rw11UnitStreamBase.hpp
0,0 → 1,57
// $Id: Rw11UnitStreamBase.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-04 515 1.0 Initial version |
// 2013-05-01 513 0.1 First draft |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: Rw11UnitStreamBase.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11UnitStreamBase. |
*/ |
|
#ifndef included_Retro_Rw11UnitStreamBase |
#define included_Retro_Rw11UnitStreamBase 1 |
|
#include "Rw11UnitStream.hpp" |
|
namespace Retro { |
|
template <class TC> |
class Rw11UnitStreamBase : public Rw11UnitStream { |
public: |
|
Rw11UnitStreamBase(TC* pcntl, size_t index); |
~Rw11UnitStreamBase(); |
|
TC& Cntl() const; |
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; |
|
protected: |
virtual void AttachDone(); |
virtual void DetachDone(); |
|
protected: |
TC* fpCntl; |
}; |
|
} // end namespace Retro |
|
#include "Rw11UnitStreamBase.ipp" |
|
#endif |
/w11/trunk/tools/src/librw11/Rw11UnitPC11.cpp
0,0 → 1,71
// $Id: Rw11UnitPC11.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-03 515 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: Rw11UnitPC11.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of Rw11UnitPC11. |
*/ |
|
#include "boost/bind.hpp" |
|
#include "librtools/RosFill.hpp" |
#include "Rw11CntlPC11.hpp" |
|
#include "Rw11UnitPC11.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::Rw11UnitPC11 |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Constructor |
|
Rw11UnitPC11::Rw11UnitPC11(Rw11CntlPC11* pcntl, size_t index) |
: Rw11UnitStreamBase<Rw11CntlPC11>(pcntl, index) |
{ |
// unit 0 -> reader -> read only stream |
// unit 1 -> puncher -> write only stream |
const char* opts = (index==0) ? "?ronly" : "?wonly"; |
SetAttachOpts(opts); |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
Rw11UnitPC11::~Rw11UnitPC11() |
{} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11UnitPC11::Dump(std::ostream& os, int ind, const char* text) const |
{ |
RosFill bl(ind); |
os << bl << (text?text:"--") << "Rw11UnitPC11 @ " << this << endl; |
Rw11UnitStreamBase<Rw11CntlPC11>::Dump(os, ind, " ^"); |
return; |
} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librw11/Rw11UnitTerm.hpp
1,4 → 1,4
// $Id: Rw11UnitTerm.hpp 508 2013-04-20 18:43:28Z mueller $ |
// $Id: Rw11UnitTerm.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone() |
// 2013-04-20 508 1.0.1 add 7bit and non-printable masking; add log file |
// 2013-04-13 504 1.0 Initial version |
// 2013-02-19 490 0.1 First draft |
21,7 → 22,7
|
/*! |
\file |
\version $Id: Rw11UnitTerm.hpp 508 2013-04-20 18:43:28Z mueller $ |
\version $Id: Rw11UnitTerm.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11UnitTerm. |
*/ |
|
74,7 → 75,7
}; |
|
protected: |
virtual void AttachSetup(); |
virtual void AttachDone(); |
|
protected: |
bool fTo7bit; //<! discard parity bit on output |
/w11/trunk/tools/src/librw11/Rw11UnitLP11.hpp
0,0 → 1,53
// $Id: Rw11UnitLP11.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-01 513 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: Rw11UnitLP11.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11UnitLP11. |
*/ |
|
#ifndef included_Retro_Rw11UnitLP11 |
#define included_Retro_Rw11UnitLP11 1 |
|
#include "Rw11VirtStream.hpp" |
|
#include "Rw11UnitStreamBase.hpp" |
|
namespace Retro { |
|
class Rw11CntlLP11; // forw decl to avoid circular incl |
|
class Rw11UnitLP11 : public Rw11UnitStreamBase<Rw11CntlLP11> { |
public: |
|
Rw11UnitLP11(Rw11CntlLP11* pcntl, size_t index); |
~Rw11UnitLP11(); |
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; |
|
protected: |
|
}; |
|
} // end namespace Retro |
|
//#include "Rw11UnitLP11.ipp" |
|
#endif |
/w11/trunk/tools/src/librw11/Rw11VirtTermTcp.cpp
1,4 → 1,4
// $Id: Rw11VirtTermTcp.cpp 508 2013-04-20 18:43:28Z mueller $ |
// $Id: Rw11VirtTermTcp.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-05 516 1.0.2 fix mistakes in emsg generation with errno |
// 2013-04-20 508 1.0.1 add fSndPreConQue handling |
// 2013-03-06 495 1.0 Initial version |
// 2013-02-13 488 0.1 First draft |
20,7 → 21,7
|
/*! |
\file |
\version $Id: Rw11VirtTermTcp.cpp 508 2013-04-20 18:43:28Z mueller $ |
\version $Id: Rw11VirtTermTcp.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of Rw11VirtTermTcp. |
*/ |
|
215,8 → 216,8
if (irc < 0) { |
RlogMsg lmsg(LogFile(),'E'); |
RerrMsg emsg("Rw11VirtTermTcp::Snd", |
string("write() for port ") + fChannelId + |
string(" failed: ", errno)); |
string("write() for port ") + fChannelId + " failed: ", |
errno); |
lmsg << emsg; |
} else { |
fStats.Inc(kStatNVTSndRaw, double(irc)); |
268,8 → 269,8
if (fFd < 0) { |
RlogMsg lmsg(LogFile(),'E'); |
RerrMsg emsg("Rw11VirtTermTcp::ListenPollHandler", |
string("accept() for port ") + fChannelId + |
string(" failed: ", errno)); |
string("accept() for port ") + fChannelId + " failed: ", |
errno); |
lmsg << emsg; |
// FIXME_code: proper error handling |
return 0; |
317,8 → 318,8
fFd = -1; |
RlogMsg lmsg(LogFile(),'E'); |
RerrMsg emsg("Rw11VirtTermTcp::ListenPollHandler", |
string("initial write()s for port ") + fChannelId + |
string(" failed: ", errno)); |
string("initial write()s for port ") + fChannelId + |
" failed: ", errno); |
lmsg << emsg; |
return 0; |
} |
408,8 → 409,8
if (irc < 0) { |
RlogMsg lmsg(LogFile(),'E'); |
RerrMsg emsg("Rw11VirtTermTcp::ListenPollHandler", |
string("read() for port ") + fChannelId + |
string(" failed: ", errno)); |
string("read() for port ") + fChannelId + " failed: ", |
errno); |
lmsg << emsg; |
} |
if (fTcpTrace) { |
/w11/trunk/tools/src/librw11/Rw11CntlPC11.cpp
0,0 → 1,316
// $Id: Rw11CntlPC11.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-03 515 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: Rw11CntlPC11.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of Rw11CntlPC11. |
*/ |
|
#include "boost/bind.hpp" |
#include "boost/foreach.hpp" |
#define foreach_ BOOST_FOREACH |
|
#include "librtools/RosFill.hpp" |
#include "librtools/RosPrintBvi.hpp" |
#include "librtools/RosPrintf.hpp" |
#include "librtools/Rexception.hpp" |
#include "librtools/RlogMsg.hpp" |
|
#include "Rw11CntlPC11.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::Rw11CntlPC11 |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
// constants definitions |
|
const uint16_t Rw11CntlPC11::kIbaddr; |
const int Rw11CntlPC11::kLam; |
|
const uint16_t Rw11CntlPC11::kRCSR; |
const uint16_t Rw11CntlPC11::kRBUF; |
const uint16_t Rw11CntlPC11::kPCSR; |
const uint16_t Rw11CntlPC11::kPBUF; |
|
const uint16_t Rw11CntlPC11::kUnit_PR; |
const uint16_t Rw11CntlPC11::kUnit_PP; |
|
const uint16_t Rw11CntlPC11::kProbeOff; |
const bool Rw11CntlPC11::kProbeInt; |
const bool Rw11CntlPC11::kProbeRem; |
|
const uint16_t Rw11CntlPC11::kRCSR_M_ERROR; |
const uint16_t Rw11CntlPC11::kPCSR_M_ERROR; |
const uint16_t Rw11CntlPC11::kPBUF_M_RBUSY; |
const uint16_t Rw11CntlPC11::kPBUF_M_PVAL; |
const uint16_t Rw11CntlPC11::kPBUF_M_BUF; |
|
//------------------------------------------+----------------------------------- |
//! Default constructor |
|
Rw11CntlPC11::Rw11CntlPC11() |
: Rw11CntlBase<Rw11UnitPC11,2>("pc11"), |
fPC_pbuf(0) |
{ |
// must here because Unit have a back-pointer (not available at Rw11CntlBase) |
for (size_t i=0; i<NUnit(); i++) { |
fspUnit[i].reset(new Rw11UnitPC11(this, i)); |
} |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
Rw11CntlPC11::~Rw11CntlPC11() |
{} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlPC11::Config(const std::string& name, uint16_t base, int lam) |
{ |
ConfigCntl(name, base, lam, kProbeOff, kProbeInt, kProbeRem); |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlPC11::Start() |
{ |
if (fStarted || fLam<0 || !fEnable || !fProbe.Found()) |
throw Rexception("Rw11CntlPC11::Start", |
"Bad state: started, no lam, not enable, not found"); |
|
// setup primary info clist |
fPrimClist.Clear(); |
Cpu().AddIbrb(fPrimClist, fBase); |
fPC_pbuf = Cpu().AddRibr(fPrimClist, fBase+kPBUF); |
|
// add attn handler |
Server().AddAttnHandler(boost::bind(&Rw11CntlPC11::AttnHandler, this, _1), |
uint16_t(1)<<fLam, (void*)this); |
|
fStarted = true; |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
bool Rw11CntlPC11::BootCode(size_t unit, std::vector<uint16_t>& code, |
uint16_t& aload, uint16_t& astart) |
{ |
uint16_t kBOOT_START = 0017476; |
uint16_t bootcode[] = { // papertape lda loader, from dec-11-l2pc-po |
0000000, // C000: halt |
0010706, // astart: mov pc,sp |
0024646, // cmp -(sp),-(sp) |
0010705, // mov pc,r5 |
0062705, 0000112, // add #000112,r5 |
0005001, // clr r1 |
0013716, 0177570, // B000: mov @#cp.dsr,(sp) |
0006016, // ror (sp) |
0103402, // bcs B001 |
0005016, // clr (sp) |
0000403, // br B002 |
0006316, // B001: asl (sp) |
0001001, // bne B002 |
0010116, // mov r1,(sp) |
0005000, // B002: clr r0 |
0004715, // jsr pc,(r5) |
0105303, // decb r3 |
0001374, // bne B002 |
0004715, // jsr pc,(r5) |
0004767, 0000074, // jsr pc,R000 |
0010402, // mov r4,r2 |
0162702, 0000004, // sub #000004,r2 |
0022702, 0000002, // cmp #000002,r2 |
0001441, // beq B007 |
0004767, 0000054, // jsr pc,R000 |
0061604, // add (sp),r4 |
0010401, // mov r4,r1 |
0004715, // B003: jsr pc,(r5) |
0002004, // bge B005 |
0105700, // tstb r0 |
0001753, // beq B002 |
0000000, // B004: halt |
0000751, // br B002 |
0110321, // B005: movb r3,(r1)+ |
0000770, // br B003 |
0016703, 0000152, // ldchr: mov p.prcs,r3 |
0105213, // incb (r3) |
0105713, // B006: tstb (r3) |
0100376, // bpl B006 |
0116303, 0000002, // movb 000002(r3),r3 |
0060300, // add r3,r0 |
0042703, 0177400, // bic #177400,r3 |
0005302, // dec r2 |
0000207, // rts pc |
0012667, 0000046, // R000: mov (sp)+,D000 |
0004715, // jsr pc,(r5) |
0010304, // mov r3,r4 |
0004715, // jsr pc,(r5) |
0000303, // swap r3 |
0050304, // bis r3,r4 |
0016707, 0000030, // mov D000,pc |
0004767, 0177752, // B007: jsr pc,R000 |
0004715, // jsr pc,(r5) |
0105700, // tstb r0 |
0001342, // bne B004 |
0006204, // asr r4 |
0103002, // bcc B008 |
0000000, // halt |
0000700, // br B000 |
0006304, // B008: asl r4 |
0061604, // add (sp),r4 |
0000114, // jmp (r4) |
0000000, // D000: .word 000000 |
0012767, 0000352, 0000020, // L000: mov #000352,B009+2 |
0012767, 0000765, 0000034, // mov #000765,D001 |
0000167, 0177532, // jmp C000 |
0016701, 0000026, // bstart: mov p.prcs,r1 |
0012702, 0000352, // B009: mov #000352,r2 |
0005211, // inc (r1) |
0105711, // B010: tstb (r1) |
0100376, // bpl B010 |
0116162, 0000002, 0157400, // movb 000002(r1),157400(r2) |
0005267, 0177756, // inc B009+2 |
0000765, // D001: br B009 |
0177550 // p.prcs: .word 177550 |
}; |
|
code.clear(); |
foreach_ (uint16_t& w, bootcode) code.push_back(w); |
aload = kBOOT_START; |
astart = kBOOT_START+2; |
return true; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlPC11::UnitSetup(size_t ind) |
{ |
Rw11UnitPC11& unit = *fspUnit[ind]; |
SetOnline(ind, unit.Virt()); // online if stream attached |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlPC11::Dump(std::ostream& os, int ind, const char* text) const |
{ |
RosFill bl(ind); |
os << bl << (text?text:"--") << "Rw11CntlPC11 @ " << this << endl; |
os << bl << " fPC_pbuf: " << fPC_pbuf << endl; |
|
Rw11CntlBase<Rw11UnitPC11,2>::Dump(os, ind, " ^"); |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
int Rw11CntlPC11::AttnHandler(const RlinkServer::AttnArgs& args) |
{ |
RlinkCommandList* pclist; |
size_t off; |
|
GetPrimInfo(args, pclist, off); |
|
uint16_t pbuf = (*pclist)[off+fPC_pbuf].Data(); |
bool pval = pbuf & kPBUF_M_PVAL; |
bool rbusy = pbuf & kPBUF_M_RBUSY; |
uint8_t ochr = pbuf & kPBUF_M_BUF; |
|
if (fTraceLevel>0) { |
RlogMsg lmsg(LogFile()); |
lmsg << "-I PC11." << Name() |
<< " pbuf=" << RosPrintBvi(pbuf,8) |
<< " pval=" << pval |
<< " rbusy=" << rbusy; |
if (pval) { |
lmsg << " char="; |
if (ochr>=040 && ochr<0177) { |
lmsg << "'" << char(ochr) << "'"; |
} else { |
lmsg << RosPrintBvi(ochr,8); |
} |
} |
} |
|
if (pval) { |
RerrMsg emsg; |
bool rc = fspUnit[kUnit_PP]->VirtWrite(&ochr, 1, emsg); |
if (!rc) { |
RlogMsg lmsg(LogFile()); |
lmsg << emsg; |
SetOnline(1, false); |
} |
} |
|
if (rbusy) { |
uint8_t ichr = 0; |
RerrMsg emsg; |
int irc = fspUnit[kUnit_PR]->VirtRead(&ichr, 1, emsg); |
if (irc < 0) { |
RlogMsg lmsg(LogFile()); |
lmsg << emsg; |
} |
if (irc <= 0) { |
SetOnline(0, false); |
} else { |
RlinkCommandList clist; |
Cpu().AddWibr(clist, fBase+kRBUF, ichr); |
Server().Exec(clist); |
} |
} |
|
return 0; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlPC11::SetOnline(size_t ind, bool online) |
{ |
Rw11Cpu& cpu = Cpu(); |
RlinkCommandList clist; |
cpu.AddIbrb(clist, fBase); |
if (ind == kUnit_PR) { // reader on/offline |
uint16_t rcsr = online ? 0 : kRCSR_M_ERROR; |
cpu.AddWibr(clist, fBase+kRCSR, rcsr); |
} else { // puncher on/offline |
uint16_t pcsr = online ? 0 : kPCSR_M_ERROR; |
cpu.AddWibr(clist, fBase+kPCSR, pcsr); |
} |
Server().Exec(clist); |
return; |
} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librw11/Rw11CntlDL11.hpp
1,4 → 1,4
// $Id: Rw11CntlDL11.hpp 504 2013-04-13 15:37:24Z mueller $ |
// $Id: Rw11CntlDL11.hpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-04 516 1.0.1 add RxRlim support (receive interrupt rate limit) |
// 2013-03-06 495 1.0 Initial version |
// 2013-02-05 483 0.1 First draft |
// --------------------------------------------------------------------------- |
20,7 → 21,7
|
/*! |
\file |
\version $Id: Rw11CntlDL11.hpp 504 2013-04-13 15:37:24Z mueller $ |
\version $Id: Rw11CntlDL11.hpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Declaration of class Rw11CntlDL11. |
*/ |
|
42,13 → 43,17
|
virtual void Start(); |
|
virtual void UnitSetup(size_t ind); |
void Wakeup(); |
|
void SetRxRlim(uint16_t rlim); |
uint16_t RxRlim() const; |
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; |
|
// some constants (also defined in cpp) |
static const uint16_t kIbaddr = 0177560; //!< RK11 default address |
static const int kLam = 1; //!< RK11 default lam |
static const uint16_t kIbaddr = 0177560; //!< DL11 default address |
static const int kLam = 1; //!< DL11 default lam |
|
static const uint16_t kRCSR = 000; //!< RCSR register address offset |
static const uint16_t kRBUF = 002; //!< RBUF register address offset |
59,11 → 64,14
static const bool kProbeInt = true; //!< probe int active |
static const bool kProbeRem = true; //!< probr rem active |
|
static const uint16_t kRCSR_M_RDONE = kWBit07; |
static const uint16_t kXCSR_M_XRDY = kWBit07; |
static const uint16_t kXBUF_M_RRDY = kWBit09; |
static const uint16_t kXBUF_M_XVAL = kWBit08; |
static const uint16_t kXBUF_M_XBUF = 0xff; |
static const uint16_t kRCSR_M_RXRLIM = 0070000; |
static const uint16_t kRCSR_V_RXRLIM = 12; |
static const uint16_t kRCSR_B_RXRLIM = 007; |
static const uint16_t kRCSR_M_RDONE = kWBit07; |
static const uint16_t kXCSR_M_XRDY = kWBit07; |
static const uint16_t kXBUF_M_RRDY = kWBit09; |
static const uint16_t kXBUF_M_XVAL = kWBit08; |
static const uint16_t kXBUF_M_XBUF = 0xff; |
|
protected: |
int AttnHandler(const RlinkServer::AttnArgs& args); |
70,6 → 78,7
|
protected: |
size_t fPC_xbuf; //!< PrimClist: xbuf index |
uint16_t fRxRlim; //!< rx interrupt rate limit |
}; |
|
} // end namespace Retro |
/w11/trunk/tools/src/librw11/Rw11Cpu.cpp
1,4 → 1,4
// $Id: Rw11Cpu.cpp 506 2013-04-14 21:54:03Z mueller $ |
// $Id: Rw11Cpu.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
20,7 → 20,7
|
/*! |
\file |
\version $Id: Rw11Cpu.cpp 506 2013-04-14 21:54:03Z mueller $ |
\version $Id: Rw11Cpu.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of Rw11Cpu. |
*/ |
#include <stdlib.h> |
399,7 → 399,7
|
if (fd < 0) { |
emsg.InitErrno("Rw11Cpu::LoadAbs()", string("open() for '") + fname + |
string("' failed: "), errno); |
"' failed: ", errno); |
return false; |
} |
|
590,8 → 590,7
} |
|
if (!TestCntl(cname)) { |
emsg.Init("Rw11Cpu::Boot", string("controller '") + cname + |
string("' not known")); |
emsg.Init("Rw11Cpu::Boot", string("controller '") + cname + "' not known"); |
return false; |
} |
|
605,7 → 604,7
|
if (!cntl.BootCode(uind, code, aload, astart) || code.size()==0) { |
emsg.Init("Rw11Cpu::Boot", string("boot not supported for controller '") |
+ cname + string("'")); |
+ cname + "'"); |
return false; |
} |
|
/w11/trunk/tools/src/librw11/Rw11UnitVirt.ipp
1,4 → 1,4
// $Id: Rw11UnitVirt.ipp 504 2013-04-13 15:37:24Z mueller $ |
// $Id: Rw11UnitVirt.ipp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone() |
// 2013-03-03 494 1.0 Initial version |
// 2013-02-05 483 0.1 First draft |
// --------------------------------------------------------------------------- |
19,7 → 20,7
|
/*! |
\file |
\version $Id: Rw11UnitVirt.ipp 504 2013-04-13 15:37:24Z mueller $ |
\version $Id: Rw11UnitVirt.ipp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation (inline) of Rw11UnitVirt. |
*/ |
|
70,9 → 71,9
{ |
// synchronize with server thread |
boost::lock_guard<RlinkConnect> lock(Connect()); |
if (fpVirt) DetachCleanup(); |
if (fpVirt) Detach(); |
fpVirt.reset(TV::New(url, this, emsg)); |
if (fpVirt) AttachSetup(); |
if (fpVirt) AttachDone(); |
return fpVirt; |
} |
|
84,8 → 85,10
{ |
// synchronize with server thread |
boost::lock_guard<RlinkConnect> lock(Connect()); |
if (fpVirt) DetachCleanup(); |
if (!fpVirt) return; |
DetachCleanup(); |
fpVirt.reset(); |
DetachDone(); |
return; |
} |
|
/w11/trunk/tools/src/librw11/Rw11VirtDiskFile.cpp
1,4 → 1,4
// $Id: Rw11VirtDiskFile.cpp 509 2013-04-21 20:46:20Z mueller $ |
// $Id: Rw11VirtDiskFile.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
19,7 → 19,7
|
/*! |
\file |
\version $Id: Rw11VirtDiskFile.cpp 509 2013-04-21 20:46:20Z mueller $ |
\version $Id: Rw11VirtDiskFile.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of Rw11VirtDiskFile. |
*/ |
|
70,8 → 70,7
int fd = ::open(fUrl.Path().c_str(), wpro ? O_RDONLY : O_RDWR); |
if (fd < 0) { |
emsg.InitErrno("Rw11VirtDiskFile::Open()", |
string("open() for '") + fUrl.Path() + string("' failed: "), |
errno); |
string("open() for '") + fUrl.Path() + "' failed: ", errno); |
return false; |
} |
|
78,8 → 77,7
struct stat sbuf; |
if (::fstat(fd, &sbuf) < 0) { |
emsg.InitErrno("Rw11VirtDiskFile::Open()", |
string("stat() for '") + fUrl.Path() + string("' failed: "), |
errno); |
string("stat() for '") + fUrl.Path() + "' failed: ", errno); |
return false; |
} |
|
138,8 → 136,7
|
ssize_t irc = ::write(fFd, data, nbyt); |
if (irc < ssize_t(nbyt)) { |
emsg.InitErrno("Rw11VirtDiskFile::Write()", string("write() failed: "), |
errno); |
emsg.InitErrno("Rw11VirtDiskFile::Write()", "write() failed: ", errno); |
return false; |
} |
|
154,8 → 151,7
bool Rw11VirtDiskFile::Seek(size_t seekpos, RerrMsg& emsg) |
{ |
if (::lseek(fFd, seekpos, SEEK_SET) < 0) { |
emsg.InitErrno("Rw11VirtDiskFile::Seek()", string("seek() failed: "), |
errno); |
emsg.InitErrno("Rw11VirtDiskFile::Seek()", "seek() failed: ", errno); |
return false; |
} |
|
/w11/trunk/tools/src/librw11/Rw11UnitStream.hpp
0,0 → 1,64
// $Id: Rw11UnitStream.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-04 515 1.0 Initial version |
// 2013-05-01 513 0.1 First draft |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: Rw11UnitStream.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11UnitStream. |
*/ |
|
#ifndef included_Retro_Rw11UnitStream |
#define included_Retro_Rw11UnitStream 1 |
|
#include "Rw11VirtStream.hpp" |
|
#include "Rw11UnitVirt.hpp" |
|
namespace Retro { |
|
class Rw11UnitStream : public Rw11UnitVirt<Rw11VirtStream> { |
public: |
Rw11UnitStream(Rw11Cntl* pcntl, size_t index); |
~Rw11UnitStream(); |
|
void SetPos(int pos); |
int Pos() const; |
|
int VirtRead(uint8_t* data, size_t count, RerrMsg& emsg); |
bool VirtWrite(const uint8_t* data, size_t count, RerrMsg& emsg); |
bool VirtFlush(RerrMsg& emsg); |
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; |
|
// statistics counter indices |
enum stats { |
kStatNPreAttDrop = Rw11Unit::kDimStat, |
kStatNPreAttMiss, |
kDimStat |
}; |
|
protected: |
}; |
|
} // end namespace Retro |
|
//#include "Rw11UnitStream.ipp" |
|
#endif |
/w11/trunk/tools/src/librw11/Rw11CntlLP11.hpp
0,0 → 1,75
// $Id: Rw11CntlLP11.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-01 513 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: Rw11CntlLP11.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11CntlLP11. |
*/ |
|
#ifndef included_Retro_Rw11CntlLP11 |
#define included_Retro_Rw11CntlLP11 1 |
|
#include "Rw11CntlBase.hpp" |
#include "Rw11UnitLP11.hpp" |
|
namespace Retro { |
|
class Rw11CntlLP11 : public Rw11CntlBase<Rw11UnitLP11,1> { |
public: |
|
Rw11CntlLP11(); |
~Rw11CntlLP11(); |
|
void Config(const std::string& name, uint16_t base, int lam); |
|
virtual void Start(); |
|
virtual void UnitSetup(size_t ind); |
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; |
|
// some constants (also defined in cpp) |
static const uint16_t kIbaddr = 0177514; //!< LP11 default address |
static const int kLam = 8; //!< LP11 default lam |
|
static const uint16_t kCSR = 000; //!< CSR register address offset |
static const uint16_t kBUF = 002; //!< BUF register address offset |
|
static const uint16_t kProbeOff = kCSR; //!< probe address offset (rcsr) |
static const bool kProbeInt = true; //!< probe int active |
static const bool kProbeRem = true; //!< probr rem active |
|
static const uint16_t kCSR_M_ERROR = kWBit15; |
static const uint16_t kBUF_M_VAL = kWBit08; |
static const uint16_t kBUF_M_BUF = 0177; |
|
protected: |
int AttnHandler(const RlinkServer::AttnArgs& args); |
void SetOnline(bool online); |
|
protected: |
size_t fPC_buf; //!< PrimClist: buf index |
}; |
|
} // end namespace Retro |
|
//#include "Rw11CntlLP11.ipp" |
|
#endif |
/w11/trunk/tools/src/librw11/Rw11VirtStream.hpp
0,0 → 1,75
// $Id: Rw11VirtStream.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-04 515 1.0 Initial version |
// 2013-05-01 513 0.1 First draft |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: Rw11VirtStream.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11VirtStream. |
*/ |
|
#ifndef included_Retro_Rw11VirtStream |
#define included_Retro_Rw11VirtStream 1 |
|
#include <stdio.h> |
|
#include "Rw11Virt.hpp" |
|
namespace Retro { |
|
class Rw11VirtStream : public Rw11Virt { |
public: |
|
explicit Rw11VirtStream(Rw11Unit* punit); |
~Rw11VirtStream(); |
|
bool Open(const std::string& url, RerrMsg& emsg); |
int Read(uint8_t* data, size_t count, RerrMsg& emsg); |
bool Write(const uint8_t* data, size_t count, RerrMsg& emsg); |
bool Flush(RerrMsg& emsg); |
int Tell(RerrMsg& emsg); |
bool Seek(int pos, RerrMsg& emsg); |
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; |
|
static Rw11VirtStream* New(const std::string& url, Rw11Unit* punit, |
RerrMsg& emsg); |
|
// statistics counter indices |
enum stats { |
kStatNVSRead = Rw11Virt::kDimStat, |
kStatNVSReadByt, |
kStatNVSWrite, |
kStatNVSWriteByt, |
kStatNVSFlush, |
kStatNVSTell, |
kStatNVSSeek, |
kDimStat |
}; |
|
protected: |
bool fIStream; //<! is input (read only) stream |
bool fOStream; //<! is output (write only) stream |
FILE* fFile; //<! file ptr |
}; |
|
} // end namespace Retro |
|
//#include "Rw11VirtStream.ipp" |
|
#endif |
/w11/trunk/tools/src/librw11/Rw11Unit.cpp
1,4 → 1,4
// $Id: Rw11Unit.cpp 495 2013-03-06 17:13:48Z mueller $ |
// $Id: Rw11Unit.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone() |
// 2013-03-06 495 1.0 Initial version |
// 2013-02-13 488 0.1 First draft |
// --------------------------------------------------------------------------- |
19,7 → 20,7
|
/*! |
\file |
\version $Id: Rw11Unit.cpp 495 2013-03-06 17:13:48Z mueller $ |
\version $Id: Rw11Unit.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of Rw11Unit. |
*/ |
|
43,6 → 44,7
Rw11Unit::Rw11Unit(Rw11Cntl* pcntl, size_t index) |
: fpCntlBase(pcntl), |
fIndex(index), |
fAttachOpts(), |
fStats() |
{} |
|
78,6 → 80,7
os << bl << (text?text:"--") << "Rw11Unit @ " << this << endl; |
|
os << bl << " fIndex: " << fIndex << endl; |
os << bl << " fAttachOpts: " << fAttachOpts << endl; |
fStats.Dump(os, ind+2, "fStats: "); |
return; |
} |
85,7 → 88,7
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11Unit::AttachSetup() |
void Rw11Unit::AttachDone() |
{} |
|
//------------------------------------------+----------------------------------- |
94,4 → 97,10
void Rw11Unit::DetachCleanup() |
{} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11Unit::DetachDone() |
{} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librw11/Rw11Unit.ipp
1,4 → 1,4
// $Id: Rw11Unit.ipp 495 2013-03-06 17:13:48Z mueller $ |
// $Id: Rw11Unit.ipp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.0.1 add fAttachOpts, (Set)AttachOpts() |
// 2013-03-06 495 1.0 Initial version |
// 2013-02-13 488 0.1 First draft |
// --------------------------------------------------------------------------- |
19,7 → 20,7
|
/*! |
\file |
\version $Id: Rw11Unit.ipp 495 2013-03-06 17:13:48Z mueller $ |
\version $Id: Rw11Unit.ipp 513 2013-05-01 14:02:06Z mueller $ |
\brief Implemenation (inline) of Rw11Unit. |
*/ |
|
45,6 → 46,23
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
inline void Rw11Unit::SetAttachOpts(const std::string& opts) |
{ |
fAttachOpts = opts; |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
inline const std::string& Rw11Unit::AttachOpts() const |
{ |
return fAttachOpts; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
inline Rw11Cntl& Rw11Unit::CntlBase() const |
{ |
return *fpCntlBase; |
/w11/trunk/tools/src/librw11/Rw11UnitDiskBase.ipp
1,4 → 1,4
// $Id: Rw11UnitDiskBase.ipp 509 2013-04-21 20:46:20Z mueller $ |
// $Id: Rw11UnitDiskBase.ipp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone() |
// 2013-04-14 506 1.0 Initial version |
// 2013-02-22 490 0.1 First draft |
// --------------------------------------------------------------------------- |
19,7 → 20,7
|
/*! |
\file |
\version $Id: Rw11UnitDiskBase.ipp 509 2013-04-21 20:46:20Z mueller $ |
\version $Id: Rw11UnitDiskBase.ipp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation (inline) of Rw11UnitDiskBase. |
*/ |
|
76,7 → 77,7
//! FIXME_docs |
|
template <class TC> |
void Rw11UnitDiskBase<TC>::AttachSetup() |
void Rw11UnitDiskBase<TC>::AttachDone() |
{ |
Virt()->Setup(BlockSize(), NBlock()); |
Cntl().UnitSetup(Index()); |
88,7 → 89,7
//! FIXME_docs |
|
template <class TC> |
void Rw11UnitDiskBase<TC>::DetachCleanup() |
void Rw11UnitDiskBase<TC>::DetachDone() |
{ |
SetWProt(false); |
Cntl().UnitSetup(Index()); |
/w11/trunk/tools/src/librw11/Rw11UnitStreamBase.ipp
0,0 → 1,96
// $Id: Rw11UnitStreamBase.ipp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-04 515 1.0 Initial version |
// 2013-05-01 513 0.1 First draft |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: Rw11UnitStreamBase.ipp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation (inline) of Rw11UnitStreamBase. |
*/ |
|
#include "Rw11UnitStreamBase.hpp" |
|
/*! |
\class Retro::Rw11UnitStreamBase |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Default constructor |
|
template <class TC> |
Rw11UnitStreamBase<TC>::Rw11UnitStreamBase(TC* pcntl, size_t index) |
: Rw11UnitStream(pcntl, index), |
fpCntl(pcntl) |
{} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
template <class TC> |
Rw11UnitStreamBase<TC>::~Rw11UnitStreamBase() |
{} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
template <class TC> |
inline TC& Rw11UnitStreamBase<TC>::Cntl() const |
{ |
return *fpCntl; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
template <class TC> |
void Rw11UnitStreamBase<TC>::Dump(std::ostream& os, int ind, |
const char* text) const |
{ |
RosFill bl(ind); |
os << bl << (text?text:"--") << "Rw11UnitStreamBase @ " << this << std::endl; |
os << bl << " fpCntl: " << fpCntl << std::endl; |
Rw11UnitStream::Dump(os, ind, " ^"); |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
template <class TC> |
void Rw11UnitStreamBase<TC>::AttachDone() |
{ |
Cntl().UnitSetup(Index()); |
return; |
} |
|
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
template <class TC> |
void Rw11UnitStreamBase<TC>::DetachDone() |
{ |
Cntl().UnitSetup(Index()); |
return; |
} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librw11/Rw11UnitTerm.cpp
1,4 → 1,4
// $Id: Rw11UnitTerm.cpp 508 2013-04-20 18:43:28Z mueller $ |
// $Id: Rw11UnitTerm.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone() |
// 2013-04-13 504 1.0 Initial version |
// 2013-02-19 490 0.1 First draft |
// --------------------------------------------------------------------------- |
19,7 → 20,7
|
/*! |
\file |
\version $Id: Rw11UnitTerm.cpp 508 2013-04-20 18:43:28Z mueller $ |
\version $Id: Rw11UnitTerm.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of Rw11UnitTerm. |
*/ |
|
93,8 → 94,10
|
RparseUrl purl; |
RerrMsg emsg; |
if (!purl.Set(fname, "|app|crlf|", emsg)) |
if (!purl.Set(fname, "|app|bck=|crlf|", emsg)) |
throw Rexception(emsg); |
if (!Rtools::CreateBackupFile(purl, emsg)) |
throw Rexception(emsg); |
|
ios_base::openmode mode = ios_base::out; |
if (purl.FindOpt("app")) mode |= ios_base::app; |
309,7 → 312,7
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11UnitTerm::AttachSetup() |
void Rw11UnitTerm::AttachDone() |
{ |
fpVirt->SetupRcvCallback(boost::bind(&Rw11UnitTerm::RcvCallback, |
this, _1, _2)); |
/w11/trunk/tools/src/librw11/Rw11UnitPC11.hpp
0,0 → 1,53
// $Id: Rw11UnitPC11.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-03 515 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: Rw11UnitPC11.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class Rw11UnitPC11. |
*/ |
|
#ifndef included_Retro_Rw11UnitPC11 |
#define included_Retro_Rw11UnitPC11 1 |
|
#include "Rw11VirtStream.hpp" |
|
#include "Rw11UnitStreamBase.hpp" |
|
namespace Retro { |
|
class Rw11CntlPC11; // forw decl to avoid circular incl |
|
class Rw11UnitPC11 : public Rw11UnitStreamBase<Rw11CntlPC11> { |
public: |
|
Rw11UnitPC11(Rw11CntlPC11* pcntl, size_t index); |
~Rw11UnitPC11(); |
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; |
|
protected: |
|
}; |
|
} // end namespace Retro |
|
//#include "Rw11UnitPC11.ipp" |
|
#endif |
/w11/trunk/tools/src/librw11/Rw11UnitLP11.cpp
0,0 → 1,68
// $Id: Rw11UnitLP11.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-01 513 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: Rw11UnitLP11.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of Rw11UnitLP11. |
*/ |
|
#include "boost/bind.hpp" |
|
#include "librtools/RosFill.hpp" |
#include "Rw11CntlLP11.hpp" |
|
#include "Rw11UnitLP11.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::Rw11UnitLP11 |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Constructor |
|
Rw11UnitLP11::Rw11UnitLP11(Rw11CntlLP11* pcntl, size_t index) |
: Rw11UnitStreamBase<Rw11CntlLP11>(pcntl, index) |
{ |
SetAttachOpts("?wonly"); // use write only (output) streams |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
Rw11UnitLP11::~Rw11UnitLP11() |
{} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11UnitLP11::Dump(std::ostream& os, int ind, const char* text) const |
{ |
RosFill bl(ind); |
os << bl << (text?text:"--") << "Rw11UnitLP11 @ " << this << endl; |
Rw11UnitStreamBase<Rw11CntlLP11>::Dump(os, ind, " ^"); |
return; |
} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librw11/Rw11CntlDL11.cpp
1,4 → 1,4
// $Id: Rw11CntlDL11.cpp 508 2013-04-20 18:43:28Z mueller $ |
// $Id: Rw11CntlDL11.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-04 516 1.0.2 add RxRlim support (receive interrupt rate limit) |
// 2013-04-20 508 1.0.1 add trace support |
// 2013-03-06 495 1.0 Initial version |
// 2013-02-05 483 0.1 First draft |
20,7 → 21,7
|
/*! |
\file |
\version $Id: Rw11CntlDL11.cpp 508 2013-04-20 18:43:28Z mueller $ |
\version $Id: Rw11CntlDL11.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of Rw11CntlDL11. |
*/ |
|
59,6 → 60,9
const bool Rw11CntlDL11::kProbeInt; |
const bool Rw11CntlDL11::kProbeRem; |
|
const uint16_t Rw11CntlDL11::kRCSR_M_RXRLIM; |
const uint16_t Rw11CntlDL11::kRCSR_V_RXRLIM; |
const uint16_t Rw11CntlDL11::kRCSR_B_RXRLIM; |
const uint16_t Rw11CntlDL11::kRCSR_M_RDONE; |
const uint16_t Rw11CntlDL11::kXCSR_M_XRDY; |
const uint16_t Rw11CntlDL11::kXBUF_M_RRDY; |
70,7 → 74,8
|
Rw11CntlDL11::Rw11CntlDL11() |
: Rw11CntlBase<Rw11UnitDL11,1>("dl11"), |
fPC_xbuf(0) |
fPC_xbuf(0), |
fRxRlim(0) |
{ |
// must here because Unit have a back-pointer (not available at Rw11CntlBase) |
for (size_t i=0; i<NUnit(); i++) { |
117,6 → 122,20
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlDL11::UnitSetup(size_t ind) |
{ |
Rw11Cpu& cpu = Cpu(); |
uint16_t rcsr = (fRxRlim<<kRCSR_V_RXRLIM) & kRCSR_M_RXRLIM; |
RlinkCommandList clist; |
cpu.AddIbrb(clist, fBase); |
cpu.AddWibr(clist, fBase+kRCSR, rcsr); |
Server().Exec(clist); |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlDL11::Wakeup() |
{ |
if (!fspUnit[0]->RcvQueueEmpty()) { |
141,11 → 160,33
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlDL11::SetRxRlim(uint16_t rlim) |
{ |
if (rlim > kRCSR_B_RXRLIM) |
throw Rexception("Rw11CntlDL11::SetRxRlim","Bad args: rlim too large"); |
|
fRxRlim = rlim; |
UnitSetup(0); |
return; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
uint16_t Rw11CntlDL11::RxRlim() const |
{ |
return fRxRlim; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void Rw11CntlDL11::Dump(std::ostream& os, int ind, const char* text) const |
{ |
RosFill bl(ind); |
os << bl << (text?text:"--") << "Rw11CntlDL11 @ " << this << endl; |
os << bl << " fPC_xbuf: " << fPC_xbuf << endl; |
os << bl << " fRxRlim: " << fRxRlim << endl; |
|
Rw11CntlBase<Rw11UnitDL11,1>::Dump(os, ind, " ^"); |
return; |
/w11/trunk/tools/src/librwxxtpp/RtclRw11CntlLP11.cpp
0,0 → 1,96
// $Id: RtclRw11CntlLP11.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-01 513 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: RtclRw11CntlLP11.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of RtclRw11CntlLP11. |
*/ |
|
#include "librtcltools/RtclNameSet.hpp" |
|
#include "RtclRw11CntlLP11.hpp" |
#include "RtclRw11UnitLP11.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::RtclRw11CntlLP11 |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Constructor |
|
RtclRw11CntlLP11::RtclRw11CntlLP11() |
: RtclRw11CntlBase<Rw11CntlLP11>("Rw11CntlLP11") |
{ |
//Rw11CntlLP11* pobj = &Obj(); |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
RtclRw11CntlLP11::~RtclRw11CntlLP11() |
{} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
int RtclRw11CntlLP11::FactoryCmdConfig(RtclArgs& args, RtclRw11Cpu& cpu) |
{ |
static RtclNameSet optset("-base|-lam"); |
|
string cntlname(cpu.Obj().NextCntlName("lp")); |
string cntlcmd = cpu.CommandName() + cntlname; |
|
uint16_t base = Rw11CntlLP11::kIbaddr; |
int lam = Rw11CntlLP11::kLam; |
|
string opt; |
while (args.NextOpt(opt, optset)) { |
if (opt == "-base") { |
if (!args.GetArg("base", base, 0177776, 0160000)) return kERR; |
} else if (opt == "-lam") { |
if (!args.GetArg("lam", lam, 0, 15)) return kERR; |
} |
} |
if (!args.AllDone()) return kERR; |
|
// configure controller |
Obj().Config(cntlname, base, lam); |
|
// install in CPU |
cpu.Obj().AddCntl(dynamic_pointer_cast<Rw11Cntl>(ObjSPtr())); |
|
// finally create tcl command |
CreateObjectCmd(args.Interp(), cntlcmd.c_str()); |
|
// and create unit commands |
for (size_t i=0; i<Obj().NUnit(); i++) { |
string unitcmd = cpu.CommandName() + Obj().UnitName(i); |
new RtclRw11UnitLP11(args.Interp(), unitcmd, Obj().UnitSPtr(i)); |
} |
|
return kOK; |
} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librwxxtpp/RtclRw11UnitStream.hpp
0,0 → 1,52
// $Id: RtclRw11UnitStream.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-01 513 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: RtclRw11UnitStream.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class RtclRw11UnitStream. |
*/ |
|
#ifndef included_Retro_RtclRw11UnitStream |
#define included_Retro_RtclRw11UnitStream 1 |
|
#include "librw11/Rw11UnitStream.hpp" |
|
#include "RtclRw11Unit.hpp" |
|
namespace Retro { |
|
class RtclRw11UnitStream { |
public: |
RtclRw11UnitStream(RtclRw11Unit* ptcl, |
Rw11UnitStream* pobj); |
~RtclRw11UnitStream(); |
|
protected: |
|
protected: |
RtclRw11Unit* fpTcl; |
Rw11UnitStream* fpObj; |
}; |
|
} // end namespace Retro |
|
//#include "RtclRw11UnitStream.ipp" |
|
#endif |
/w11/trunk/tools/src/librwxxtpp/RtclRw11CntlLP11.hpp
0,0 → 1,46
// $Id: RtclRw11CntlLP11.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-01 513 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: RtclRw11CntlLP11.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class RtclRw11CntlLP11. |
*/ |
|
#ifndef included_Retro_RtclRw11CntlLP11 |
#define included_Retro_RtclRw11CntlLP11 1 |
|
#include "RtclRw11CntlBase.hpp" |
#include "librw11/Rw11CntlLP11.hpp" |
|
namespace Retro { |
|
class RtclRw11CntlLP11 : public RtclRw11CntlBase<Rw11CntlLP11> { |
public: |
RtclRw11CntlLP11(); |
~RtclRw11CntlLP11(); |
|
virtual int FactoryCmdConfig(RtclArgs& args, RtclRw11Cpu& cpu); |
}; |
|
} // end namespace Retro |
|
//#include "RtclRw11CntlLP11.ipp" |
|
#endif |
/w11/trunk/tools/src/librwxxtpp/RtclRw11Cpu.cpp
1,4 → 1,4
// $Id: RtclRw11Cpu.cpp 511 2013-04-27 13:51:46Z mueller $ |
// $Id: RtclRw11Cpu.cpp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
20,7 → 20,7
|
/*! |
\file |
\version $Id: RtclRw11Cpu.cpp 511 2013-04-27 13:51:46Z mueller $ |
\version $Id: RtclRw11Cpu.cpp 513 2013-05-01 14:02:06Z mueller $ |
\brief Implemenation of RtclRw11Cpu. |
*/ |
|
823,7 → 823,7
|
int RtclRw11Cpu::M_show(RtclArgs& args) |
{ |
static RtclNameSet optset("-pcps|-r0r5|-mmu|-ubmap" |
static RtclNameSet optset("-pcps|-r0ps|-mmu|-ubmap" |
); |
|
string opt; |
838,10 → 838,9
"F:seq", "F:vmbox" , "1101", "1111"}; |
|
while (args.NextOpt(opt, optset)) { |
if (opt == "-pcps") { |
if (opt == "-pcps" || opt == "-r0ps") { |
RlinkCommandList clist; |
size_t i_pc = clist.AddRreg(base + Rw11Cpu::kCp_addr_pc); |
size_t i_sp = clist.AddRreg(base + Rw11Cpu::kCp_addr_r0+6); |
size_t i_psw = clist.AddRreg(base + Rw11Cpu::kCp_addr_psw); |
size_t i_stat = clist.AddRreg(base + Rw11Cpu::kCp_addr_stat); |
if (!Server().Exec(clist, emsg)) return args.Quit(emsg); |
854,15 → 853,37
uint16_t psw_tbit = (psw>>4) & 001; |
uint16_t psw_nzvc = (psw) & 017; |
uint16_t stat_rust = (stat>>4) & 017; |
sos << "PC=" << RosPrintBvi(clist[i_pc].Data(),8) |
<< " SP=" << RosPrintBvi(clist[i_sp].Data(),8) |
<< " PS=" << RosPrintBvi(psw,8) |
uint16_t regs[8]; |
regs[7] = clist[i_pc].Data(); |
bool r0ps = opt == "-r0ps"; |
|
if (r0ps) { |
clist.Clear(); |
for (size_t i=0; i<7; i++) clist.AddRreg(base + Rw11Cpu::kCp_addr_r0+i); |
if (!Server().Exec(clist, emsg)) return args.Quit(emsg); |
for (size_t i=0; i<7; i++) regs[i] = clist[i].Data(); |
} |
|
if (r0ps) sos << "Processor registers and status:" << endl; |
if (!r0ps) sos << " PC: " << RosPrintBvi(regs[7],8); |
sos << " PS: " << RosPrintBvi(psw,8) |
<< " cm,pm=" << mode[psw_cm] << "," << mode[psw_pm] |
<< " s,p,t=" << psw_set << "," << psw_pri << "," << psw_tbit |
<< " NZVC=" << RosPrintBvi(psw_nzvc,2,4) |
<< " rust=" << RosPrintBvi(stat_rust,8,4) << " " << rust[stat_rust] |
<< " rust: " << RosPrintBvi(stat_rust,8,4) << " " << rust[stat_rust] |
<< endl; |
|
if (r0ps) { |
sos << " R0: " << RosPrintBvi(regs[0],8) |
<< " R1: " << RosPrintBvi(regs[1],8) |
<< " R2: " << RosPrintBvi(regs[2],8) |
<< " R3: " << RosPrintBvi(regs[3],8) << endl; |
sos << " R4: " << RosPrintBvi(regs[4],8) |
<< " R5: " << RosPrintBvi(regs[5],8) |
<< " SP: " << RosPrintBvi(regs[6],8) |
<< " PC: " << RosPrintBvi(regs[7],8) << endl; |
} |
|
} else if (opt == "-r0r5") { |
RlinkCommandList clist; |
for (size_t i=0; i<6; i++) clist.AddRreg(base + Rw11Cpu::kCp_addr_r0+i); |
964,7 → 985,7
size_t k = 2*(i+j); |
uint32_t data = uint32_t(ubmap[k]) | (uint32_t(ubmap[k+1]))<<16; |
if (j!=0) sos << " "; |
sos << RosPrintBvi(j+i,8,5) << " " |
sos << RosPrintBvi(uint32_t(j+i),8,5) << " " |
<< RosPrintBvi(data,8,22); |
} |
sos << endl; |
/w11/trunk/tools/src/librwxxtpp/Makefile
1,4 → 1,4
# $Id: Makefile 504 2013-04-13 15:37:24Z mueller $ |
# $Id: Makefile 515 2013-05-04 17:28:59Z mueller $ |
# |
# Revision History: |
# Date Rev Version Comment |
29,8 → 29,11
OBJ_all += RtclRw11Unit.o |
OBJ_all += RtclRw11UnitTerm.o |
OBJ_all += RtclRw11UnitDisk.o |
OBJ_all += RtclRw11UnitStream.o |
OBJ_all += RtclRw11CntlDL11.o RtclRw11UnitDL11.o |
OBJ_all += RtclRw11CntlRK11.o RtclRw11UnitRK11.o |
OBJ_all += RtclRw11CntlLP11.o RtclRw11UnitLP11.o |
OBJ_all += RtclRw11CntlPC11.o RtclRw11UnitPC11.o |
# |
DEP_all = $(OBJ_all:.o=.dep) |
# |
/w11/trunk/tools/src/librwxxtpp/RtclRw11UnitPC11.cpp
0,0 → 1,68
// $Id: RtclRw11UnitPC11.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-03 515 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: RtclRw11UnitPC11.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of RtclRw11UnitPC11. |
*/ |
|
#include "RtclRw11UnitPC11.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::RtclRw11UnitPC11 |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Constructor |
|
RtclRw11UnitPC11::RtclRw11UnitPC11(Tcl_Interp* interp, |
const std::string& unitcmd, |
const boost::shared_ptr<Rw11UnitPC11>& spunit) |
: RtclRw11UnitBase<Rw11UnitPC11>("Rw11UnitPC11", spunit), |
RtclRw11UnitStream(this, spunit.get()) |
{ |
// create default unit command |
CreateObjectCmd(interp, unitcmd.c_str()); |
|
// for 1st PC11, create also alias |
// cpuxpca0 -> cpuxpr |
// cpuxpca1 -> cpuxpp |
if (unitcmd.length() == 8) { |
size_t ind = spunit->Index(); |
if (unitcmd.length() == 8 && unitcmd.substr(4,3) == "pca") { |
string alias = unitcmd.substr(0,4); |
alias += (ind==Rw11CntlPC11::kUnit_PR) ? "pr" : "pp"; |
Tcl_CreateAlias(interp, alias.c_str(), interp, unitcmd.c_str(), 0, NULL); |
} |
} |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
RtclRw11UnitPC11::~RtclRw11UnitPC11() |
{} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librwxxtpp/RtclRw11UnitPC11.hpp
0,0 → 1,52
// $Id: RtclRw11UnitPC11.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-03 515 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: RtclRw11UnitPC11.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class RtclRw11UnitPC11. |
*/ |
|
#ifndef included_Retro_RtclRw11UnitPC11 |
#define included_Retro_RtclRw11UnitPC11 1 |
|
#include "librw11/Rw11UnitPC11.hpp" |
#include "librw11/Rw11CntlPC11.hpp" |
|
#include "RtclRw11UnitStream.hpp" |
#include "RtclRw11UnitBase.hpp" |
|
namespace Retro { |
|
class RtclRw11UnitPC11 : public RtclRw11UnitBase<Rw11UnitPC11>, |
public RtclRw11UnitStream { |
public: |
RtclRw11UnitPC11(Tcl_Interp* interp, |
const std::string& unitcmd, |
const boost::shared_ptr<Rw11UnitPC11>& spunit); |
~RtclRw11UnitPC11(); |
|
protected: |
}; |
|
} // end namespace Retro |
|
//#include "RtclRw11UnitPC11.ipp" |
|
#endif |
/w11/trunk/tools/src/librwxxtpp/RtclRw11UnitLP11.cpp
0,0 → 1,55
// $Id: RtclRw11UnitLP11.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-01 513 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: RtclRw11UnitLP11.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of RtclRw11UnitLP11. |
*/ |
|
#include "RtclRw11UnitLP11.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::RtclRw11UnitLP11 |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Constructor |
|
RtclRw11UnitLP11::RtclRw11UnitLP11(Tcl_Interp* interp, |
const std::string& unitcmd, |
const boost::shared_ptr<Rw11UnitLP11>& spunit) |
: RtclRw11UnitBase<Rw11UnitLP11>("Rw11UnitLP11", spunit), |
RtclRw11UnitStream(this, spunit.get()) |
{ |
CreateObjectCmd(interp, unitcmd.c_str()); |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
RtclRw11UnitLP11::~RtclRw11UnitLP11() |
{} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librwxxtpp/RtclRw11.cpp
1,4 → 1,4
// $Id: RtclRw11.cpp 504 2013-04-13 15:37:24Z mueller $ |
// $Id: RtclRw11.cpp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
19,7 → 19,7
|
/*! |
\file |
\version $Id: RtclRw11.cpp 504 2013-04-13 15:37:24Z mueller $ |
\version $Id: RtclRw11.cpp 513 2013-05-01 14:02:06Z mueller $ |
\brief Implemenation of class RtclRw11. |
*/ |
|
143,7 → 143,7
if (!args.AllDone()) return kERR; |
ostringstream sos; |
|
sos << "cpu type base : cntl type ibbase probe lam boot" << endl; |
sos << "cpu type base : cntl type ibbase probe lam boot" << endl; |
|
for (size_t i=0; i<Obj().NCpu(); i++) { |
Rw11Cpu& cpu(Obj().Cpu(i)); |
159,7 → 159,7
sos << " " << RosPrintf(cntl.Name().c_str(),"-s",4) |
<< " " << RosPrintf(cntl.Type().c_str(),"-s",4) |
<< " " << RosPrintf(cntl.Base(),"o0",6) |
<< " ir=" << pstat.IndicatorInt() << "," << pstat.IndicatorRem(); |
<< " ir=" << pstat.IndicatorInt() << "," << pstat.IndicatorRem(); |
if (cntl.Lam() > 0) sos << " " << RosPrintf(cntl.Lam(),"d",3); |
else sos << " -"; |
uint16_t aload; |
/w11/trunk/tools/src/librwxxtpp/RtclRw11CntlDL11.cpp
1,4 → 1,4
// $Id: RtclRw11CntlDL11.cpp 504 2013-04-13 15:37:24Z mueller $ |
// $Id: RtclRw11CntlDL11.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-04 516 1.0.1 add RxRlim support (receive interrupt rate limit) |
// 2013-03-06 495 1.0 Initial version |
// 2013-02-02 480 0.1 First draft |
// --------------------------------------------------------------------------- |
19,7 → 20,7
|
/*! |
\file |
\version $Id: RtclRw11CntlDL11.cpp 504 2013-04-13 15:37:24Z mueller $ |
\version $Id: RtclRw11CntlDL11.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of RtclRw11CntlDL11. |
*/ |
|
44,7 → 45,11
RtclRw11CntlDL11::RtclRw11CntlDL11() |
: RtclRw11CntlBase<Rw11CntlDL11>("Rw11CntlDL11") |
{ |
//Rw11CntlDL11* pobj = &Obj(); |
Rw11CntlDL11* pobj = &Obj(); |
fGets.Add<uint16_t> ("rxrlim", |
boost::bind(&Rw11CntlDL11::RxRlim, pobj)); |
fSets.Add<uint16_t> ("rxrlim", |
boost::bind(&Rw11CntlDL11::SetRxRlim,pobj, _1)); |
} |
|
//------------------------------------------+----------------------------------- |
/w11/trunk/tools/src/librwxxtpp/RtclRw11UnitLP11.hpp
0,0 → 1,52
// $Id: RtclRw11UnitLP11.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-01 513 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: RtclRw11UnitLP11.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class RtclRw11UnitLP11. |
*/ |
|
#ifndef included_Retro_RtclRw11UnitLP11 |
#define included_Retro_RtclRw11UnitLP11 1 |
|
#include "librw11/Rw11UnitLP11.hpp" |
#include "librw11/Rw11CntlLP11.hpp" |
|
#include "RtclRw11UnitStream.hpp" |
#include "RtclRw11UnitBase.hpp" |
|
namespace Retro { |
|
class RtclRw11UnitLP11 : public RtclRw11UnitBase<Rw11UnitLP11>, |
public RtclRw11UnitStream { |
public: |
RtclRw11UnitLP11(Tcl_Interp* interp, |
const std::string& unitcmd, |
const boost::shared_ptr<Rw11UnitLP11>& spunit); |
~RtclRw11UnitLP11(); |
|
protected: |
}; |
|
} // end namespace Retro |
|
//#include "RtclRw11UnitLP11.ipp" |
|
#endif |
/w11/trunk/tools/src/librwxxtpp/RtclRw11CntlPC11.cpp
0,0 → 1,96
// $Id: RtclRw11CntlPC11.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-03 515 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: RtclRw11CntlPC11.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of RtclRw11CntlPC11. |
*/ |
|
#include "librtcltools/RtclNameSet.hpp" |
|
#include "RtclRw11CntlPC11.hpp" |
#include "RtclRw11UnitPC11.hpp" |
|
using namespace std; |
|
/*! |
\class Retro::RtclRw11CntlPC11 |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Constructor |
|
RtclRw11CntlPC11::RtclRw11CntlPC11() |
: RtclRw11CntlBase<Rw11CntlPC11>("Rw11CntlPC11") |
{ |
//Rw11CntlPC11* pobj = &Obj(); |
} |
|
//------------------------------------------+----------------------------------- |
//! Destructor |
|
RtclRw11CntlPC11::~RtclRw11CntlPC11() |
{} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
int RtclRw11CntlPC11::FactoryCmdConfig(RtclArgs& args, RtclRw11Cpu& cpu) |
{ |
static RtclNameSet optset("-base|-lam"); |
|
string cntlname(cpu.Obj().NextCntlName("pc")); |
string cntlcmd = cpu.CommandName() + cntlname; |
|
uint16_t base = Rw11CntlPC11::kIbaddr; |
int lam = Rw11CntlPC11::kLam; |
|
string opt; |
while (args.NextOpt(opt, optset)) { |
if (opt == "-base") { |
if (!args.GetArg("base", base, 0177776, 0160000)) return kERR; |
} else if (opt == "-lam") { |
if (!args.GetArg("lam", lam, 0, 15)) return kERR; |
} |
} |
if (!args.AllDone()) return kERR; |
|
// configure controller |
Obj().Config(cntlname, base, lam); |
|
// install in CPU |
cpu.Obj().AddCntl(dynamic_pointer_cast<Rw11Cntl>(ObjSPtr())); |
|
// finally create tcl command |
CreateObjectCmd(args.Interp(), cntlcmd.c_str()); |
|
// and create unit commands |
for (size_t i=0; i<Obj().NUnit(); i++) { |
string unitcmd = cpu.CommandName() + Obj().UnitName(i); |
new RtclRw11UnitPC11(args.Interp(), unitcmd, Obj().UnitSPtr(i)); |
} |
|
return kOK; |
} |
|
} // end namespace Retro |
/w11/trunk/tools/src/librwxxtpp/RtclRw11CntlFactory.cpp
1,4 → 1,4
// $Id: RtclRw11CntlFactory.cpp 504 2013-04-13 15:37:24Z mueller $ |
// $Id: RtclRw11CntlFactory.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.0.1 add LP11 |
// 2013-03-06 495 1.0 Initial version |
// 2013-02-09 489 0.1 First draft |
// --------------------------------------------------------------------------- |
19,7 → 20,7
|
/*! |
\file |
\version $Id: RtclRw11CntlFactory.cpp 504 2013-04-13 15:37:24Z mueller $ |
\version $Id: RtclRw11CntlFactory.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of global function RtclRw11CntlFactory. |
*/ |
|
29,6 → 30,8
|
#include "RtclRw11CntlDL11.hpp" |
#include "RtclRw11CntlRK11.hpp" |
#include "RtclRw11CntlLP11.hpp" |
#include "RtclRw11CntlPC11.hpp" |
|
using namespace std; |
|
54,6 → 57,16
if(pobj->FactoryCmdConfig(args, cpu) != TCL_OK) return TCL_ERROR; |
pobj.release(); |
|
} else if (type == "lp11") { // lp11 -------------------------- |
unique_ptr<RtclRw11CntlLP11> pobj(new RtclRw11CntlLP11()); |
if(pobj->FactoryCmdConfig(args, cpu) != TCL_OK) return TCL_ERROR; |
pobj.release(); |
|
} else if (type == "pc11") { // pc11 -------------------------- |
unique_ptr<RtclRw11CntlPC11> pobj(new RtclRw11CntlPC11()); |
if(pobj->FactoryCmdConfig(args, cpu) != TCL_OK) return TCL_ERROR; |
pobj.release(); |
|
} else { // unknown cntl type ------------- |
return args.Quit(string("-E: unknown controller type '") + type + "'"); |
} |
/w11/trunk/tools/src/librwxxtpp/RtclRw11CntlPC11.hpp
0,0 → 1,46
// $Id: RtclRw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-03 515 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
|
/*! |
\file |
\version $Id: RtclRw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Declaration of class RtclRw11CntlPC11. |
*/ |
|
#ifndef included_Retro_RtclRw11CntlPC11 |
#define included_Retro_RtclRw11CntlPC11 1 |
|
#include "RtclRw11CntlBase.hpp" |
#include "librw11/Rw11CntlPC11.hpp" |
|
namespace Retro { |
|
class RtclRw11CntlPC11 : public RtclRw11CntlBase<Rw11CntlPC11> { |
public: |
RtclRw11CntlPC11(); |
~RtclRw11CntlPC11(); |
|
virtual int FactoryCmdConfig(RtclArgs& args, RtclRw11Cpu& cpu); |
}; |
|
} // end namespace Retro |
|
//#include "RtclRw11CntlPC11.ipp" |
|
#endif |
/w11/trunk/tools/src/librwxxtpp/RtclRw11UnitStream.cpp
0,0 → 1,60
// $Id: RtclRw11UnitStream.cpp 515 2013-05-04 17:28:59Z mueller $ |
// |
// Copyright 2013- 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 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 |
// 2013-05-01 513 1.0 Initial version |
// --------------------------------------------------------------------------- |
|
/*! |
\file |
\version $Id: RtclRw11UnitStream.cpp 515 2013-05-04 17:28:59Z mueller $ |
\brief Implemenation of RtclRw11UnitStream. |
*/ |
|
using namespace std; |
|
#include "RtclRw11UnitStream.hpp" |
|
/*! |
\class Retro::RtclRw11UnitStream |
\brief FIXME_docs |
*/ |
|
// all method definitions in namespace Retro |
namespace Retro { |
|
//------------------------------------------+----------------------------------- |
//! Constructor |
|
RtclRw11UnitStream::RtclRw11UnitStream(RtclRw11Unit* ptcl, Rw11UnitStream* pobj) |
: fpTcl(ptcl), |
fpObj(pobj) |
{ |
RtclGetList& gets = ptcl->GetList(); |
RtclSetList& sets = ptcl->SetList(); |
gets.Add<int> ("pos", |
boost::bind(&Rw11UnitStream::Pos, pobj)); |
|
sets.Add<int> ("pos", |
boost::bind(&Rw11UnitStream::SetPos,pobj, _1)); |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
RtclRw11UnitStream::~RtclRw11UnitStream() |
{} |
|
|
} // end namespace Retro |
/w11/trunk/tools/src/librlink/RlinkPortFifo.cpp
1,4 → 1,4
// $Id: RlinkPortFifo.cpp 492 2013-02-24 22:14:47Z mueller $ |
// $Id: RlinkPortFifo.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2011-2013 y Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
20,7 → 20,7
|
/*! |
\file |
\version $Id: RlinkPortFifo.cpp 492 2013-02-24 22:14:47Z mueller $ |
\version $Id: RlinkPortFifo.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of RlinkPortFifo. |
*/ |
|
97,7 → 97,7
if (irc == 0) { |
if ((stat_fifo.st_mode & S_IFIFO) == 0) { |
emsg.Init("RlinkPortFifo::OpenFiFo()", |
string("'") + name + string("' exists but is not a pipe")); |
string("'") + name + "' exists but is not a pipe"); |
return -1; |
} |
} else { |
105,7 → 105,7
irc = mkfifo(name.c_str(), mode); |
if (irc != 0) { |
emsg.InitErrno("RlinkPortFifo::OpenFifo()", |
string("mkfifo() for '") + name + string("' failed: "), |
string("mkfifo() for '") + name + "' failed: ", |
errno); |
return -1; |
} |
114,7 → 114,7
irc = open(name.c_str(), snd ? O_WRONLY : O_RDONLY); |
if (irc < 0) { |
emsg.InitErrno("RlinkPortFifo::OpenFifo()", |
string("open() for '") + name + string("' failed: "), |
string("open() for '") + name + "' failed: ", |
errno); |
return -1; |
} |
/w11/trunk/tools/src/librlink/RlinkPort.hpp
1,4 → 1,4
// $Id: RlinkPort.hpp 492 2013-02-24 22:14:47Z mueller $ |
// $Id: RlinkPort.hpp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.2.1 fTraceLevel now uint32_t |
// 2013-02-23 492 1.2 use RparseUrl |
// 2013-02-22 491 1.1 use new RlogFile/RlogMsg interfaces |
// 2013-01-27 477 1.0.3 add RawRead(),RawWrite() methods |
25,7 → 26,7
|
/*! |
\file |
\version $Id: RlinkPort.hpp 492 2013-02-24 22:14:47Z mueller $ |
\version $Id: RlinkPort.hpp 513 2013-05-01 14:02:06Z mueller $ |
\brief Declaration of class RlinkPort. |
*/ |
|
69,8 → 70,8
int FdWrite() const; |
|
void SetLogFile(const boost::shared_ptr<RlogFile>& splog); |
void SetTraceLevel(size_t level); |
size_t TraceLevel() const; |
void SetTraceLevel(uint32_t level); |
uint32_t TraceLevel() const; |
|
const Rstats& Stats() const; |
|
101,7 → 102,7
int fFdRead; //!< fd for read |
int fFdWrite; //!< fd for write |
boost::shared_ptr<RlogFile> fspLog; //!< log file ptr |
size_t fTraceLevel; //!< trace level |
uint32_t fTraceLevel; //!< trace level |
Rstats fStats; //!< statistics |
}; |
|
/w11/trunk/tools/src/librlink/RlinkPort.ipp
1,4 → 1,4
// $Id: RlinkPort.ipp 492 2013-02-24 22:14:47Z mueller $ |
// $Id: RlinkPort.ipp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.2.1 fTraceLevel now uint32_t |
// 2013-02-23 492 1.2 use RparseUrl |
// 2013-02-22 491 1.1 use new RlogFile/RlogMsg interfaces |
// 2011-03-27 375 1.0 Initial version |
21,7 → 22,7
|
/*! |
\file |
\version $Id: RlinkPort.ipp 492 2013-02-24 22:14:47Z mueller $ |
\version $Id: RlinkPort.ipp 513 2013-05-01 14:02:06Z mueller $ |
\brief Implemenation (inline) of RlinkPort. |
*/ |
|
72,7 → 73,7
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
inline void RlinkPort::SetTraceLevel(size_t level) |
inline void RlinkPort::SetTraceLevel(uint32_t level) |
{ |
fTraceLevel = level; |
return; |
81,7 → 82,7
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
inline size_t RlinkPort::TraceLevel() const |
inline uint32_t RlinkPort::TraceLevel() const |
{ |
return fTraceLevel; |
} |
/w11/trunk/tools/src/librlink/ReventLoop.hpp
1,4 → 1,4
// $Id: ReventLoop.hpp 494 2013-03-03 21:50:07Z mueller $ |
// $Id: ReventLoop.hpp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.1.1 fTraceLevel now uint32_t |
// 2013-02-22 491 1.1 use new RlogFile/RlogMsg interfaces |
// 2013-01-11 473 1.0 Initial version |
// --------------------------------------------------------------------------- |
20,7 → 21,7
|
/*! |
\file |
\version $Id: ReventLoop.hpp 494 2013-03-03 21:50:07Z mueller $ |
\version $Id: ReventLoop.hpp 513 2013-05-01 14:02:06Z mueller $ |
\brief Declaration of class \c ReventLoop. |
*/ |
|
55,8 → 56,8
void RemovePollHandler(int fd); |
|
void SetLogFile(const boost::shared_ptr<RlogFile>& splog); |
void SetTraceLevel(size_t level); |
size_t TraceLevel() const; |
void SetTraceLevel(uint32_t level); |
uint32_t TraceLevel() const; |
|
void Stop(); |
virtual void EventLoop(); |
84,7 → 85,7
std::vector<PollDsc> fPollDsc; |
std::vector<pollfd> fPollFd; |
std::vector<pollhdl_t> fPollHdl; |
size_t fTraceLevel; //!< trace level |
uint32_t fTraceLevel; //!< trace level |
boost::shared_ptr<RlogFile> fspLog; //!< log file ptr |
}; |
|
/w11/trunk/tools/src/librlink/ReventLoop.ipp
1,4 → 1,4
// $Id: ReventLoop.ipp 491 2013-02-23 12:41:18Z mueller $ |
// $Id: ReventLoop.ipp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.1.1 fTraceLevel now uint32_t |
// 2013-02-22 491 1.1 use new RlogFile/RlogMsg interfaces |
// 2013-01-11 473 1.0 Initial version |
// --------------------------------------------------------------------------- |
19,7 → 20,7
|
/*! |
\file |
\version $Id: ReventLoop.ipp 491 2013-02-23 12:41:18Z mueller $ |
\version $Id: ReventLoop.ipp 513 2013-05-01 14:02:06Z mueller $ |
\brief Implemenation (inline) of class ReventLoop. |
*/ |
|
47,7 → 48,7
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
inline void ReventLoop::SetTraceLevel(size_t level) |
inline void ReventLoop::SetTraceLevel(uint32_t level) |
{ |
fTraceLevel = level; |
return; |
56,7 → 57,7
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
inline size_t ReventLoop::TraceLevel() const |
inline uint32_t ReventLoop::TraceLevel() const |
{ |
return fTraceLevel; |
} |
/w11/trunk/tools/src/librlink/RlinkServer.cpp
1,4 → 1,4
// $Id: RlinkServer.cpp 509 2013-04-21 20:46:20Z mueller $ |
// $Id: RlinkServer.cpp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.0.2 fTraceLevel now uint32_t |
// 2013-04-21 509 1.0.1 add Resume(), reorganize server start handling |
// 2013-03-06 495 1.0 Initial version |
// 2013-01-12 474 0.5 First draft |
20,7 → 21,7
|
/*! |
\file |
\version $Id: RlinkServer.cpp 509 2013-04-21 20:46:20Z mueller $ |
\version $Id: RlinkServer.cpp 513 2013-05-01 14:02:06Z mueller $ |
\brief Implemenation of RlinkServer. |
*/ |
|
295,7 → 296,7
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
void RlinkServer::SetTraceLevel(size_t level) |
void RlinkServer::SetTraceLevel(uint32_t level) |
{ |
fTraceLevel = level; |
fELoop.SetTraceLevel(level); |
/w11/trunk/tools/src/librlink/RlinkServer.hpp
1,4 → 1,4
// $Id: RlinkServer.hpp 509 2013-04-21 20:46:20Z mueller $ |
// $Id: RlinkServer.hpp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.0.2 fTraceLevel now uint32_t |
// 2013-04-21 509 1.0.1 add Resume(), reorganize server start handling |
// 2013-03-06 495 1.0 Initial version |
// 2013-01-12 474 0.5 First draft |
20,7 → 21,7
|
/*! |
\file |
\version $Id: RlinkServer.hpp 509 2013-04-21 20:46:20Z mueller $ |
\version $Id: RlinkServer.hpp 513 2013-05-01 14:02:06Z mueller $ |
\brief Declaration of class \c RlinkServer. |
*/ |
|
99,8 → 100,8
bool IsActiveInside() const; |
bool IsActiveOutside() const; |
|
void SetTraceLevel(size_t level); |
size_t TraceLevel() const; |
void SetTraceLevel(uint32_t level); |
uint32_t TraceLevel() const; |
|
const Rstats& Stats() const; |
|
169,7 → 170,7
boost::thread fServerThread; |
bool fAttnSeen; |
uint16_t fAttnPatt; |
size_t fTraceLevel; //!< trace level |
uint32_t fTraceLevel; //!< trace level |
Rstats fStats; //!< statistics |
}; |
|
/w11/trunk/tools/src/librlink/RlinkPortFactory.cpp
1,4 → 1,4
// $Id: RlinkPortFactory.cpp 492 2013-02-24 22:14:47Z mueller $ |
// $Id: RlinkPortFactory.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
21,7 → 21,7
|
/*! |
\file |
\version $Id: RlinkPortFactory.cpp 492 2013-02-24 22:14:47Z mueller $ |
\version $Id: RlinkPortFactory.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of RlinkPortFactory. |
*/ |
|
52,7 → 52,7
|
if (scheme.length() == 0) { |
emsg.Init("RlinkPortFactory::New()", |
string("no scheme specified in url '" + url + string("'"))); |
string("no scheme specified in url '" + url + "'")); |
return 0; |
} |
|
/w11/trunk/tools/src/librlink/RlinkPortTerm.cpp
1,4 → 1,4
// $Id: RlinkPortTerm.cpp 494 2013-03-03 21:50:07Z mueller $ |
// $Id: RlinkPortTerm.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
25,7 → 25,7
|
/*! |
\file |
\version $Id: RlinkPortTerm.cpp 494 2013-03-03 21:50:07Z mueller $ |
\version $Id: RlinkPortTerm.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of RlinkPortTerm. |
*/ |
|
114,7 → 114,7
if (baud=="4000000" || baud=="4000k" || baud=="4M") speed = B4000000; |
if (speed == B0) { |
emsg.Init("RlinkPortTerm::Open()", |
string("invalid baud rate '") + baud + string("' specified")); |
string("invalid baud rate '") + baud + "' specified"); |
return false; |
} |
} |
124,7 → 124,7
fd = open(fUrl.Path().c_str(), O_RDWR|O_NOCTTY); |
if (fd < 0) { |
emsg.InitErrno("RlinkPortTerm::Open()", |
string("open() for '") + fUrl.Path() + string("' failed: "), |
string("open() for '") + fUrl.Path() + "' failed: ", |
errno); |
return false; |
} |
131,8 → 131,8
|
if (!isatty(fd)) { |
emsg.Init("RlinkPortTerm::Open()", |
string("isatty() check for '") + fUrl.Path() + |
string("' failed: not a TTY")); |
string("isatty() check for '") + fUrl.Path() + |
"' failed: not a TTY"); |
close(fd); |
return false; |
} |
139,8 → 139,7
|
if (tcgetattr(fd, &fTiosOld) != 0) { |
emsg.InitErrno("RlinkPortTerm::Open()", |
string("tcgetattr() for '") + fUrl.Path() + |
string("' failed: "), |
string("tcgetattr() for '") + fUrl.Path() + "' failed: ", |
errno); |
close(fd); |
return false; |
174,7 → 173,7
|
if (cfsetspeed(&fTiosNew, speed) != 0) { |
emsg.InitErrno("RlinkPortTerm::Open()", |
string("cfsetspeed() for '") + baud + string("' failed: "), |
string("cfsetspeed() for '") + baud + "' failed: ", |
errno); |
close(fd); |
return false; |
198,8 → 197,7
|
if (tcsetattr(fd, TCSANOW, &fTiosNew) != 0) { |
emsg.InitErrno("RlinkPortTerm::Open()", |
string("tcsetattr() for '") + fUrl.Path() + |
string("' failed: "), |
string("tcsetattr() for '") + fUrl.Path() + "' failed: ", |
errno); |
close(fd); |
return false; |
212,9 → 210,8
struct termios tios; |
if (tcgetattr(fd, &tios) != 0) { |
emsg.InitErrno("RlinkPortTerm::Open()", |
string("2nd tcgetattr() for '") + fUrl.Path() + |
string("' failed: "), |
errno); |
string("2nd tcgetattr() for '") + fUrl.Path() + |
"' failed: ", errno); |
close(fd); |
return false; |
} |
232,8 → 229,7
|
if (pmsg) { |
emsg.Init("RlinkPortTerm::Open()", |
string("tcsetattr() failed to set") + |
string(pmsg)); |
string("tcsetattr() failed to set") + string(pmsg)); |
close(fd); |
return false; |
} |
246,7 → 242,7
if (tcsendbreak(fd, 0) != 0) { |
emsg.InitErrno("RlinkPortTerm::Open()", |
string("tcsendbreak() for '") + fUrl.Path() + |
string("' failed: "), errno); |
"' failed: ", errno); |
Close(); |
return false; |
} |
/w11/trunk/tools/src/librlink/RlinkServer.ipp
1,4 → 1,4
// $Id: RlinkServer.ipp 495 2013-03-06 17:13:48Z mueller $ |
// $Id: RlinkServer.ipp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.0.1 fTraceLevel now uint32_t |
// 2013-03-06 495 1.0 Initial version |
// 2013-01-12 474 0.5 First draft |
// --------------------------------------------------------------------------- |
19,7 → 20,7
|
/*! |
\file |
\version $Id: RlinkServer.ipp 495 2013-03-06 17:13:48Z mueller $ |
\version $Id: RlinkServer.ipp 513 2013-05-01 14:02:06Z mueller $ |
\brief Implemenation (inline) of RlinkServer. |
*/ |
|
77,7 → 78,7
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
inline size_t RlinkServer::TraceLevel() const |
inline uint32_t RlinkServer::TraceLevel() const |
{ |
return fTraceLevel; |
} |
/w11/trunk/tools/src/librlink/RlinkPortCuff.cpp
1,4 → 1,4
// $Id: RlinkPortCuff.cpp 504 2013-04-13 15:37:24Z mueller $ |
// $Id: RlinkPortCuff.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2012-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
22,7 → 22,7
|
/*! |
\file |
\version $Id: RlinkPortCuff.cpp 504 2013-04-13 15:37:24Z mueller $ |
\version $Id: RlinkPortCuff.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of RlinkPortCuff. |
*/ |
|
126,10 → 126,10
char* env_pid = ::getenv("RETRO_FX2_PID"); |
if (env_vid && ::strlen(env_vid) == 4 && |
env_pid && ::strlen(env_pid) == 4) { |
fUrl.SetPath(string(env_vid) + string(":") + string(env_pid)); |
fUrl.SetPath(string(env_vid) + ":" + string(env_pid)); |
} else { |
emsg.Init("RlinkPortCuff::Open()", |
string("RETRO_FX2_VID/PID not or ill defined")); |
"RETRO_FX2_VID/PID not or ill defined"); |
Cleanup(); |
return false; |
} |
302,9 → 302,7
|
irc = ::pipe(pipefd); |
if (irc < 0) { |
emsg.InitErrno("RlinkPortCuff::OpenPipe()", |
string("pipe() failed: "), |
errno); |
emsg.InitErrno("RlinkPortCuff::OpenPipe()", "pipe() failed: ", errno); |
return false; |
} |
|
501,7 → 499,7
{ |
stringstream ss; |
ss << rc; |
throw Rexception(meth, string(text)+string(" failed with rc=")+ss.str(), |
throw Rexception(meth, string(text) + " failed with rc=" + ss.str(), |
errno); |
} |
|
512,8 → 510,8
{ |
stringstream ss; |
ss << rc; |
throw Rexception(meth, string(text)+string(" failed with rc=")+ss.str()+ |
string(" : ")+string(USBErrorName(rc))); |
throw Rexception(meth, string(text) + " failed with rc=" + ss.str() + |
" : " + string(USBErrorName(rc))); |
} |
|
//------------------------------------------+----------------------------------- |
/w11/trunk/tools/src/librtools/Rtools.cpp
1,4 → 1,4
// $Id: Rtools.cpp 493 2013-03-01 21:02:33Z mueller $ |
// $Id: Rtools.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-04 516 1.0.3 add CreateBackupFile() |
// 2013-02-13 481 1.0.2 remove Throw(Logic|Runtime)(); use Rexception |
// 2011-04-10 376 1.0.1 add ThrowLogic(), ThrowRuntime() |
// 2011-03-12 368 1.0 Initial version |
20,13 → 21,19
|
/*! |
\file |
\version $Id: Rtools.cpp 493 2013-03-01 21:02:33Z mueller $ |
\version $Id: Rtools.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of Rtools . |
*/ |
|
#include <stdlib.h> |
#include <stdio.h> |
#include <sys/types.h> |
#include <sys/stat.h> |
#include <unistd.h> |
|
#include "RerrMsg.hpp" |
#include <iostream> |
#include <vector> |
|
#include "Rexception.hpp" |
|
#include "Rtools.hpp" |
40,12 → 47,12
|
// all method definitions in namespace Retro |
namespace Retro { |
namespace Rtools { |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
std::string Rtools::Flags2String(uint32_t flags, const RflagName* fnam, |
char delim) |
std::string Flags2String(uint32_t flags, const RflagName* fnam, char delim) |
{ |
if (fnam == 0) |
throw Rexception("Rtools::Flags2String()","Bad args: fnam==NULL"); |
61,4 → 68,105
return rval; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
bool String2Long(const std::string& str, long& res, RerrMsg& emsg, int base) |
{ |
char* endptr; |
res = ::strtol(str.c_str(), &endptr, base); |
if (*endptr == 0) return true; |
|
emsg.Init("Rtools::String2Long", |
string("conversion error in '") + str +"'"); |
res = 0; |
return false; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
bool String2Long(const std::string& str, unsigned long& res, |
RerrMsg& emsg, int base) |
{ |
char* endptr; |
res = ::strtoul(str.c_str(), &endptr, base); |
if (*endptr == 0) return true; |
|
emsg.Init("Rtools::String2Long", |
string("conversion error in '") + str +"'"); |
res = 0; |
return false; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
bool CreateBackupFile(const std::string& fname, size_t nbackup, RerrMsg& emsg) |
{ |
if (nbackup == 0) return true; |
|
size_t dotpos = fname.find_last_of('.'); |
string fbase = fname.substr(0,dotpos); |
string fext = fname.substr(dotpos); |
|
if (nbackup > 99) { |
emsg.Init("Rtools::CreateBackupFile", |
"only up to 99 backup levels supported"); |
return false; |
} |
|
vector<string> fnames; |
fnames.push_back(fname); |
for (size_t i=1; i<=nbackup; i++) { |
char fnum[4]; |
snprintf(fnum, 4, "%d", i); |
fnames.push_back(fbase + "_" + fnum + fext); |
} |
|
for (size_t i=nbackup; i>0; i--) { |
string fnam_new = fnames[i]; |
string fnam_old = fnames[i-1]; |
|
struct stat sbuf; |
int irc = ::stat(fnam_old.c_str(), &sbuf); |
if (irc < 0) { |
if (errno == ENOENT) continue; |
emsg.InitErrno("Rtools::CreateBackupFile", |
string("stat() for '") + fnam_old + "'failed: ", errno); |
return false; |
} |
if (S_ISREG(sbuf.st_mode) == 0) { |
emsg.Init("Rtools::CreateBackupFile", |
"backups only supported for regular files"); |
return false; |
} |
// here we know old file exists and is a regular file |
irc = ::rename(fnam_old.c_str(), fnam_new.c_str()); |
if (irc < 0) { |
emsg.InitErrno("Rtools::CreateBackupFile", |
string("rename() for '") + fnam_old + "' -> '" + |
fnam_new + "'failed: ", errno); |
return false; |
} |
} |
|
return true; |
} |
|
//------------------------------------------+----------------------------------- |
//! FIXME_docs |
|
bool CreateBackupFile(const RparseUrl& purl, RerrMsg& emsg) |
{ |
string bck; |
if (!purl.FindOpt("app") && purl.FindOpt("bck", bck)) { |
unsigned long nbck; |
if (!Rtools::String2Long(bck, nbck, emsg)) return false; |
if (nbck > 0) { |
if (!Rtools::CreateBackupFile(purl.Path(), nbck, emsg)) return false; |
} |
} |
return true; |
} |
|
} // end namespace Rtools |
} // end namespace Retro |
/w11/trunk/tools/src/librtools/Rtools.hpp
1,4 → 1,4
// $Id: Rtools.hpp 486 2013-02-10 22:34:43Z mueller $ |
// $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-04 516 1.0.3 add CreateBackupFile(), String2Long() |
// 2013-02-13 481 1.0.2 remove ThrowLogic(), ThrowRuntime() |
// 2011-04-10 376 1.0.1 add ThrowLogic(), ThrowRuntime() |
// 2011-03-12 368 1.0 Initial version |
20,7 → 21,7
|
/*! |
\file |
\version $Id: Rtools.hpp 486 2013-02-10 22:34:43Z mueller $ |
\version $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Declaration of class Rtools . |
*/ |
|
30,6 → 31,9
#include <cstdint> |
#include <string> |
|
#include "RerrMsg.hpp" |
#include "RparseUrl.hpp" |
|
namespace Retro { |
|
struct RflagName { |
40,6 → 44,15
namespace Rtools { |
std::string Flags2String(uint32_t flags, const RflagName* fnam, |
char delim='|'); |
|
bool String2Long(const std::string& str, long& res, |
RerrMsg& emsg, int base=10); |
bool String2Long(const std::string& str, unsigned long& res, |
RerrMsg& emsg, int base=10); |
|
bool CreateBackupFile(const std::string& fname, size_t nbackup, |
RerrMsg& emsg); |
bool CreateBackupFile(const RparseUrl& purl, RerrMsg& emsg); |
}; |
|
} // end namespace Retro |
/w11/trunk/tools/src/librtools/RparseUrl.cpp
1,4 → 1,4
// $Id: RparseUrl.cpp 492 2013-02-24 22:14:47Z mueller $ |
// $Id: RparseUrl.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
19,7 → 19,7
|
/*! |
\file |
\version $Id: RparseUrl.cpp 492 2013-02-24 22:14:47Z mueller $ |
\version $Id: RparseUrl.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of RparseUrl. |
*/ |
|
97,8 → 97,7
if (c == '\\') { |
if (i+1 >= url.length()) { |
emsg.Init("RparseUrl::ParseUrl()", |
string("invalid trailing \\ in url '") + url + |
string("'")); |
string("invalid trailing \\ in url '") + url + "'"); |
return false; |
} |
i += 1; |
107,7 → 106,7
case ';' : c = ';'; break; |
default : emsg.Init("RparseUrl::ParseUrl()", |
string("invalid \\ escape in url '") + |
url + string("'")); |
url + "'"); |
return false; |
} |
} |
208,7 → 207,8
lkey += "|"; |
if (optlist.find(lkey) == string::npos) { |
emsg.Init("RparseUrl::AddOpt()", |
string("invalid field name '") + lkey + string("'")); |
string("invalid field name '") + lkey + "'; allowed: '" + |
optlist + "'"); |
return false; |
} |
|
/w11/trunk/tools/src/librlinktpp/RtclRlinkServer.cpp
1,4 → 1,4
// $Id: RtclRlinkServer.cpp 510 2013-04-26 16:14:57Z mueller $ |
// $Id: RtclRlinkServer.cpp 513 2013-05-01 14:02:06Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
13,6 → 13,7
// |
// Revision History: |
// Date Rev Version Comment |
// 2013-05-01 513 1.0.5 TraceLevel now uint32_t |
// 2013-04-26 510 1.0.4 change M_attn, now -info instead of -show |
// 2013-04-21 509 1.0.3 add server -resume |
// 2013-02-05 483 1.0.2 ClassCmdConfig: use RtclArgs |
22,7 → 23,7
|
/*! |
\file |
\version $Id: RtclRlinkServer.cpp 510 2013-04-26 16:14:57Z mueller $ |
\version $Id: RtclRlinkServer.cpp 513 2013-05-01 14:02:06Z mueller $ |
\brief Implemenation of class RtclRlinkServer. |
*/ |
|
125,10 → 126,10
if (!args.AllDone()) return kERR; |
args.SetResult(Obj().IsActive()); |
} else if (opt == "-trace") { // server -trace ... |
int level; |
uint32_t level; |
if (!args.GetArg("?level", level)) return kERR; |
if (args.NOptMiss()==0) { // server -trace level |
Obj().SetTraceLevel((size_t)level); |
Obj().SetTraceLevel(level); |
} else { // server -trace |
args.SetResult((int)Obj().TraceLevel()); |
} |
/w11/trunk/tools/src/librtcltools/RtclGetList.cpp
1,4 → 1,4
// $Id: RtclGetList.cpp 492 2013-02-24 22:14:47Z mueller $ |
// $Id: RtclGetList.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
18,7 → 18,7
|
/*! |
\file |
\version $Id: RtclGetList.cpp 492 2013-02-24 22:14:47Z mueller $ |
\version $Id: RtclGetList.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of class RtclGetList. |
*/ |
|
64,8 → 64,8
typedef std::pair<Retro::RtclGetList::map_it_t, bool> map_ins_t; |
map_ins_t ret = fMap.insert(map_val_t(name, pget)); |
if (ret.second == false) |
throw Rexception("RtclGetList::Add:", "Bad args: " + |
string("duplicate name: ") + name); |
throw Rexception("RtclGetList::Add:", |
string("Bad args: duplicate name: '") + name + "'"); |
return; |
} |
|
/w11/trunk/tools/src/librtcltools/RtclSetList.cpp
1,4 → 1,4
// $Id: RtclSetList.cpp 492 2013-02-24 22:14:47Z mueller $ |
// $Id: RtclSetList.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
18,7 → 18,7
|
/*! |
\file |
\version $Id: RtclSetList.cpp 492 2013-02-24 22:14:47Z mueller $ |
\version $Id: RtclSetList.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of class RtclSetList. |
*/ |
|
64,8 → 64,8
typedef std::pair<Retro::RtclSetList::map_it_t, bool> map_ins_t; |
map_ins_t ret = fMap.insert(map_val_t(name, pset)); |
if (ret.second == false) |
throw Rexception("RtclSetList::Add:", "Bad args: " + |
string("duplicate name: ") + name); |
throw Rexception("RtclSetList::Add:", |
string("Bad args: duplicate name: '") + name + "'"); |
return; |
} |
|
/w11/trunk/tools/src/librtcltools/RtclNameSet.cpp
1,4 → 1,4
// $Id: RtclNameSet.cpp 492 2013-02-24 22:14:47Z mueller $ |
// $Id: RtclNameSet.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
19,7 → 19,7
|
/*! |
\file |
\version $Id: RtclNameSet.cpp 492 2013-02-24 22:14:47Z mueller $ |
\version $Id: RtclNameSet.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of RtclNameSet. |
*/ |
|
64,7 → 64,7
if (ret.second == false) // or use !(ret.second) |
throw Rexception("RtclNameSet::<ctor>", "Bad args: " + |
string("duplicate name '") + name + |
string("' in set '") + nset + string("'")); |
"' in set '" + nset + "'"); |
} |
if (iend == string::npos) break; |
ibeg = iend+1; |
/w11/trunk/tools/src/librtcltools/RtclCmdBase.cpp
1,4 → 1,4
// $Id: RtclCmdBase.cpp 492 2013-02-24 22:14:47Z mueller $ |
// $Id: RtclCmdBase.cpp 516 2013-05-05 21:24:52Z mueller $ |
// |
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
// |
20,7 → 20,7
|
/*! |
\file |
\version $Id: RtclCmdBase.cpp 492 2013-02-24 22:14:47Z mueller $ |
\version $Id: RtclCmdBase.cpp 516 2013-05-05 21:24:52Z mueller $ |
\brief Implemenation of RtclCmdBase. |
*/ |
|
132,8 → 132,8
{ |
mmap_ins_t ret = fMapMeth.insert(mmap_val_t(name, methfo)); |
if (ret.second == false) // or use !(ret.second) |
throw Rexception("RtclCmdBase::AddMeth:", "Bad args: " + |
string("duplicate name: ") + name); |
throw Rexception("RtclCmdBase::AddMeth:", |
string("Bad args: duplicate name: '") + name + "'"); |
return; |
} |
|
/w11/trunk/tools/bin/pi_rri
File deleted
w11/trunk/tools/bin/pi_rri
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: w11/trunk/tools/bin/vbomconv
===================================================================
--- w11/trunk/tools/bin/vbomconv (revision 20)
+++ w11/trunk/tools/bin/vbomconv (revision 21)
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id: vbomconv 456 2012-02-05 22:19:44Z mueller $
+# $Id: vbomconv 518 2013-05-12 16:45:02Z mueller $
#
# Copyright 2007-2012 by Walter F.J. Mueller
#
@@ -251,7 +251,7 @@
# architecture of at nn( nn) + nn on nn;
if (-r "work-obj93.cf") {
- open (WFILE, "work-obj93.cf") or
+ open (WFILE, "work-obj93.cf") or
die "can't open for read work-obj93.cf: $!";
while () {
if (m{^file \. \"(.*?)\"}) {
/w11/trunk/tools/bin/telnet_wrapper
1,7 → 1,7
#!/usr/bin/perl -w |
# $Id: telnet_wrapper 314 2010-07-09 17:38:41Z mueller $ |
# $Id: telnet_wrapper 516 2013-05-05 21:24:52Z mueller $ |
# |
# Copyright 2009- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# Copyright 2009-2013 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 |
37,7 → 37,7
if ($rc != 0) { |
print STDERR "telnet failed with rc=$rc\n"; |
} |
print "enter q or <^D> to quit, otherwise reconnect: "; |
print "enter q or <^D> to quit, otherwise hit <ENTER> to reconnect: "; |
my $buf; |
my $nc = read STDIN, $buf, 1; |
if (not defined $nc) { |
/w11/trunk/tools/bin/ti_w11
0,0 → 1,232
#!/usr/bin/perl -w |
# $Id: ti_w11 516 2013-05-05 21:24:52Z mueller $ |
# |
# Revision History: |
# Date Rev Version Comment |
# 2013-05-05 516 1.1 renamed to ti_w11 |
# 2013-04-26 510 1.0 Initial version (derived from dorri) |
# |
|
use 5.005; # require Perl 5.005 or higher |
use strict; # require strict checking |
use FileHandle; |
|
sub print_usage; |
|
autoflush STDOUT 1; # autoflush, so noting lost on exec later |
|
my $sysbase = "$ENV{RETROBASE}/rtl/sys_gen/w11a"; |
|
my $opt_b; |
my $opt_io = ''; |
my $opt_f = ''; |
my $opt_tmu; |
my $tirri; |
my $val_term; |
my $val_tb_s3 = "tbw $sysbase/s3board/tb/tb_w11a_s3"; |
my $val_tb_n2 = "tbw $sysbase/nexys2/tb/tb_w11a_n2"; |
my $val_tb_n3 = "tbw $sysbase/nexys3/tb/tb_w11a_n3"; |
my $val_tb; |
my $val_e; |
|
my @arglist; |
|
# |
# process ti_w11 options |
# |
while (scalar(@ARGV)) { |
my $curarg = $ARGV[0]; |
|
if ($curarg =~ m{^-b$} ) { # -b |
$opt_b = 1; |
shift @ARGV; |
|
} elsif ($curarg =~ m{^-tmu$} ) { # -tmu |
$opt_tmu = 1; |
shift @ARGV; |
|
} elsif ($curarg =~ m{^-s3$} ) { # -s3 |
$opt_io = 'f'; |
$val_tb = $val_tb_s3; |
shift @ARGV; |
|
} elsif ($curarg =~ m{^-n2$} ) { # -n2 |
$opt_io = 'f'; |
$val_tb = $val_tb_n2; |
shift @ARGV; |
|
} elsif ($curarg =~ m{^-n3$} ) { # -n3 |
$opt_io = 'f'; |
$val_tb = $val_tb_n3; |
shift @ARGV; |
|
} elsif ($curarg =~ m{^-f(s\d?|u)$} ) { # -f[su] |
$opt_f = $1; |
shift @ARGV; |
|
} elsif ($curarg =~ m{^-t([su])(\d?),?} ) { # -t[su]... |
my $devnam = ($1 eq 's') ? '/dev/ttyS' : '/dev/ttyUSB'; |
my $devnum = $2; |
my ($dev,$baud,$opt1,$opt2) = split /,/,$curarg; |
$baud = '115k' unless defined $baud; |
|
if ($baud !~ m{^\d*k?$}) { |
print STDERR "ti_w11-E: invalid format of -ts or -tu option\n"; |
exit 1; |
} |
|
$opt_io = 't'; |
$val_term = sprintf '%s%d,%s', $devnam, $devnum, $baud; |
$val_term .= ",$opt1" if defined $opt1; |
$val_term .= ",$opt2" if defined $opt2; |
shift @ARGV; |
|
} elsif ($curarg =~ m{^-u$} ) { # -u |
$opt_io = 'u'; |
shift @ARGV; |
|
} elsif ($curarg =~ m{^-e$} ) { # -e <file> |
print STDERR "ti_w11-W: multiple -e options, only last taken\n" |
if defined $val_e; |
shift @ARGV; |
if (scalar(@ARGV) == 0 || $ARGV[0] =~ m{^-}) { |
print STDERR "ti_w11-E: no file name after -e option\n"; |
exit 1; |
} else { |
$val_e = shift @ARGV; |
if (not -r $val_e) { |
print STDERR "ti_w11-E: file '$val_e' not found\n"; |
exit 1; |
} |
} |
} else { |
last; |
} |
} |
|
# |
# check that either -s3/n2/n3 or -t or -u given |
# setup pi_rri options for either case |
# |
|
if ($opt_io eq 'f') { |
push @arglist, '--fifo'; |
push @arglist, "--run=$val_tb"; |
} elsif ($opt_io eq 't') { |
push @arglist, "--term=$val_term"; |
} elsif ($opt_io eq 'u') { |
push @arglist, '--cuff'; |
} else { |
print STDERR "ti_w11-E: neither -s3/-n2/-n3 nor -t or -u specified\n"; |
print_usage(); |
exit 1; |
} |
|
# |
# setup all other ti_rri options |
# |
|
push @arglist, '--logl=2'; |
push @arglist, '--int' unless $opt_b; |
push @arglist, '--pack=rw11'; |
push @arglist, '--'; |
|
# |
# actions prior to first exec |
# setup tmu ect |
# setup access path --> handle -f options |
# |
if ($opt_io eq 'f') { |
if ($opt_tmu) { |
push @arglist, 'rlc oob -sbcntl 13 1'; |
} |
if ($opt_f eq 'u') { |
push @arglist, 'rlc oob -sbdata 8 0x2'; |
push @arglist, 'rlc oob -sbdata 16 0x4'; |
} |
|
} |
|
# |
# initialize w11 cpu system |
# |
push @arglist, 'rw11::setup_sys'; |
|
# |
# handle -e option |
# |
|
if (defined $val_e) { |
if ($val_e =~ m/\.mac$/) { |
push @arglist, "cpu0 ldasm -file $val_e -sym ldasm_sym -lst ldasm_lst"; |
} else { |
push @arglist, "cpu0 ldabs $val_e"; |
} |
push @arglist, 'rw11::cpumon'; |
push @arglist, 'rw11::cpucons'; |
push @arglist, 'cpu0 cp -stapc 0200'; |
} |
|
# |
# all remaining commands |
# |
|
while (scalar(@ARGV)) { |
my $curarg = shift @ARGV; |
if ($curarg =~ m{^@(.*)$} && ! -r $1) { |
print STDERR "ti_w11-E: file '$1' not found\n"; |
exit 1; |
} |
push @arglist,$curarg; |
} |
|
# |
# find ti_rri executable |
# |
|
$tirri=`which ti_rri`; |
chomp $tirri; |
if ($tirri eq '' || ! -e $tirri) { |
print STDERR "ti_w11-E: failed to locate ti_rri\n"; |
exit 1; |
} |
|
# |
# print command file |
# |
if (1) { |
print 'ti_rri ', join (' ', map {(m{\s}) ? "\"$_\"" : $_} @arglist) , "\n"; |
} |
|
# |
# and do it |
# |
exec $tirri, @arglist |
or die "failed to exec: $!"; |
|
exit 1; |
|
# ---------------------------------------------------------------------------- |
sub print_usage { |
print "usage: ti_w11 <setup options> <ti_rri opts and cmds>...\n"; |
print " setup options for ghdl simulation runs:\n"; |
print " -s3 start tb_w11a_s3 simulation\n"; |
print " -n2 start tb_w11a_n2 simulation\n"; |
print " -n3 start tb_w11a_n3 simulation\n"; |
print " -f.. simulation communication options\n"; |
print " -fu use cuff data path\n"; |
print " -tmu activate trace and monitoring unit\n"; |
print " setup options for FPGA connects:\n"; |
print " -u use --cuff connect\n"; |
print " -t.. use --term connect\n"; |
print " -ts*[,opts] use /dev/ttyS* (* is device number)\n"; |
print " -tu*[,opts] use /dev/ttyUSB* (* is device number)\n"; |
print " opts can be ',break', ',xon'\n"; |
print " common options:\n"; |
print " -e <file> 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"; |
print "\n"; |
print " either one of -s3,-n2, or -n3 must be given -> sim run\n"; |
print " or one of -t or -u must be given -> fpga run\n"; |
} |
w11/trunk/tools/bin/ti_w11
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: w11/trunk/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl
===================================================================
--- w11/trunk/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl (nonexistent)
+++ w11/trunk/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl (revision 21)
@@ -0,0 +1,25 @@
+# $Id: rt11-40_rk_boot.tcl 517 2013-05-09 21:34:45Z mueller $
+#
+# Setup file for RT-11 V4.0 RK05 based system
+#
+# Usage:
+#
+# telnet_starter -d DL0 &
+# ti_w11 -xxx @rt11-40_rk_boot.tcl ( -xxx depends on sim or fpga connect)
+#
+
+# setup w11 cpu
+puts [rlw]
+
+# setup tt,lp,pp (single console; enable rx rate limiter on old DEC OS)
+rw11::setup_tt "cpu0" {ndl 1 dlrlim 5}
+rw11::setup_lp
+rw11::setup_pp
+
+# mount disks
+cpu0rka0 att rtv4_rk.dsk
+
+# and boot
+rw11::cpumon
+rw11::cpucons
+cpu0 boot rka0
Index: w11/trunk/tools/oskit/rt11-40_rk/README_rt11-40_rkset.txt
===================================================================
--- w11/trunk/tools/oskit/rt11-40_rk/README_rt11-40_rkset.txt (nonexistent)
+++ w11/trunk/tools/oskit/rt11-40_rk/README_rt11-40_rkset.txt (revision 21)
@@ -0,0 +1,61 @@
+# $Id: $
+
+Notes on oskit: RT-11 V4.0 system on RK05 volumes
+
+ Table of content:
+
+ 1. General remarks
+ 2. Installation
+ 3. Usage
+
+1. General remarks ---------------------------------------------------
+
+ See notes, especially on legal terms, in $RETROBASE/doc/w11a_os_guide.txt
+
+ Also read README_license.txt !!
+
+2. Installation ------------------------------------------------------
+
+ - A disk set is available from
+ http://www.retro11.de/data/oc_w11/rsx11m-31_rkset.tgz
+ Download, unpack and copy the disk images (*.dsk), e.g.
+
+ cd $RETROBASE/tools/oskit/rt11-40_rk
+ wget http://www.retro11.de/data/oc_w11/rt11-40_rkset.tgz
+ tar -xzf rt11-40_rkset.tgz
+
+3. Usage -------------------------------------------------------------
+
+ - Start them in simulator
+ pdp11 rt11-40_rk_boot.scmd
+ or ONLY IF YOU HAVE A VALID LICENSE on w11a
+ ti_w11 -u @rt11-40_rk_boot.tcl
+
+ - Hit in the xterm window to connect to simh or backend server.
+ The boot dialog in the console xterm window will look like
+ (required input is in {..}, with {} denoting a carriage return:
+
+ RT-11SJ V04.00C
+
+ .D 56=5015
+
+ .TYPE V4USER.TXT
+ Welcome to RT-11 Version 4. RT-11 V04 provides new hardware support
+ and some major enhancements over Version 3B.
+
+ Please use the HELP command; it describes the new options in many
+ of the utilities.
+
+ If you are using a terminal that requires fill characters,
+ modify location 56 with a Deposit command before proceeding with
+ system installation. LA36 DECwriter II and VT52 DECscope terminals
+ do NOT require such modification.
+
+ .D 56=0
+
+ .
+
+ Now you are at the RT-11 prompt and can exercise the system.
+
+ There is no 'halt' or 'shutdown' command, just terminate the
+ simulator or backend server session.
Index: w11/trunk/tools/oskit/rt11-40_rk/rt11-40_rk_boot.scmd
===================================================================
--- w11/trunk/tools/oskit/rt11-40_rk/rt11-40_rk_boot.scmd (nonexistent)
+++ w11/trunk/tools/oskit/rt11-40_rk/rt11-40_rk_boot.scmd (revision 21)
@@ -0,0 +1,13 @@
+; $Id: rt11-40_rk_boot.scmd 517 2013-05-09 21:34:45Z mueller $
+;
+; Setup file for RT-11 V4.0 RK05 based system
+;
+; Usage:
+;
+; pdp11 rt11-40_rk_boot.scmd
+;
+do ../../simh/setup_w11a_min.scmd
+;
+att rk0 rtv4_rk.dsk
+;
+boo rk0
Index: w11/trunk/tools/oskit/rt11-40_rk/.cvsignore
===================================================================
--- w11/trunk/tools/oskit/rt11-40_rk/.cvsignore (nonexistent)
+++ w11/trunk/tools/oskit/rt11-40_rk/.cvsignore (revision 21)
@@ -0,0 +1,4 @@
+*.dat
+*.dsk
+*.log
+*license.txt
Index: w11/trunk/tools/oskit/rt11-40_rk
===================================================================
--- w11/trunk/tools/oskit/rt11-40_rk (nonexistent)
+++ w11/trunk/tools/oskit/rt11-40_rk (revision 21)
w11/trunk/tools/oskit/rt11-40_rk
Property changes :
Added: svn:ignore
## -0,0 +1,36 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
+*.dat
+*.dsk
+*.log
+*license.txt
Index: w11/trunk/tools/oskit/unix-v5_rk/uv5_rk_boot.tcl
===================================================================
--- w11/trunk/tools/oskit/unix-v5_rk/uv5_rk_boot.tcl (nonexistent)
+++ w11/trunk/tools/oskit/unix-v5_rk/uv5_rk_boot.tcl (revision 21)
@@ -0,0 +1,23 @@
+# $Id: uv5_rk_boot.tcl 517 2013-05-09 21:34:45Z mueller $
+#
+# Setup file for Unix V5 RK05 based system
+#
+# Usage:
+#
+# telnet_starter -d DL0 &
+# ti_w11 -xxx @uv5_boot.tcl ( -xxx depends on sim or fpga connect)
+
+# setup w11 cpu
+puts [rlw]
+
+# setup tt,lp (uses only 1 console; uses parity -> use 7 bit mode)
+rw11::setup_tt "cpu0" {ndl 1 to7bit 1}
+rw11::setup_lp
+
+# mount disks
+cpu0rka0 att unix_v5_rk.dsk
+
+# and boot
+rw11::cpumon
+rw11::cpucons
+cpu0 boot rka0
Index: w11/trunk/tools/oskit/unix-v5_rk/README_unix_v5_rkset.txt
===================================================================
--- w11/trunk/tools/oskit/unix-v5_rk/README_unix_v5_rkset.txt (nonexistent)
+++ w11/trunk/tools/oskit/unix-v5_rk/README_unix_v5_rkset.txt (revision 21)
@@ -0,0 +1,64 @@
+# $Id: README_unix_v5_rkset.txt 518 2013-05-12 16:45:02Z mueller $
+
+Notes on oskit: Unix V5 system on RK05 volumes
+
+ Table of content:
+
+ 1. General remarks
+ 2. Installation
+ 3. Usage
+
+1. General remarks ---------------------------------------------------
+
+ See notes on
+
+ 1. I/O emulation setup
+ 2. FPGA Board setup
+ 3. Rlink and Backend Server setup
+ 4. Legal terms
+
+ in $RETROBASE/doc/w11a_os_guide.txt
+
+2. Installation ------------------------------------------------------
+
+ - A disk set is available from
+ http://www.retro11.de/data/oc_w11/unix_v5_rkset.tgz
+ Download, unpack and copy the disk images (*.dsk), e.g.
+
+ cd $RETROBASE/tools/oskit/unix-v5_rk
+ wget http://www.retro11.de/data/oc_w11/unix_v5_rkset.tgz
+ tar -xzf unix_v5_rkset.tgz
+
+3. Usage -------------------------------------------------------------
+
+ - Start backend server and boot system (see section 3 in w11a_os_guide.txt)
+ boot script: uv5_rk_boot.tcl
+ example: ti_w11 -u @uv5_rk_boot.tcl
+
+ - Hit in the xterm window to connect to backend server.
+ The boot dialog in the console xterm window will look like
+ (required input is in {..}, with {} denoting a carriage return:
+
+ @{unix}
+
+ login: {root}
+
+ Now you are at the shell prompt and can exercise the system, e.g.
+
+ # {ls -al}
+ total 62
+ drwxr-xr-x 9 bin 160 Jan 29 16:14 .
+ drwxr-xr-x 9 bin 160 Jan 29 16:14 ..
+ drwxr-xr-x 2 bin 944 Nov 26 18:13 bin
+ drwxr-xr-x 2 bin 80 Nov 26 18:13 dev
+ drwxr-xr-x 2 bin 240 Mar 21 12:07 etc
+ drwxr-xr-x 2 bin 224 Nov 26 18:13 lib
+ drwxr-xr-x 2 bin 32 Nov 26 18:13 mnt
+ drwxrwxrwx 2 bin 32 Nov 26 18:13 tmp
+ -rwxrwxrwx 1 bin 25802 Mar 21 12:07 unix
+ drwxr-xr-x 14 bin 224 Nov 26 18:13 usr
+
+ There is no 'halt' or 'shutdown' command, just terminate the server
+ session with a
+ tirri_exit
+ command. The disks aren't cached, so no need to sync either.
Index: w11/trunk/tools/oskit/unix-v5_rk/uv5_rk_boot.scmd
===================================================================
--- w11/trunk/tools/oskit/unix-v5_rk/uv5_rk_boot.scmd (nonexistent)
+++ w11/trunk/tools/oskit/unix-v5_rk/uv5_rk_boot.scmd (revision 21)
@@ -0,0 +1,15 @@
+; $Id: uv5_rk_boot.scmd 517 2013-05-09 21:34:45Z mueller $
+;
+; Setup file for Unix V5 RK05 based system
+;
+; Usage:
+;
+; pdp11 uv5_rk_boot.scmd
+;
+do ../../simh/setup_w11a_min.scmd
+set tto 7b
+set dlo0 7b
+;
+att rk0 unix_v5_rk.dsk
+;
+boo rk0
Index: w11/trunk/tools/oskit/unix-v5_rk/.cvsignore
===================================================================
--- w11/trunk/tools/oskit/unix-v5_rk/.cvsignore (nonexistent)
+++ w11/trunk/tools/oskit/unix-v5_rk/.cvsignore (revision 21)
@@ -0,0 +1,5 @@
+*.dat
+*.dsk
+*.log
+*license.txt
+*license.pdf
Index: w11/trunk/tools/oskit/unix-v5_rk
===================================================================
--- w11/trunk/tools/oskit/unix-v5_rk (nonexistent)
+++ w11/trunk/tools/oskit/unix-v5_rk (revision 21)
w11/trunk/tools/oskit/unix-v5_rk
Property changes :
Added: svn:ignore
## -0,0 +1,37 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
+*.dat
+*.dsk
+*.log
+*license.txt
+*license.pdf
Index: w11/trunk/tools/oskit/211bsd_rk/README_211bsd_rkset.txt
===================================================================
--- w11/trunk/tools/oskit/211bsd_rk/README_211bsd_rkset.txt (nonexistent)
+++ w11/trunk/tools/oskit/211bsd_rk/README_211bsd_rkset.txt (revision 21)
@@ -0,0 +1,123 @@
+# $Id: README_211bsd_rkset.txt 518 2013-05-12 16:45:02Z mueller $
+
+Notes on oskit: 2.11BSD system on RK05 volumes
+
+ Table of content:
+
+ 1. General remarks
+ 2. Installation
+ 3. Usage
+
+1. General remarks ---------------------------------------------------
+
+ See notes on
+
+ 1. I/O emulation setup
+ 2. FPGA Board setup
+ 3. Rlink and Backend Server setup
+ 4. Legal terms
+
+ in $RETROBASE/doc/w11a_os_guide.txt
+
+2. Installation ------------------------------------------------------
+
+ - A disk set is available from
+ http://www.retro11.de/data/oc_w11/211bsd_rkset.tgz
+ Download, unpack and copy the disk images (*.dsk), e.g.
+
+ cd $RETROBASE/tools/oskit/211bsd_rk/
+ wget http://www.retro11.de/data/oc_w11/211bsd_rkset.tgz
+ tar -xzf 211bsd_rkset.tgz
+
+3. Usage -------------------------------------------------------------
+
+ - Start backend server and boot system (see section 3 in w11a_os_guide.txt)
+ boot script: 211bsd_rk_boot.tcl
+ example: ti_w11 -u @211bsd_rk_boot.tcl
+
+ - Hit in the xterm window to connnect to backend server.
+ The boot dialog in the console xterm window will look like
+ (required input is in {..}, with {} denoting a carriage return:
+
+ 70Boot from rk(0,0,0) at 0177404
+ : {}
+ : rk(0,0,0)unix
+ Boot: bootdev=03000 bootcsr=0177404
+
+ 2.11 BSD UNIX #26: Thu Jan 1 19:49:13 PST 2009
+ root@curly.2bsd.com:/usr/src/sys/RETRONFPRK
+
+ phys mem = 3932160
+ avail mem = 3577856
+ user mem = 307200
+
+ January 4 16:45:33 init: configure system
+
+ dz ? csr 160100 vector 310 skipped: No CSR.
+ lp 0 csr 177514 vector 200 attached
+ rk ? csr 177400 vector 220 didn't interrupt.
+ rl ? csr 174400 vector 160 skipped: No CSR.
+ tm ? csr 172520 vector 224 skipped: No CSR.
+ xp ? csr 176700 vector 254 skipped: No CSR.
+ cn 1 csr 176500 vector 300 attached
+ erase, kill ^U, intr ^C
+
+ In first '#' prompt the system is in single-user mode. Just enter a ^D
+ to continue the system startup to multi-user mode:
+
+ #^D
+ checking quotas: done.
+ Assuming non-networking system ...
+ checking for core dump...
+ preserving editor files
+ clearing /tmp
+ standard daemons: update cron accounting.
+ starting lpd
+ starting local daemons:Sun Jan 4 16:46:37 PST 2009
+ January 4 16:46:37 init: kernel security level changed from 0 to 1
+ January 4 16:46:40 getty: /dev/tty01: Device not configured
+ ...
+
+ 2.11 BSD UNIX (curly.2bsd.com) (console)
+
+ login:
+
+ The login prompt is sometimes mangled with the 'Device not configured'
+ system messages, if its not visible just hit to get a fresh one.
+
+ login: {root}
+ erase, kill ^U, intr ^C
+
+ Now the system is in multi-user mode, daemons runnng. You can explore
+ the system, e.g. with a 'pstat -T' or a 'mount' command. The second
+ xterm can be activated too, it will connect to a second emulated DL11.
+ At the end is important to shutdown properly with a 'halt':
+
+ # {pstat -T}
+ 7/186 files
+ 39/208 inodes
+ 11/150 processes
+ 6/ 46 texts active, 28 used
+ 2/135 swapmap entries, 366 kB used, 2069 kB free, 2063 kB max
+ 33/150 coremap entries, 2960 kB free, 2867 kB max
+ 1/ 10 ub_map entries, 10 free, 10 max
+ # {mount}
+ /dev/rk0h on /
+ /dev/rk2h on /tmp
+ /dev/rk3h on /bin
+ /dev/rk4h on /usr
+ # {halt}
+ syncing disks... done
+ halting
+
+ While the system was running the server process display the
+ cpumon>
+ prompt. When the w11 has halted after 211bsd shutdown a message like
+
+ CPU down attention
+ Processor registers and status:
+ PS: 030350 cm,pm=k,u s,p,t=0,7,0 NZVC=1000 rust: 01 HALTed
+ R0: 177560 R1: 161322 R2: 053436 R3: 000010
+ R4: 003000 R5: 147510 SP: 147466 PC: 000014
+
+ will be visible. Now the server process can be stopped with ^D.
Index: w11/trunk/tools/oskit/211bsd_rk/211bsd_rk_boot.scmd
===================================================================
--- w11/trunk/tools/oskit/211bsd_rk/211bsd_rk_boot.scmd (nonexistent)
+++ w11/trunk/tools/oskit/211bsd_rk/211bsd_rk_boot.scmd (revision 21)
@@ -0,0 +1,19 @@
+; $Id: 211bsd_rk_boot.scmd 517 2013-05-09 21:34:45Z mueller $
+;
+; Setup file for 211bsd RK based system
+;
+; Usage:
+;
+; pdp11 211bsd_rk_boot.scmd
+;
+do ../../simh/setup_w11a_max.scmd
+set tto 7b
+set dlo0 7b
+;
+att rk0 211bsd_rk_root.dsk
+att rk1 211bsd_rk_swap.dsk
+att rk2 211bsd_rk_tmp.dsk
+att rk3 211bsd_rk_bin.dsk
+att rk4 211bsd_rk_usr.dsk
+;
+boo rk0
Index: w11/trunk/tools/oskit/211bsd_rk/211bsd_rk_boot.tcl
===================================================================
--- w11/trunk/tools/oskit/211bsd_rk/211bsd_rk_boot.tcl (nonexistent)
+++ w11/trunk/tools/oskit/211bsd_rk/211bsd_rk_boot.tcl (revision 21)
@@ -0,0 +1,29 @@
+# $Id: 211bsd_rk_boot.tcl 517 2013-05-09 21:34:45Z mueller $
+#
+# Setup file for 211bsd RK05 based system
+#
+# Usage:
+#
+# telnet_starter -d DL0 &
+# telnet_starter -d DL1 &
+# ti_w11 -xxx @211bsd_rk_boot.tcl ( -xxx depends on sim or fpga connect)
+#
+
+# setup w11 cpu
+puts [rlw]
+
+# setup tt,lp (211bsd uses parity -> use 7 bit mode)
+rw11::setup_tt "cpu0" {to7bit 1}
+rw11::setup_lp
+
+# mount disks
+cpu0rka0 att 211bsd_rk_root.dsk
+cpu0rka1 att 211bsd_rk_swap.dsk
+cpu0rka2 att 211bsd_rk_tmp.dsk
+cpu0rka3 att 211bsd_rk_bin.dsk
+cpu0rka4 att 211bsd_rk_usr.dsk
+
+# and boot
+rw11::cpumon
+rw11::cpucons
+cpu0 boot rka0
Index: w11/trunk/tools/oskit/211bsd_rk/.cvsignore
===================================================================
--- w11/trunk/tools/oskit/211bsd_rk/.cvsignore (nonexistent)
+++ w11/trunk/tools/oskit/211bsd_rk/.cvsignore (revision 21)
@@ -0,0 +1,5 @@
+*.dat
+*.dsk
+*.log
+*license.txt
+*license.pdf
Index: w11/trunk/tools/oskit/211bsd_rk
===================================================================
--- w11/trunk/tools/oskit/211bsd_rk (nonexistent)
+++ w11/trunk/tools/oskit/211bsd_rk (revision 21)
w11/trunk/tools/oskit/211bsd_rk
Property changes :
Added: svn:ignore
## -0,0 +1,37 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
+*.dat
+*.dsk
+*.log
+*license.txt
+*license.pdf
Index: w11/trunk/tools/oskit/rsx11m-31_rk/README_rsx11m-31_rkset.txt
===================================================================
--- w11/trunk/tools/oskit/rsx11m-31_rk/README_rsx11m-31_rkset.txt (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-31_rk/README_rsx11m-31_rkset.txt (revision 21)
@@ -0,0 +1,93 @@
+# $Id: README_rsx11m-31_rkset.txt 518 2013-05-12 16:45:02Z mueller $
+
+Notes on oskit: RSX-11M V3.1 system on RK05 volumes
+
+ Table of content:
+
+ 1. General remarks
+ 2. Installation
+ 3. Usage
+
+1. General remarks ---------------------------------------------------
+
+ See notes, especially on legal terms, in $RETROBASE/doc/w11a_os_guide.txt
+
+ Also read README_license.txt !!
+
+2. Installation ------------------------------------------------------
+
+ - A disk set is available from
+ http://www.retro11.de/data/oc_w11/rsx11m-31_rkset.tgz
+ Download, unpack and copy the disk images (*.dsk), e.g.
+
+ cd $RETROBASE/tools/oskit/rsx11m-31_rk
+ wget http://www.retro11.de/data/oc_w11/rsx11m-31_rkset.tgz
+ tar -xzf rsx11m-31_rkset.tgz
+
+3. Usage -------------------------------------------------------------
+
+ - Start them in simulator
+ pdp11 rsx11m-31_rk_boot.scmd
+ or ONLY IF YOU HAVE A VALID LICENSE on w11a
+ ti_w11 -u @rsx11m-31_rk_boot.tcl
+
+ - Hit in the xterm window to connect to simh or backend server.
+ The boot dialog in the console xterm window will look like
+ (required input is in {..}, with {} denoting a carriage return:
+
+ RSX-11M V3.1 BL22 65408K MAPPED
+ >RED DK0:=SY0:
+ >RED DK0:=LB0:
+ >MOU DK0:SYSTEM0
+ >@[1,2]STARTUP
+
+ That RSX shows '65408K' is a bug in V3.1. It should be 1920K' the
+ size of accessible memory in words. For configurations with 1 MByte
+ and below the correct value is displayed, above a wrong one.
+
+ This os version was released in December 1977, so it's no suprise
+ that it is not y2k ready. So enter a date before prior to 2000.
+
+ >* PLEASE ENTER TIME AND DATE (HR:MN DD-MMM-YY) [S]: {<.. see above ..>}
+ >TIM 17:18 12-may-83
+ >;
+ >RUN ERRLOG
+ >
+ ;ERL -- ERROR LOG INITIALIZED
+ >MOU DK1:SYSTEM1
+ >;
+ >INS DK1:[1,54]BIGMAC/PAR=GEN
+ >INS DK1:[1,54]BIGTKB/PAR=GEN
+ >INS DK1:[1,54]CDA
+ >INS DK1:[1,54]DSC/PAR=GEN
+ >INS DK1:[1,54]EDT/PAR=GEN
+ >INS DK1:[1,54]FLX
+ >INS DK1:[1,54]FOR
+ >INS DK1:[1,54]FTB
+ >INS DK1:[1,54]LBR
+ >INS DK1:[1,54]PSE
+ >INS DK1:[1,54]RNO
+ >INS DK1:[1,54]SRD
+ >INS DK1:[1,54]SYE
+ >;
+ >INS DK1:[1,54]TEC
+ >INS DK1:[1,54]TEC/TASK=...MAK
+ >INS DK1:[1,54]TEC/TASK=...MUN
+ >;
+ >INS DK1:[1,54]VTEC
+ >;
+ >;
+ >SET /UIC=[1,6]
+ >PSE =
+ >SET /UIC=[200,200]
+ >;
+ >ACS DK1:/BLKS=512.
+ >;
+ >@
+ >
+
+ Now you are at the MCR prompt and can exercise the system.
+
+ At the end is important to shutdown properly with a 'run $shutup'.
+ The simululaor (or the rlink backend) can be stopped when the
+ CPU has halted.
Index: w11/trunk/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.scmd
===================================================================
--- w11/trunk/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.scmd (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.scmd (revision 21)
@@ -0,0 +1,15 @@
+; $Id: rsx11m-31_rk_boot.scmd 517 2013-05-09 21:34:45Z mueller $
+;
+; Setup file for RSX11-M V3.1 RK05 based system
+;
+; Usage:
+;
+; pdp11 rsx11m-31_rk_boot.scmd
+;
+do ../../simh/setup_w11a_max.scmd
+;
+att rk0 RSX11M_V3.1_SYSTEM0.dsk
+att rk1 RSX11M_V3.1_SYSTEM1.dsk
+att rk2 RSX11M_USER.dsk
+;
+boo rk0
Index: w11/trunk/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl
===================================================================
--- w11/trunk/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl (revision 21)
@@ -0,0 +1,28 @@
+# $Id: rsx11m-31_rk_boot.tcl 517 2013-05-09 21:34:45Z mueller $
+#
+# Setup file for RSX11-M V3.1 RK05 based system
+#
+# Usage:
+#
+# telnet_starter -d DL0 &
+# telnet_starter -d DL1 &
+# ti_w11 -xxx @rsx11m-31_rk_boot.tcl ( -xxx depends on sim or fpga connect)
+#
+
+# setup w11 cpu
+puts [rlw]
+
+# setup tt,lp,pp (enable rx rate limiter on old DEC OS)
+rw11::setup_tt "cpu0" {dlrlim 5}
+rw11::setup_lp
+rw11::setup_pp
+
+# mount disks
+cpu0rka0 att RSX11M_V3.1_SYSTEM0.dsk
+cpu0rka1 att RSX11M_V3.1_SYSTEM1.dsk
+cpu0rka2 att RSX11M_USER.dsk
+
+# and boot
+rw11::cpumon
+rw11::cpucons
+cpu0 boot rka0
Index: w11/trunk/tools/oskit/rsx11m-31_rk/.cvsignore
===================================================================
--- w11/trunk/tools/oskit/rsx11m-31_rk/.cvsignore (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-31_rk/.cvsignore (revision 21)
@@ -0,0 +1,4 @@
+*.dat
+*.dsk
+*.log
+*license.txt
Index: w11/trunk/tools/oskit/rsx11m-31_rk
===================================================================
--- w11/trunk/tools/oskit/rsx11m-31_rk (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-31_rk (revision 21)
w11/trunk/tools/oskit/rsx11m-31_rk
Property changes :
Added: svn:ignore
## -0,0 +1,36 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
+*.dat
+*.dsk
+*.log
+*license.txt
Index: w11/trunk/tools/oskit/rsx11m-40_rk/README_rsx11m-40_rkset.txt
===================================================================
--- w11/trunk/tools/oskit/rsx11m-40_rk/README_rsx11m-40_rkset.txt (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-40_rk/README_rsx11m-40_rkset.txt (revision 21)
@@ -0,0 +1,83 @@
+# $Id: README_rsx11m-40_rkset.txt 518 2013-05-12 16:45:02Z mueller $
+
+Notes on oskit: RSX-11M V4.0 system on RK05 volumes
+
+ Table of content:
+
+ 1. General remarks
+ 2. Installation
+ 3. Usage
+
+1. General remarks ---------------------------------------------------
+
+ See notes, especially on legal terms, in $RETROBASE/doc/w11a_os_guide.txt
+
+ Also read README_license.txt !!
+
+2. Installation ------------------------------------------------------
+
+ - A disk set is available from
+ http://www.retro11.de/data/oc_w11/rsx11m-40_rkset.tgz
+ Download, unpack and copy the disk images (*.dsk), e.g.
+
+ cd $RETROBASE/tools/oskit/rsx11m-40_rk
+ wget http://www.retro11.de/data/oc_w11/rsx11m-40_rkset.tgz
+ tar -xzf rsx11m-40_rkset.tgz
+
+3. Usage -------------------------------------------------------------
+
+ - Start them in simulator
+ pdp11 rsx11m-40_rk_boot.scmd
+ or ONLY IF YOU HAVE A VALID LICENSE on w11a
+ ti_w11 -u @rsx11m-40_rk_boot.tcl
+
+ - Hit in the xterm window to connect to simh or backend server.
+ The boot dialog in the console xterm window will look like
+ (required input is in {..}, with {} denoting a carriage return:
+
+ RSX-11M V4.0 BL32 1920.K MAPPED
+ >RED DK:=SY:
+ >RED DK:=LB:
+ >MOU DK:SYSM40RKV0
+ >@DK:[1,2]STARTUP
+
+ This os version was released in November 1981, so it's no suprise
+ that it is not y2k ready. So enter a date before prior to 2000.
+
+ >* PLEASE ENTER TIME AND DATE (HR:MN DD-MMM-YY) [S]: {<.. see above ..>}
+ >TIM 18:17 12-may-83
+ >* ENTER LINE WIDTH OF THIS TERMINAL [D D:132.]: {}
+ >SET /BUF=TI:132.
+ >ACS SY:/BLKS=512.
+ >CLI /INIT=DCL/TASK=...DCL
+ >;
+ >; mount 2nd system disk
+ >;
+ >mou dk1:SYSM40RKV1/pub
+ >;
+ >; installing tasks from 2nd system disk
+ >;
+ >INS DK1:$BRU
+ >INS DK1:$DMP
+ >INS DK1:$DSC
+ >INS DK1:$EDT
+ >INS DK1:$FLX
+ >INS DK1:$K11RSX/TASK=...KER
+ >INS DK1:$LBR
+ >INS DK1:$MAC
+ >INS DK1:$RMD
+ >INS DK1:$SLP
+ >INS DK1:$SRD
+ >INS DK1:$TEC
+ >INS DK1:$TEC/TASK=...MAK
+ >INS DK1:$TKB
+ >INS DK1:$VFY
+ >INS DK1:$VTEC
+ >@
+ >
+
+ Now you are at the MCR prompt and can exercise the system.
+
+ At end is important to shutdown properly with a 'run $shutup'.
+ The simululaor (or the rlink backend) can be stopped when the
+ CPU has halted.
Index: w11/trunk/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.scmd
===================================================================
--- w11/trunk/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.scmd (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.scmd (revision 21)
@@ -0,0 +1,15 @@
+; $Id: $
+;
+; Setup file for RSX11-M V4.0 RK05 based system
+;
+; Usage:
+;
+; pdp11 rsx11m-40_rk_boot.scmd
+;
+do ../../simh/setup_w11a_max.scmd
+;
+att rk0 RSX11M_V4.0_SYSTEM0.dsk
+att rk1 RSX11M_V4.0_SYSTEM1.dsk
+att rk2 RSX11M_USER.dsk
+;
+boo rk0
Index: w11/trunk/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl
===================================================================
--- w11/trunk/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl (revision 21)
@@ -0,0 +1,28 @@
+# $Id: $
+#
+# Setup file for RSX11-M V4.0 RK05 based system
+#
+# Usage:
+#
+# telnet_starter -d DL0 &
+# telnet_starter -d DL1 &
+# ti_w11 -xxx @rsx11m-40_rk_boot.tcl ( -xxx depends on sim or fpga connect)
+#
+
+# setup w11 cpu
+puts [rlw]
+
+# setup tt,lp,pp (enable rx rate limiter on old DEC OS)
+rw11::setup_tt "cpu0" {dlrlim 5}
+rw11::setup_lp
+rw11::setup_pp
+
+# mount disks
+cpu0rka0 att RSX11M_V4.0_SYSTEM0.dsk
+cpu0rka1 att RSX11M_V4.0_SYSTEM1.dsk
+cpu0rka2 att RSX11M_USER.dsk
+
+# and boot
+rw11::cpumon
+rw11::cpucons
+cpu0 boot rka0
Index: w11/trunk/tools/oskit/rsx11m-40_rk/.cvsignore
===================================================================
--- w11/trunk/tools/oskit/rsx11m-40_rk/.cvsignore (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-40_rk/.cvsignore (revision 21)
@@ -0,0 +1,4 @@
+*.dat
+*.dsk
+*.log
+*license.txt
Index: w11/trunk/tools/oskit/rsx11m-40_rk
===================================================================
--- w11/trunk/tools/oskit/rsx11m-40_rk (nonexistent)
+++ w11/trunk/tools/oskit/rsx11m-40_rk (revision 21)
w11/trunk/tools/oskit/rsx11m-40_rk
Property changes :
Added: svn:ignore
## -0,0 +1,36 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
+*.dat
+*.dsk
+*.log
+*license.txt
Index: w11/trunk/tools/oskit
===================================================================
--- w11/trunk/tools/oskit (nonexistent)
+++ w11/trunk/tools/oskit (revision 21)
w11/trunk/tools/oskit
Property changes :
Added: svn:ignore
## -0,0 +1,32 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
Index: w11/trunk/tools/make/generic_so.mk
===================================================================
--- w11/trunk/tools/make/generic_so.mk (revision 20)
+++ w11/trunk/tools/make/generic_so.mk (revision 21)
@@ -1,7 +1,8 @@
-# $Id: generic_so.mk 354 2011-01-09 22:38:53Z mueller $
+# $Id: generic_so.mk 515 2013-05-04 17:28:59Z mueller $
#
# Revision History:
# Date Rev Version Comment
+# 2013-05-03 515 1.0.1 use 'mkdir -p' to prevent aborts with -j 4
# 2011-01-09 354 1.0 Initial version (from wrepo/make/generic_so.mk)
#---
#
@@ -28,7 +29,7 @@
# Build the sharable library
#
$(SOPATH)/$(SOFILEVV) : $(OBJ_all)
- if [ ! -d $(SOPATH) ]; then mkdir $(SOPATH); fi
+ if [ ! -d $(SOPATH) ]; then mkdir -p $(SOPATH); fi
$(CXX) -shared -Wl,-soname,$(SOFILEV) -o $(SOPATH)/$(SOFILEVV) \
$(OBJ_all) $(LDLIBS)
(cd $(SOPATH); rm -f $(SOFILE) $(SOFILEV))
@@ -38,6 +39,6 @@
# Build an archive
#
$(SOPATH)/$(AFILE) : $(OBJ_all)
- if [ ! -d $(SOPATH) ]; then mkdir $(SOPATH); fi
+ if [ ! -d $(SOPATH) ]; then mkdir -p $(SOPATH); fi
ar -scruv $(SOPATH)/$(AFILE) $?
#
Index: w11/trunk/rtl/ibus/ibdr_pc11.vhd
===================================================================
--- w11/trunk/rtl/ibus/ibdr_pc11.vhd (revision 20)
+++ w11/trunk/rtl/ibus/ibdr_pc11.vhd (revision 21)
@@ -1,6 +1,6 @@
--- $Id: ibdr_pc11.vhd 427 2011-11-19 21:04:11Z mueller $
+-- $Id: ibdr_pc11.vhd 515 2013-05-04 17:28:59Z mueller $
--
--- Copyright 2009-2011 by Walter F.J. Mueller
+-- Copyright 2009-2013 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
@@ -18,7 +18,7 @@
-- Dependencies: -
-- Test bench: xxdp: zpcae0
-- Target Devices: generic
--- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29
+-- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.3; ghdl 0.18-0.29
--
-- Synthesized (xst):
-- Date Rev ise Target flop lutl lutm slic t peri
@@ -27,6 +27,8 @@
--
-- Revision History:
-- Date Rev Version Comment
+-- 2013-05-04 515 1.3 BUGFIX: r.rbuf was immediately cleared ! Was broken
+-- since ibus V2 update, never tested afterwards...
-- 2011-11-18 427 1.2.2 now numeric_std clean
-- 2010-10-23 335 1.2.1 rename RRI_LAM->RB_LAM;
-- 2010-10-17 333 1.2 use ibus V2 interface
@@ -215,8 +217,8 @@
idout(r.rbuf'range) := r.rbuf;
if IB_MREQ.racc = '0' then -- cpu ---------------------
- if true then -- !! PC11 is unusual !!
- n.rdone := '0'; -- any read or write will clear done
+ if ibreq = '1' then -- !! PC11 is unusual !!
+ n.rdone := '0'; -- *any* read or write will clear done
n.rbuf := (others=>'0'); -- and the reader buffer
n.rintreq := '0'; -- also interrupt is canceled
end if;
/w11/trunk/rtl/ibus/ibdr_lp11.vhd
1,6 → 1,6
-- $Id: ibdr_lp11.vhd 427 2011-11-19 21:04:11Z mueller $ |
-- $Id: ibdr_lp11.vhd 515 2013-05-04 17:28:59Z mueller $ |
-- |
-- Copyright 2009-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
-- Copyright 2009-2013 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 |
18,7 → 18,7
-- Dependencies: - |
-- Test bench: - |
-- Target Devices: generic |
-- Tool versions: xst 8.2, 9.1, 9.2, 10.1, 12.1, 13.1; ghdl 0.18-0.29 |
-- Tool versions: xst 8.2, 9.1, 9.2, 10.1, 12.1, 13.3; ghdl 0.18-0.29 |
-- |
-- Synthesized (xst): |
-- Date Rev ise Target flop lutl lutm slic t peri |
27,6 → 27,7
-- |
-- Revision History: |
-- Date Rev Version Comment |
-- 2013-05-04 515 1.3 BUGFIX: r.err was cleared in racc read ! |
-- 2011-11-18 427 1.2.2 now numeric_std clean |
-- 2010-10-23 335 1.2.1 rename RRI_LAM->RB_LAM; |
-- 2010-10-17 333 1.2 use ibus V2 interface |
119,6 → 120,7
variable ibreq : slbit := '0'; |
variable ibrd : slbit := '0'; |
variable ibw0 : slbit := '0'; |
variable ibw1 : slbit := '0'; |
variable ilam : slbit := '0'; |
begin |
|
129,6 → 131,7
ibreq := IB_MREQ.re or IB_MREQ.we; |
ibrd := IB_MREQ.re; |
ibw0 := IB_MREQ.we and IB_MREQ.be0; |
ibw1 := IB_MREQ.we and IB_MREQ.be1; |
ilam := '0'; |
|
-- ibus address decoder |
158,7 → 161,9
end if; |
end if; |
else -- rri |
n.err := IB_MREQ.din(csr_ibf_err); |
if ibw1 = '1' then |
n.err := IB_MREQ.din(csr_ibf_err); |
end if; |
end if; |
|
when ibaddr_buf => -- BUF -- data buffer ---------------- |
/w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/sys_tst_fx2loop_n3.vhd
0,0 → 1,364
-- $Id: sys_tst_fx2loop_n3.vhd 514 2013-05-03 16:11:23Z mueller $ |
-- |
-- Copyright 2012-2013 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 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. |
-- |
------------------------------------------------------------------------------ |
-- Module Name: sys_tst_fx2loop_n3 - syn |
-- Description: test of Cypress EZ-USB FX2 controller |
-- |
-- Dependencies: vlib/xlib/dcm_sfs |
-- vlib/genlib/clkdivce |
-- bpgen/sn_humanio |
-- tst_fx2loop_hiomap |
-- tst_fx2loop |
-- bplib/fx2lib/fx2_2fifoctl_as [sys_conf_fx2_type="as2"] |
-- bplib/fx2lib/fx2_2fifoctl_ic [sys_conf_fx2_type="ic2"] |
-- bplib/fx2lib/fx2_3fifoctl_ic [sys_conf_fx2_type="ic3"] |
-- bplib/nxcramlib/nx_cram_dummy |
-- |
-- Test bench: - |
-- |
-- Target Devices: generic |
-- Tool versions: xst 13.3, 14.5; ghdl 0.29 |
-- |
-- Synthesized (xst): |
-- Date Rev ise Target flop lutl lutm slic t peri ctl/MHz |
-- 2013-04-25 510 14.5 P58f xc6slx16-2 416 516 68 199 p 5.3 ic3/150 |
-- 2013-04-24 510 13.3 O76d xc6slx16-2 417 674 68 228 p 5.3 ic3/175 |
-- 2012-04-09 461 13.3 O76d xc6slx16-2 429 620 48 232 p 7.2 ic3/100 |
-- |
-- 2013-04-25 510 14.5 P58f xc6slx16-2 349 427 48 163 p 5.4 ic2/150 |
-- 2013-04-24 510 13.3 O76d xc6slx16-2 355 569 48 208 p 5.4 ic2/175 |
-- 2012-04-09 461 13.3 O76d xc6slx16-2 347 499 32 175 p 7.9 ic2/100 |
-- |
-- 2013-04-24 510 13.3 O76d xc6slx16-2 299 486 32 175 p FAIL as2/100 |
-- 2012-04-09 461 13.3 O76d xc6slx16-2 299 460 32 164 p FAIL as2/100 |
-- |
-- Revision History: |
-- Date Rev Version Comment |
-- 2013-04-24 510 1.0.1 CLKDIV.CDUWIDTH now 8, support >127 sysclk |
-- 2012-04-09 461 1.0 Initial version (derived from sys_tst_fx2loop_n2) |
------------------------------------------------------------------------------ |
|
library ieee; |
use ieee.std_logic_1164.all; |
use ieee.numeric_std.all; |
|
use work.slvtypes.all; |
use work.xlib.all; |
use work.genlib.all; |
use work.bpgenlib.all; |
use work.tst_fx2looplib.all; |
use work.fx2lib.all; |
use work.nxcramlib.all; |
use work.sys_conf.all; |
|
-- ---------------------------------------------------------------------------- |
|
entity sys_tst_fx2loop_n3 is -- top level |
-- implements nexys3_aif + fx2 pins |
port ( |
I_CLK100 : in slbit; -- 100 MHz clock |
I_RXD : in slbit; -- receive data (board view) |
O_TXD : out slbit; -- transmit data (board view) |
I_SWI : in slv8; -- n3 switches |
I_BTN : in slv5; -- n3 buttons |
O_LED : out slv8; -- n3 leds |
O_ANO_N : out slv4; -- 7 segment disp: anodes (act.low) |
O_SEG_N : out slv8; -- 7 segment disp: segments (act.low) |
O_MEM_CE_N : out slbit; -- cram: chip enable (act.low) |
O_MEM_BE_N : out slv2; -- cram: byte enables (act.low) |
O_MEM_WE_N : out slbit; -- cram: write enable (act.low) |
O_MEM_OE_N : out slbit; -- cram: output enable (act.low) |
O_MEM_ADV_N : out slbit; -- cram: address valid (act.low) |
O_MEM_CLK : out slbit; -- cram: clock |
O_MEM_CRE : out slbit; -- cram: command register enable |
I_MEM_WAIT : in slbit; -- cram: mem wait |
O_MEM_ADDR : out slv23; -- cram: address lines |
IO_MEM_DATA : inout slv16; -- cram: data lines |
O_PPCM_CE_N : out slbit; -- ppcm: ... |
O_PPCM_RST_N : out slbit; -- ppcm: ... |
I_FX2_IFCLK : in slbit; -- fx2: interface clock |
O_FX2_FIFO : out slv2; -- fx2: fifo address |
I_FX2_FLAG : in slv4; -- fx2: fifo flags |
O_FX2_SLRD_N : out slbit; -- fx2: read enable (act.low) |
O_FX2_SLWR_N : out slbit; -- fx2: write enable (act.low) |
O_FX2_SLOE_N : out slbit; -- fx2: output enable (act.low) |
O_FX2_PKTEND_N : out slbit; -- fx2: packet end (act.low) |
IO_FX2_DATA : inout slv8 -- fx2: data lines |
); |
end sys_tst_fx2loop_n3; |
|
architecture syn of sys_tst_fx2loop_n3 is |
|
signal CLK : slbit := '0'; |
signal RESET : slbit := '0'; |
|
signal CE_USEC : slbit := '0'; |
signal CE_MSEC : slbit := '0'; |
|
signal SWI : slv8 := (others=>'0'); |
signal BTN : slv5 := (others=>'0'); |
signal LED : slv8 := (others=>'0'); |
signal DSP_DAT : slv16 := (others=>'0'); |
signal DSP_DP : slv4 := (others=>'0'); |
|
signal LED_MAP : slv8 := (others=>'0'); |
|
signal HIO_CNTL : hio_cntl_type := hio_cntl_init; |
signal HIO_STAT : hio_stat_type := hio_stat_init; |
|
signal FX2_RXDATA : slv8 := (others=>'0'); |
signal FX2_RXVAL : slbit := '0'; |
signal FX2_RXHOLD : slbit := '0'; |
signal FX2_RXAEMPTY : slbit := '0'; |
signal FX2_TXDATA : slv8 := (others=>'0'); |
signal FX2_TXENA : slbit := '0'; |
signal FX2_TXBUSY : slbit := '0'; |
signal FX2_TXAFULL : slbit := '0'; |
signal FX2_TX2DATA : slv8 := (others=>'0'); |
signal FX2_TX2ENA : slbit := '0'; |
signal FX2_TX2BUSY : slbit := '1'; |
signal FX2_TX2AFULL : slbit := '0'; |
signal FX2_MONI : fx2ctl_moni_type := fx2ctl_moni_init; |
|
begin |
|
assert (sys_conf_clksys mod 1000000) = 0 |
report "assert sys_conf_clksys on MHz grid" |
severity failure; |
|
DCM : dcm_sfs |
generic map ( |
CLKFX_DIVIDE => sys_conf_clkfx_divide, |
CLKFX_MULTIPLY => sys_conf_clkfx_multiply, |
CLKIN_PERIOD => 10.0) |
port map ( |
CLKIN => I_CLK100, |
CLKFX => CLK, |
LOCKED => open |
); |
|
CLKDIV : clkdivce |
generic map ( |
CDUWIDTH => 8, -- good for up to 255 MHz ! |
USECDIV => sys_conf_clksys_mhz, |
MSECDIV => 1000) |
port map ( |
CLK => CLK, |
CE_USEC => CE_USEC, |
CE_MSEC => CE_MSEC |
); |
|
HIO : sn_humanio |
generic map ( |
BWIDTH => 5, |
DEBOUNCE => sys_conf_hio_debounce) |
port map ( |
CLK => CLK, |
RESET => '0', |
CE_MSEC => CE_MSEC, |
SWI => SWI, |
BTN => BTN, |
LED => LED, |
DSP_DAT => DSP_DAT, |
DSP_DP => DSP_DP, |
I_SWI => I_SWI, |
I_BTN => I_BTN, |
O_LED => O_LED, |
O_ANO_N => O_ANO_N, |
O_SEG_N => O_SEG_N |
); |
|
RESET <= BTN(0); -- BTN(0) will reset tester !! |
|
HIOMAP : tst_fx2loop_hiomap |
port map ( |
CLK => CLK, |
RESET => RESET, |
HIO_CNTL => HIO_CNTL, |
HIO_STAT => HIO_STAT, |
FX2_MONI => FX2_MONI, |
SWI => SWI, |
BTN => BTN(3 downto 0), |
LED => LED_MAP, |
DSP_DAT => DSP_DAT, |
DSP_DP => DSP_DP |
); |
|
proc_led: process (SWI, LED_MAP, FX2_TX2BUSY, FX2_TX2ENA, |
FX2_TXBUSY, FX2_TXENA, FX2_RXHOLD, FX2_RXVAL) |
begin |
|
if SWI(4) = '1' then |
LED(7) <= '0'; |
LED(6) <= '0'; |
LED(5) <= FX2_TX2BUSY; |
LED(4) <= FX2_TX2ENA; |
LED(3) <= FX2_TXBUSY; |
LED(2) <= FX2_TXENA; |
LED(1) <= FX2_RXHOLD; |
LED(0) <= FX2_RXVAL; |
else |
LED <= LED_MAP; |
end if; |
|
end process proc_led; |
|
|
TST : tst_fx2loop |
port map ( |
CLK => CLK, |
RESET => RESET, |
CE_MSEC => CE_MSEC, |
HIO_CNTL => HIO_CNTL, |
HIO_STAT => HIO_STAT, |
FX2_MONI => FX2_MONI, |
RXDATA => FX2_RXDATA, |
RXVAL => FX2_RXVAL, |
RXHOLD => FX2_RXHOLD, |
TXDATA => FX2_TXDATA, |
TXENA => FX2_TXENA, |
TXBUSY => FX2_TXBUSY, |
TX2DATA => FX2_TX2DATA, |
TX2ENA => FX2_TX2ENA, |
TX2BUSY => FX2_TX2BUSY |
); |
|
FX2_CNTL_AS : if sys_conf_fx2_type = "as2" generate |
CNTL : fx2_2fifoctl_as |
generic map ( |
RXFAWIDTH => 5, |
TXFAWIDTH => 5, |
CCWIDTH => sys_conf_fx2_ccwidth, |
RXAEMPTY_THRES => 1, |
TXAFULL_THRES => 1, |
PETOWIDTH => sys_conf_fx2_petowidth, |
RDPWLDELAY => sys_conf_fx2_rdpwldelay, |
RDPWHDELAY => sys_conf_fx2_rdpwhdelay, |
WRPWLDELAY => sys_conf_fx2_wrpwldelay, |
WRPWHDELAY => sys_conf_fx2_wrpwhdelay, |
FLAGDELAY => sys_conf_fx2_flagdelay) |
port map ( |
CLK => CLK, |
CE_USEC => CE_USEC, |
RESET => RESET, |
RXDATA => FX2_RXDATA, |
RXVAL => FX2_RXVAL, |
RXHOLD => FX2_RXHOLD, |
RXAEMPTY => FX2_RXAEMPTY, |
TXDATA => FX2_TXDATA, |
TXENA => FX2_TXENA, |
TXBUSY => FX2_TXBUSY, |
TXAFULL => FX2_TXAFULL, |
MONI => FX2_MONI, |
I_FX2_IFCLK => I_FX2_IFCLK, |
O_FX2_FIFO => O_FX2_FIFO, |
I_FX2_FLAG => I_FX2_FLAG, |
O_FX2_SLRD_N => O_FX2_SLRD_N, |
O_FX2_SLWR_N => O_FX2_SLWR_N, |
O_FX2_SLOE_N => O_FX2_SLOE_N, |
O_FX2_PKTEND_N => O_FX2_PKTEND_N, |
IO_FX2_DATA => IO_FX2_DATA |
); |
end generate FX2_CNTL_AS; |
|
FX2_CNTL_IC : if sys_conf_fx2_type = "ic2" generate |
CNTL : fx2_2fifoctl_ic |
generic map ( |
RXFAWIDTH => 5, |
TXFAWIDTH => 5, |
PETOWIDTH => sys_conf_fx2_petowidth, |
CCWIDTH => sys_conf_fx2_ccwidth, |
RXAEMPTY_THRES => 1, |
TXAFULL_THRES => 1) |
port map ( |
CLK => CLK, |
RESET => RESET, |
RXDATA => FX2_RXDATA, |
RXVAL => FX2_RXVAL, |
RXHOLD => FX2_RXHOLD, |
RXAEMPTY => FX2_RXAEMPTY, |
TXDATA => FX2_TXDATA, |
TXENA => FX2_TXENA, |
TXBUSY => FX2_TXBUSY, |
TXAFULL => FX2_TXAFULL, |
MONI => FX2_MONI, |
I_FX2_IFCLK => I_FX2_IFCLK, |
O_FX2_FIFO => O_FX2_FIFO, |
I_FX2_FLAG => I_FX2_FLAG, |
O_FX2_SLRD_N => O_FX2_SLRD_N, |
O_FX2_SLWR_N => O_FX2_SLWR_N, |
O_FX2_SLOE_N => O_FX2_SLOE_N, |
O_FX2_PKTEND_N => O_FX2_PKTEND_N, |
IO_FX2_DATA => IO_FX2_DATA |
); |
end generate FX2_CNTL_IC; |
|
FX2_CNTL_IC3 : if sys_conf_fx2_type = "ic3" generate |
CNTL : fx2_3fifoctl_ic |
generic map ( |
RXFAWIDTH => 5, |
TXFAWIDTH => 5, |
PETOWIDTH => sys_conf_fx2_petowidth, |
CCWIDTH => sys_conf_fx2_ccwidth, |
RXAEMPTY_THRES => 1, |
TXAFULL_THRES => 1, |
TX2AFULL_THRES => 1) |
port map ( |
CLK => CLK, |
RESET => RESET, |
RXDATA => FX2_RXDATA, |
RXVAL => FX2_RXVAL, |
RXHOLD => FX2_RXHOLD, |
RXAEMPTY => FX2_RXAEMPTY, |
TXDATA => FX2_TXDATA, |
TXENA => FX2_TXENA, |
TXBUSY => FX2_TXBUSY, |
TXAFULL => FX2_TXAFULL, |
TX2DATA => FX2_TX2DATA, |
TX2ENA => FX2_TX2ENA, |
TX2BUSY => FX2_TX2BUSY, |
TX2AFULL => FX2_TX2AFULL, |
MONI => FX2_MONI, |
I_FX2_IFCLK => I_FX2_IFCLK, |
O_FX2_FIFO => O_FX2_FIFO, |
I_FX2_FLAG => I_FX2_FLAG, |
O_FX2_SLRD_N => O_FX2_SLRD_N, |
O_FX2_SLWR_N => O_FX2_SLWR_N, |
O_FX2_SLOE_N => O_FX2_SLOE_N, |
O_FX2_PKTEND_N => O_FX2_PKTEND_N, |
IO_FX2_DATA => IO_FX2_DATA |
); |
end generate FX2_CNTL_IC3; |
|
SRAM_PROT : nx_cram_dummy -- connect CRAM to protection dummy |
port map ( |
O_MEM_CE_N => O_MEM_CE_N, |
O_MEM_BE_N => O_MEM_BE_N, |
O_MEM_WE_N => O_MEM_WE_N, |
O_MEM_OE_N => O_MEM_OE_N, |
O_MEM_ADV_N => O_MEM_ADV_N, |
O_MEM_CLK => O_MEM_CLK, |
O_MEM_CRE => O_MEM_CRE, |
I_MEM_WAIT => I_MEM_WAIT, |
O_MEM_ADDR => O_MEM_ADDR, |
IO_MEM_DATA => IO_MEM_DATA |
); |
|
O_PPCM_CE_N <= '1'; -- keep parallel PCM memory disabled |
O_PPCM_RST_N <= '1'; -- |
|
O_TXD <= I_RXD; -- loop-back in serial port... |
|
end syn; |
|
/w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/sys_tst_fx2loop_n3.vbom
0,0 → 1,30
# this is the vbom for the 'generic' top level entity |
# to be referenced in the vbom's of the specific systems |
# ./as/sys_tst_fx2loop_as_n3 |
# ./ic/sys_tst_fx2loop_ic_n3 |
# ./ic3/sys_tst_fx2loop_ic3_n3 |
# |
# libs |
../../../vlib/slvtypes.vhd |
../../../vlib/xlib/xlib.vhd |
../../../vlib/genlib/genlib.vhd |
../../../bplib/bpgen/bpgenlib.vbom |
../tst_fx2looplib.vbom |
../../../bplib/fx2lib/fx2lib.vhd |
../../../bplib/nxcramlib/nxcramlib.vhd |
${sys_conf} |
# components |
[xst,isim]../../../vlib/xlib/dcm_sfs_unisim_s3e.vbom |
[ghdl]../../../vlib/xlib/dcm_sfs_gsim.vbom |
../../../vlib/genlib/clkdivce.vbom |
../../../bplib/bpgen/sn_humanio.vbom |
../tst_fx2loop_hiomap.vbom |
../tst_fx2loop.vbom |
../../../bplib/fx2lib/fx2_2fifoctl_as.vbom |
../../../bplib/fx2lib/fx2_2fifoctl_ic.vbom |
../../../bplib/fx2lib/fx2_3fifoctl_ic.vbom |
../../../bplib/nxcramlib/nx_cram_dummy.vbom |
# design |
sys_tst_fx2loop_n3.vhd |
## no @ucf_cpp |
|
/w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic/sys_conf.vhd
0,0 → 1,59
-- $Id: sys_conf.vhd 510 2013-04-26 16:14:57Z mueller $ |
-- |
-- Copyright 2012-2013 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 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. |
-- |
------------------------------------------------------------------------------ |
-- Package Name: sys_conf |
-- Description: Definitions for sys_tst_fx2loop_ic_n3 (for synthesis) |
-- |
-- Dependencies: - |
-- Tool versions: xst 13.3, 14.5; ghdl 0.29 |
-- Revision History: |
-- Date Rev Version Comment |
-- 2012-04-24 510 1.1 use 3/2 clock-> 150 MHz sysclk |
-- 2012-04-09 461 1.0 Initial version |
------------------------------------------------------------------------------ |
|
library ieee; |
use ieee.std_logic_1164.all; |
|
use work.slvtypes.all; |
|
package sys_conf is |
|
constant sys_conf_clkfx_divide : positive := 2; |
constant sys_conf_clkfx_multiply : positive := 3; |
|
constant sys_conf_fx2_type : string := "ic2"; |
|
-- dummy values defs for generic parameters of as controller |
constant sys_conf_fx2_rdpwldelay : positive := 1; |
constant sys_conf_fx2_rdpwhdelay : positive := 1; |
constant sys_conf_fx2_wrpwldelay : positive := 1; |
constant sys_conf_fx2_wrpwhdelay : positive := 1; |
constant sys_conf_fx2_flagdelay : positive := 1; |
|
-- pktend timer setting |
-- petowidth=10 -> 2^10 30 MHz clocks -> ~33 usec (normal operation) |
constant sys_conf_fx2_petowidth : positive := 10; |
|
constant sys_conf_fx2_ccwidth : positive := 5; |
|
constant sys_conf_hio_debounce : boolean := true; -- instantiate debouncers |
|
-- derived constants |
|
constant sys_conf_clksys : integer := |
(100000000/sys_conf_clkfx_divide)*sys_conf_clkfx_multiply; |
constant sys_conf_clksys_mhz : integer := sys_conf_clksys/1000000; |
|
end package sys_conf; |
/w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic/sys_tst_fx2loop_ic_n3.ucf_cpp
0,0 → 1,20
## $Id: sys_tst_fx2loop_ic_n3.ucf_cpp 461 2012-04-09 21:17:54Z mueller $ |
## |
## Revision History: |
## Date Rev Version Comment |
## 2012-04-09 461 1.0 Initial version |
## |
|
NET "I_CLK100" TNM_NET = "I_CLK100"; |
TIMESPEC "TS_I_CLK100" = PERIOD "I_CLK100" 10.0 ns HIGH 50 %; |
OFFSET = IN 10 ns BEFORE "I_CLK100"; |
OFFSET = OUT 20 ns AFTER "I_CLK100"; |
|
## std board |
## |
#include "bplib/nexys3/nexys3_pins.ucf" |
## |
## FX2 interface |
## |
#include "bplib/nexys3/nexys3_pins_fx2.ucf" |
#include "bplib/nexys3/nexys3_time_fx2_ic.ucf" |
/w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic/Makefile
0,0 → 1,30
# $Id: Makefile 477 2013-01-27 14:07:10Z mueller $ |
# |
# Revision History: |
# Date Rev Version Comment |
# 2012-04-09 461 1.0 Initial version |
# |
# |
VBOM_all = $(wildcard *.vbom) |
BIT_all = $(VBOM_all:.vbom=.bit) |
# |
include $(RETROBASE)/rtl/make/xflow_default_nexys3.mk |
FX2_FILE = nexys3_jtag_2fifo_ic.ihx |
# |
.PHONY : all clean |
# |
all : $(BIT_all) |
# |
clean : ise_clean |
rm -f $(VBOM_all:.vbom=.ucf) |
# |
#---- |
# |
include $(RETROBASE)/rtl/make/generic_xflow.mk |
include $(RETROBASE)/rtl/make/generic_ghdl.mk |
# |
ifndef DONTINCDEP |
include $(VBOM_all:.vbom=.dep_xst) |
include $(VBOM_all:.vbom=.dep_ghdl) |
endif |
# |
/w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic/.cvsignore
0,0 → 1,4
_impactbatch.log |
sys_tst_fx2loop_ic_n3.ucf |
*.dep_ucf_cpp |
*.svf |
/w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic/sys_tst_fx2loop_ic_n3.vbom
0,0 → 1,8
# conf |
sys_conf = sys_conf.vhd |
# libs |
# components |
# design |
../sys_tst_fx2loop_n3.vbom |
@ucf_cpp: sys_tst_fx2loop_ic_n3.ucf |
@top: sys_tst_fx2loop_n3 |
w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic
Property changes :
Added: svn:ignore
## -0,0 +1,36 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
+_impactbatch.log
+sys_tst_fx2loop_ic_n3.ucf
+*.dep_ucf_cpp
+*.svf
Index: w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/sys_tst_fx2loop_ic3_n3.vbom
===================================================================
--- w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/sys_tst_fx2loop_ic3_n3.vbom (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/sys_tst_fx2loop_ic3_n3.vbom (revision 21)
@@ -0,0 +1,8 @@
+# conf
+sys_conf = sys_conf.vhd
+# libs
+# components
+# design
+../sys_tst_fx2loop_n3.vbom
+@ucf_cpp: sys_tst_fx2loop_ic3_n3.ucf
+@top: sys_tst_fx2loop_n3
Index: w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/sys_conf.vhd
===================================================================
--- w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/sys_conf.vhd (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/sys_conf.vhd (revision 21)
@@ -0,0 +1,59 @@
+-- $Id: sys_conf.vhd 510 2013-04-26 16:14:57Z mueller $
+--
+-- Copyright 2012-2013 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.
+--
+------------------------------------------------------------------------------
+-- Package Name: sys_conf
+-- Description: Definitions for sys_tst_fx2loop_ic3_n3 (for synthesis)
+--
+-- Dependencies: -
+-- Tool versions: xst 13.3, 14.5; ghdl 0.29
+-- Revision History:
+-- Date Rev Version Comment
+-- 2012-04-25 510 1.1 use 3/2 clock-> 150 MHz sysclk
+-- 2012-04-09 461 1.0 Initial version
+------------------------------------------------------------------------------
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+use work.slvtypes.all;
+
+package sys_conf is
+
+ constant sys_conf_clkfx_divide : positive := 2;
+ constant sys_conf_clkfx_multiply : positive := 3;
+
+ constant sys_conf_fx2_type : string := "ic3";
+
+ -- dummy values defs for generic parameters of as controller
+ constant sys_conf_fx2_rdpwldelay : positive := 1;
+ constant sys_conf_fx2_rdpwhdelay : positive := 1;
+ constant sys_conf_fx2_wrpwldelay : positive := 1;
+ constant sys_conf_fx2_wrpwhdelay : positive := 1;
+ constant sys_conf_fx2_flagdelay : positive := 1;
+
+ -- pktend timer setting
+ -- petowidth=10 -> 2^10 30 MHz clocks -> ~33 usec (normal operation)
+ constant sys_conf_fx2_petowidth : positive := 10;
+
+ constant sys_conf_fx2_ccwidth : positive := 5;
+
+ constant sys_conf_hio_debounce : boolean := true; -- instantiate debouncers
+
+ -- derived constants
+
+ constant sys_conf_clksys : integer :=
+ (100000000/sys_conf_clkfx_divide)*sys_conf_clkfx_multiply;
+ constant sys_conf_clksys_mhz : integer := sys_conf_clksys/1000000;
+
+end package sys_conf;
Index: w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/.cvsignore
===================================================================
--- w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/.cvsignore (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/.cvsignore (revision 21)
@@ -0,0 +1,4 @@
+_impactbatch.log
+sys_tst_fx2loop_ic3_n3.ucf
+*.dep_ucf_cpp
+*.svf
Index: w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/Makefile
===================================================================
--- w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/Makefile (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/Makefile (revision 21)
@@ -0,0 +1,30 @@
+# $Id: Makefile 477 2013-01-27 14:07:10Z mueller $
+#
+# Revision History:
+# Date Rev Version Comment
+# 2012-04-09 461 1.0 Initial version
+#
+#
+VBOM_all = $(wildcard *.vbom)
+BIT_all = $(VBOM_all:.vbom=.bit)
+#
+include $(RETROBASE)/rtl/make/xflow_default_nexys3.mk
+FX2_FILE = nexys3_jtag_3fifo_ic.ihx
+#
+.PHONY : all clean
+#
+all : $(BIT_all)
+#
+clean : ise_clean
+ rm -f $(VBOM_all:.vbom=.ucf)
+#
+#----
+#
+include $(RETROBASE)/rtl/make/generic_xflow.mk
+include $(RETROBASE)/rtl/make/generic_ghdl.mk
+#
+ifndef DONTINCDEP
+include $(VBOM_all:.vbom=.dep_xst)
+include $(VBOM_all:.vbom=.dep_ghdl)
+endif
+#
Index: w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/sys_tst_fx2loop_ic3_n3.ucf_cpp
===================================================================
--- w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/sys_tst_fx2loop_ic3_n3.ucf_cpp (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3/sys_tst_fx2loop_ic3_n3.ucf_cpp (revision 21)
@@ -0,0 +1,20 @@
+## $Id: sys_tst_fx2loop_ic3_n3.ucf_cpp 461 2012-04-09 21:17:54Z mueller $
+##
+## Revision History:
+## Date Rev Version Comment
+## 2012-04-09 461 1.0 Initial version
+##
+
+NET "I_CLK100" TNM_NET = "I_CLK100";
+TIMESPEC "TS_I_CLK100" = PERIOD "I_CLK100" 10.0 ns HIGH 50 %;
+OFFSET = IN 10 ns BEFORE "I_CLK100";
+OFFSET = OUT 20 ns AFTER "I_CLK100";
+
+## std board
+##
+#include "bplib/nexys3/nexys3_pins.ucf"
+##
+## FX2 interface
+##
+#include "bplib/nexys3/nexys3_pins_fx2.ucf"
+#include "bplib/nexys3/nexys3_time_fx2_ic.ucf"
Index: w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3
===================================================================
--- w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3 (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3 (revision 21)
w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3/ic3
Property changes :
Added: svn:ignore
## -0,0 +1,36 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
+_impactbatch.log
+sys_tst_fx2loop_ic3_n3.ucf
+*.dep_ucf_cpp
+*.svf
Index: w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3
===================================================================
--- w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3 (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3 (revision 21)
w11/trunk/rtl/sys_gen/tst_fx2loop/nexys3
Property changes :
Added: svn:ignore
## -0,0 +1,32 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
Index: w11/trunk/rtl/sys_gen/w11a/tb/211bsd_rk_boot.pcmd
===================================================================
--- w11/trunk/rtl/sys_gen/w11a/tb/211bsd_rk_boot.pcmd (revision 20)
+++ w11/trunk/rtl/sys_gen/w11a/tb/211bsd_rk_boot.pcmd (nonexistent)
@@ -1,28 +0,0 @@
-; $Id: 211bsd_rk_boot.pcmd 312 2010-07-04 18:25:58Z mueller $
-;
-; Setup file for 211bsd RK based system (w11a, in sys/tb area...)
-;
-; Usage:
-;
-; telnet_starter -d DL0 &
-; telnet_starter -d DL1 &
-;
-; dorri -s3 @211bsd_rk_boot.pcmd (for ghdl sim of tb_w11a_s3)
-; dorri -n2 @211bsd_rk_boot.pcmd (for ghdl sim of tb_w11a_n2)
-;
-; dorri -t @211bsd_rk_boot.pcmd (fpga link via /dev/ttyS0)
-; dorri -u0,460 @211bsd_rk_boot.pcmd (fpga link via /dev/ttyUSB0)
-;
-.mode serv11
-;
-att TT0 8000
-att TT1 8001
-;
-reset
-att rk0 211bsd_rk_root.dsk
-att rk1 211bsd_rk_swap.dsk
-att rk2 211bsd_rk_tmp.dsk
-att rk3 211bsd_rk_bin.dsk
-att rk4 211bsd_rk_usr.dsk
-boot rk0
-server
Index: w11/trunk/rtl/sys_gen/w11a/tb/dorri
===================================================================
--- w11/trunk/rtl/sys_gen/w11a/tb/dorri (revision 20)
+++ w11/trunk/rtl/sys_gen/w11a/tb/dorri (nonexistent)
@@ -1,207 +0,0 @@
-#!/usr/bin/perl -w
-# $Id: dorri 510 2013-04-26 16:14:57Z mueller $
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-12-03 435 1.5 add w11a_n3 support; add break/flow control to -u
-# 2010-05-29 296 1.4 allow -ux,baud (usb devnum and baudrate)
-# 2010-05-28 295 1.3 w11a_s3/w11a_n2 support: -s3 and -n2 instead of -f
-# add -tmu option
-# 2010-05-03 287 1.2 add -u[123] options for fast usb serport
-# 2009-08-01 237 1.1.1 use 115200 instead of 38400 as default baud rate
-# 2009-04-26 209 1.1 add -b (batch) option
-# 2009-04-11 206 1.0 Initial version
-#
-
-use 5.005; # require Perl 5.005 or higher
-use strict; # require strict checking
-use FileHandle;
-
-sub print_usage;
-
-autoflush STDOUT 1; # autoflush, so noting lost on exec later
-
-my $opt_b;
-my $opt_io = '';
-my $opt_tmu;
-my $pirri;
-my $val_cmax="3";
-my $val_time="3.";
-my $val_term=",115200,1";
-my $val_log="rri.log";
-my $val_tb_s3="tbw ../s3board/tb/tb_w11a_s3";
-my $val_tb_n2="tbw ../nexys2/tb/tb_w11a_n2";
-my $val_tb_n3="tbw ../nexys3/tb/tb_w11a_n3";
-my $val_tb;
-my $val_e;
-
-my @arglist;
-
-my %baudtbl = (
- "57" => 57600,
- "115" => 115200,
- "230" => 230400,
- "460" => 460800,
- "500" => 500000,
- "1000" => 1000000,
- "2000" => 2000000,
- "3000" => 2000000
- );
-
-#
-# process dorri options
-#
-while (scalar(@ARGV)) {
- my $curarg = $ARGV[0];
- if ($curarg =~ m{^-b$} ) { # -b
- $opt_b = 1;
- shift @ARGV;
- } elsif ($curarg =~ m{^-tmu$} ) { # -tmu
- $opt_tmu = 1;
- shift @ARGV;
- } elsif ($curarg =~ m{^-s3$} ) { # -s3
- $opt_io = "f";
- $val_tb = $val_tb_s3;
- shift @ARGV;
- } elsif ($curarg =~ m{^-n2$} ) { # -n2
- $opt_io = "f";
- $val_tb = $val_tb_n2;
- shift @ARGV;
- } elsif ($curarg =~ m{^-n3$} ) { # -n3
- $opt_io = "f";
- $val_tb = $val_tb_n3;
- shift @ARGV;
- } elsif ($curarg =~ m{^-t$} ) { # -t
- $opt_io = "t";
-
- } elsif ($curarg =~ m{^-u(\d),?} ) { # -ux...
- my $devnum = $1;
- my ($dev,$baud,$break,$flow) = split /,/,$curarg;
- $baud = "115" unless defined $baud;
- $break = 1 unless defined $break; # default: break
- $flow = 1 unless defined $flow; # default: cts
-
- if ($baud !~ m{^\d*$} || $break !~ m{^[01]$} || $flow !~ m{^[012]$}) {
- print STDERR "dorri-E: invalid format of -u option\n";
- exit 1;
- }
-
- my $baudrate;
- if (defined $baudtbl{$baud}) {
- $baudrate = $baudtbl{$baud};
- } else {
- print STDERR "dorri-E: invalid baudrate specification $baud\n";
- exit 1;
- }
- $opt_io = "t";
- $val_term = sprintf "/dev/ttyUSB%d,%d,%d,%d",
- $devnum, $baudrate, $break, $flow;
- shift @ARGV;
-
- } elsif ($curarg =~ m{^-e$} ) { # -e
- print STDERR "dorri-W: multiple -e options, only last taken\n"
- if defined $val_e;
- shift @ARGV;
- if (scalar(@ARGV) == 0 || $ARGV[0] =~ m{^-}) {
- print STDERR "dorri-E: no file name after -e option\n";
- exit 1;
- } else {
- $val_e = shift @ARGV;
- if (not -r $val_e) {
- print STDERR "dorri-E: file '$val_e' not found\n";
- exit 1;
- }
- }
- } else {
- last;
- }
-}
-
-#
-# rename old log file
-#
-if (-r $val_log) {
- my $old_log = $val_log;
- $old_log =~ s{\.log}{\.old\.log};
- rename $val_log, $old_log
- or die "failed to rename: $!";
-}
-
-#
-# check that either -s3/n2/n3 or -t given
-# setup pi_rri options for either case
-#
-
-if ($opt_io eq "f") {
- push @arglist, "--fifo";
- push @arglist, "--run";
- push @arglist, $val_tb;
-} elsif ($opt_io eq "t") {
- push @arglist, "--term=$val_term";
-} else {
- print STDERR "dorri-E: neither -s3/-n2/-n3 nor -t or -u specified\n";
- print_usage();
- exit 1;
-}
-
-#
-# setup all other options
-#
-
-push @arglist, "--timeout=$val_time";
-push @arglist, "--cmax=$val_cmax";
-push @arglist, "--log=$val_log";
-push @arglist, "--dserv";
-push @arglist, "--tserv";
-push @arglist, "--int" unless $opt_b;
-
-if (defined $val_e) {
- push @arglist, ".mode serv11";
- push @arglist, "ldabs $val_e";
- push @arglist, "set sim tmu 1" if $opt_tmu;
- push @arglist, "start 200";
-}
-
-while (scalar(@ARGV)) {
- my $curarg = shift @ARGV;
- if ($curarg =~ m{^@(.*)$} && ! -r $1) {
- print STDERR "dorri-E: file '$1' not found\n";
- exit 1;
- }
- push @arglist,$curarg;
-}
-
-if (defined $val_e) {
- push @arglist, "server";
-}
-
-#
-# find pi_rri executable
-#
-
-$pirri=`which pi_rri`;
-chomp $pirri;
-if ($pirri eq "" || ! -e $pirri) {
- print STDERR "dorri-E: failed to locate pi_rri\n";
- exit 1;
-}
-
-#
-# print command file
-#
-if (1) {
- print "pi_rri ", join (" ", map {(m{\s}) ? "\"$_\"" : $_} @arglist) , "\n";
-}
-
-#
-# and do it
-#
-exec $pirri, @arglist
- or die "failed to exec: $!";
-
-exit 1;
-
-# ----------------------------------------------------------------------------
-sub print_usage {
- print "usage: dorri [-f] [-t] [-u(123) [-e file] ...\n";
-}
w11/trunk/rtl/sys_gen/w11a/tb/dorri
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: w11/trunk/rtl/sys_gen/w11a/tb/torri
===================================================================
--- w11/trunk/rtl/sys_gen/w11a/tb/torri (revision 20)
+++ w11/trunk/rtl/sys_gen/w11a/tb/torri (nonexistent)
@@ -1,229 +0,0 @@
-#!/usr/bin/perl -w
-# $Id: torri 511 2013-04-27 13:51:46Z mueller $
-#
-# Revision History:
-# Date Rev Version Comment
-# 2013-04-26 510 1.0 Initial version (derived from dorri)
-#
-
-use 5.005; # require Perl 5.005 or higher
-use strict; # require strict checking
-use FileHandle;
-
-sub print_usage;
-
-autoflush STDOUT 1; # autoflush, so noting lost on exec later
-
-my $opt_b;
-my $opt_io = '';
-my $opt_f = '';
-my $opt_tmu;
-my $tirri;
-my $val_term;
-my $val_tb_s3='tbw ../s3board/tb/tb_w11a_s3';
-my $val_tb_n2='tbw ../nexys2/tb/tb_w11a_n2';
-my $val_tb_n3='tbw ../nexys3/tb/tb_w11a_n3';
-my $val_tb;
-my $val_e;
-
-my @arglist;
-
-#
-# process torri options
-#
-while (scalar(@ARGV)) {
- my $curarg = $ARGV[0];
-
- if ($curarg =~ m{^-b$} ) { # -b
- $opt_b = 1;
- shift @ARGV;
-
- } elsif ($curarg =~ m{^-tmu$} ) { # -tmu
- $opt_tmu = 1;
- shift @ARGV;
-
- } elsif ($curarg =~ m{^-s3$} ) { # -s3
- $opt_io = 'f';
- $val_tb = $val_tb_s3;
- shift @ARGV;
-
- } elsif ($curarg =~ m{^-n2$} ) { # -n2
- $opt_io = 'f';
- $val_tb = $val_tb_n2;
- shift @ARGV;
-
- } elsif ($curarg =~ m{^-n3$} ) { # -n3
- $opt_io = 'f';
- $val_tb = $val_tb_n3;
- shift @ARGV;
-
- } elsif ($curarg =~ m{^-f(s\d?|u)$} ) { # -f[su]
- $opt_f = $1;
- shift @ARGV;
-
- } elsif ($curarg =~ m{^-t([su])(\d?),?} ) { # -t[su]...
- my $devnam = ($1 eq 's') ? '/dev/ttyS' : '/dev/ttyUSB';
- my $devnum = $2;
- my ($dev,$baud,$opt1,$opt2) = split /,/,$curarg;
- $baud = '115k' unless defined $baud;
-
- if ($baud !~ m{^\d*k?$}) {
- print STDERR "torri-E: invalid format of -ts or -tu option\n";
- exit 1;
- }
-
- $opt_io = 't';
- $val_term = sprintf '%s%d,%s', $devnam, $devnum, $baud;
- $val_term .= ",$opt1" if defined $opt1;
- $val_term .= ",$opt2" if defined $opt2;
- shift @ARGV;
-
- } elsif ($curarg =~ m{^-u$} ) { # -u
- $opt_io = 'u';
- shift @ARGV;
-
- } elsif ($curarg =~ m{^-e$} ) { # -e
- print STDERR "torri-W: multiple -e options, only last taken\n"
- if defined $val_e;
- shift @ARGV;
- if (scalar(@ARGV) == 0 || $ARGV[0] =~ m{^-}) {
- print STDERR "torri-E: no file name after -e option\n";
- exit 1;
- } else {
- $val_e = shift @ARGV;
- if (not -r $val_e) {
- print STDERR "torri-E: file '$val_e' not found\n";
- exit 1;
- }
- }
- } else {
- last;
- }
-}
-
-#
-# check that either -s3/n2/n3 or -t or -u given
-# setup pi_rri options for either case
-#
-
-if ($opt_io eq 'f') {
- push @arglist, '--fifo';
- push @arglist, "--run=$val_tb";
-} elsif ($opt_io eq 't') {
- push @arglist, "--term=$val_term";
-} elsif ($opt_io eq 'u') {
- push @arglist, '--cuff';
-} else {
- print STDERR "torri-E: neither -s3/-n2/-n3 nor -t or -u specified\n";
- print_usage();
- exit 1;
-}
-
-#
-# setup all other ti_rri options
-#
-
-push @arglist, '--logl=2';
-push @arglist, '--int' unless $opt_b;
-push @arglist, '--pack=rw11';
-push @arglist, '--';
-
-#
-# actions prior to first exec
-# setup tmu ect
-# setup access path --> handle -f options
-#
-if ($opt_io eq 'f') {
- if ($opt_tmu) {
- push @arglist, 'rlc oob -sbcntl 13 1';
- }
- if ($opt_f eq 'u') {
- push @arglist, 'rlc oob -sbdata 8 0x2';
- push @arglist, 'rlc oob -sbdata 16 0x4';
- }
-
-}
-
-#
-# initialize w11 cpu system
-#
-push @arglist, 'rw11::setup_sys';
-
-#
-# handle -e option
-#
-
-if (defined $val_e) {
- if ($val_e =~ m/\.mac$/) {
- push @arglist, "cpu0 ldasm -file $val_e -sym ldasm_sym -lst ldasm_lst";
- } else {
- push @arglist, "cpu0 ldabs $val_e";
- }
- push @arglist, 'rw11::cpumon';
- push @arglist, 'rw11::cpucons';
- push @arglist, 'cpu0 cp -stapc 0200';
-}
-
-#
-# all remaining commands
-#
-
-while (scalar(@ARGV)) {
- my $curarg = shift @ARGV;
- if ($curarg =~ m{^@(.*)$} && ! -r $1) {
- print STDERR "torri-E: file '$1' not found\n";
- exit 1;
- }
- push @arglist,$curarg;
-}
-
-#
-# find ti_rri executable
-#
-
-$tirri=`which ti_rri`;
-chomp $tirri;
-if ($tirri eq '' || ! -e $tirri) {
- print STDERR "torri-E: failed to locate ti_rri\n";
- exit 1;
-}
-
-#
-# print command file
-#
-if (1) {
- print 'ti_rri ', join (' ', map {(m{\s}) ? "\"$_\"" : $_} @arglist) , "\n";
-}
-
-#
-# and do it
-#
-exec $tirri, @arglist
- or die "failed to exec: $!";
-
-exit 1;
-
-# ----------------------------------------------------------------------------
-sub print_usage {
- print "usage: torri ...\n";
- print " setup options for ghdl simulation runs:\n";
- print " -s3 start tb_w11a_s3 simulation\n";
- print " -n2 start tb_w11a_n2 simulation\n";
- print " -n3 start tb_w11a_n3 simulation\n";
- print " -f.. simulation communication options\n";
- print " -fu use cuff data path\n";
- print " -tmu activate trace and monitoring unit\n";
- print " setup options for FPGA connects:\n";
- print " -u use --cuff connect\n";
- print " -t.. use --term connect\n";
- print " -ts*[,opts] use /dev/ttyS* (* is device number)\n";
- print " -tu*[,opts] use /dev/ttyUSB* (* is device number)\n";
- print " opts can be ',break', ',xon'\n";
- print " common options:\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";
- print "\n";
- print " either one of -s3,-n2, or -n3 must be given -> sim run\n";
- print " or one of -t or -u must be given -> fpga run\n";
-}
w11/trunk/rtl/sys_gen/w11a/tb/torri
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: w11/trunk/rtl/sys_gen/w11a/tb/uv5_boot.tcl
===================================================================
--- w11/trunk/rtl/sys_gen/w11a/tb/uv5_boot.tcl (revision 20)
+++ w11/trunk/rtl/sys_gen/w11a/tb/uv5_boot.tcl (nonexistent)
@@ -1,29 +0,0 @@
-# $Id: uv5_boot.tcl 511 2013-04-27 13:51:46Z mueller $
-#
-# Setup file for Unix V5 System
-#
-# Usage:
-#
-# telnet_starter -d DL0 &
-# torri -xxx @uv5_boot.tcl ( -xxx depends on sim or fpga connect)
-
-# setup w11 cpu
-puts [rlw]
-
-# 2.11 bsd uses parity, so strip it
-cpu0tta0 set to7bit 1
-
-# setup tcp links for terminals
-cpu0tta0 att "tcp:?port=8000"
-
-# setup log files
-cpu0tta0 set log "tt_dl0.log?crlf"
-
-# mount disks
-cpu0rka0 att unix_v5_rk.dsk
-
-# and boot
-#cpu0rka set trace 1
-rw11::cpumon
-rw11::cpucons
-cpu0 boot rka0
Index: w11/trunk/rtl/sys_gen/w11a/tb/uv5_boot.pcmd
===================================================================
--- w11/trunk/rtl/sys_gen/w11a/tb/uv5_boot.pcmd (revision 20)
+++ w11/trunk/rtl/sys_gen/w11a/tb/uv5_boot.pcmd (nonexistent)
@@ -1,22 +0,0 @@
-; $Id: uv5_boot.pcmd 312 2010-07-04 18:25:58Z mueller $
-;
-; Setup file for Unix V5 System
-;
-; Usage:
-;
-; telnet_starter -d DL0 &
-;
-; dorri -s3 @uv5_boot.pcmd (for ghdl sim of tb_w11a_s3)
-; dorri -n2 @uv5_boot.pcmd (for ghdl sim of tb_w11a_n2)
-;
-; dorri -t @uv5_boot.pcmd (fpga link via /dev/ttyS0)
-; dorri -u0,460 @uv5_boot.pcmd (fpga link via /dev/ttyUSB0)
-;
-.mode serv11
-;
-att TT0 8000
-;
-reset
-att rk0 unix_v5_rk.dsk
-boot rk0
-server
Index: w11/trunk/rtl/sys_gen/w11a/tb/211bsd_rk_boot.tcl
===================================================================
--- w11/trunk/rtl/sys_gen/w11a/tb/211bsd_rk_boot.tcl (revision 20)
+++ w11/trunk/rtl/sys_gen/w11a/tb/211bsd_rk_boot.tcl (nonexistent)
@@ -1,38 +0,0 @@
-# $Id: 211bsd_rk_boot.tcl 511 2013-04-27 13:51:46Z mueller $
-#
-# Setup file for 211bsd RK based system (w11a, in sys/tb area...)
-#
-# Usage:
-#
-# telnet_starter -d DL0 &
-# telnet_starter -d DL1 &
-# torri -xxx @211bsd_rk_boot.tcl ( -xxx depends on sim or fpga connect)
-#
-
-# setup w11 cpu
-puts [rlw]
-
-# 2.11 bsd uses parity, so strip it
-cpu0tta0 set to7bit 1
-cpu0ttb0 set to7bit 1
-
-# setup tcp links for terminals
-cpu0tta0 att "tcp:?port=8000"
-cpu0ttb0 att "tcp:?port=8001"
-
-# setup log files
-cpu0tta0 set log "tt_dl0.log?crlf"
-cpu0ttb0 set log "tt_dl1.log?crlf"
-
-# mount disks
-cpu0rka0 att 211bsd_rk_root.dsk
-cpu0rka1 att 211bsd_rk_swap.dsk
-cpu0rka2 att 211bsd_rk_tmp.dsk
-cpu0rka3 att 211bsd_rk_bin.dsk
-cpu0rka4 att 211bsd_rk_usr.dsk
-
-# and boot
-#cpu0rka set trace 1
-rw11::cpumon
-rw11::cpucons
-cpu0 boot rka0
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys2/ic/tb/tb_tst_rlink_cuff_ic_n2.vbom
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys2/ic/tb/tb_tst_rlink_cuff_ic_n2.vbom (revision 20)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys2/ic/tb/tb_tst_rlink_cuff_ic_n2.vbom (revision 21)
@@ -1,4 +1,4 @@
-# configure tb_nexsy2_fusp with sys_tst_rlink_n2 target;
+# configure tb_nexsy2_fusp_cuff with sys_tst_rlink_cuff_n2 target;
# use vhdl configure file (tb_tst_rlink_cuff_ic_n2.vhd) to allow
# that all configurations will co-exist in work library
${nexys2_fusp_cuff_aif := ../sys_tst_rlink_cuff_ic_n2.vbom}
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/sys_tst_rlink_cuff_n3.vhd
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/sys_tst_rlink_cuff_n3.vhd (revision 20)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/sys_tst_rlink_cuff_n3.vhd (revision 21)
@@ -1,4 +1,4 @@
--- $Id: sys_tst_rlink_cuff_n3.vhd 476 2013-01-26 22:23:53Z mueller $
+-- $Id: sys_tst_rlink_cuff_n3.vhd 512 2013-04-28 07:44:02Z mueller $
--
-- Copyright 2013- by Walter F.J. Mueller
--
@@ -32,7 +32,7 @@
--
-- Synthesized (xst):
-- Date Rev ise Target flop lutl lutm slic t peri ctl/MHz
--- 2013-01-04 469 13.3 O76d xc3s1200e-4 ??? ???? ??? ???? p ??.? ic2/ 50
+-- 2013-01-04 469 13.3 O76d xc6slx16-2 ??? ???? ??? ???? p ??.? ic2/ 50
--
-- Revision History:
-- Date Rev Version Comment
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/sys_tst_rlink_cuff_ic_n3.ucf_cpp
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/sys_tst_rlink_cuff_ic_n3.ucf_cpp (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/sys_tst_rlink_cuff_ic_n3.ucf_cpp (revision 21)
@@ -0,0 +1 @@
+link ../sys_tst_rlink_cuff_ic_n3.ucf_cpp
\ No newline at end of file
w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/sys_tst_rlink_cuff_ic_n3.ucf_cpp
Property changes :
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/tb_tst_rlink_cuff_ic_n3_ssim.vbom
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/tb_tst_rlink_cuff_ic_n3_ssim.vbom (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/tb_tst_rlink_cuff_ic_n3_ssim.vbom (revision 21)
@@ -0,0 +1,6 @@
+# configure for _*sim case
+# Note: this tb uses sys_tst_rlink_n3.vbom in local directory
+# (not in .. as usual) to allow a tb specific configure !!!
+nexys3_fusp_cuff_aif = sys_tst_rlink_cuff_ic_n3_ssim.vhd
+tb_tst_rlink_cuff_ic_n3.vbom
+@top:tb_tst_rlink_cuff_ic_n3
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/sys_conf_sim.vhd
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/sys_conf_sim.vhd (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/sys_conf_sim.vhd (revision 21)
@@ -0,0 +1,60 @@
+-- $Id: sys_conf_sim.vhd 512 2013-04-28 07:44:02Z mueller $
+--
+-- Copyright 2013- 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.
+--
+------------------------------------------------------------------------------
+-- Package Name: sys_conf
+-- Description: Definitions for sys_tst_rlink_cuff_ic_n3 (for simulation)
+--
+-- Dependencies: -
+-- Tool versions: xst 13.3; ghdl 0.29
+-- Revision History:
+-- Date Rev Version Comment
+-- 2013-04-27 512 1.0 Initial version
+------------------------------------------------------------------------------
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+use work.slvtypes.all;
+
+package sys_conf is
+
+ constant sys_conf_clkfx_divide : positive := 1;
+ constant sys_conf_clkfx_multiply : positive := 1;
+
+ constant sys_conf_ser2rri_cdinit : integer := 1-1; -- 1 cycle/bit in sim
+
+ constant sys_conf_hio_debounce : boolean := false; -- no debouncers
+
+ constant sys_conf_fx2_type : string := "ic2";
+
+ -- dummy values defs for generic parameters of as controller
+ constant sys_conf_fx2_rdpwldelay : positive := 1;
+ constant sys_conf_fx2_rdpwhdelay : positive := 1;
+ constant sys_conf_fx2_wrpwldelay : positive := 1;
+ constant sys_conf_fx2_wrpwhdelay : positive := 1;
+ constant sys_conf_fx2_flagdelay : positive := 1;
+
+ -- pktend timer setting
+ -- petowidth=10 -> 2^10 30 MHz clocks -> ~33 usec (normal operation)
+ constant sys_conf_fx2_petowidth : positive := 10;
+
+ constant sys_conf_fx2_ccwidth : positive := 5;
+
+ -- derived constants
+
+ constant sys_conf_clksys : integer :=
+ (100000000/sys_conf_clkfx_divide)*sys_conf_clkfx_multiply;
+ constant sys_conf_clksys_mhz : integer := sys_conf_clksys/1000000;
+
+end package sys_conf;
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/tb_tst_rlink_cuff_ic_n3.vhd
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/tb_tst_rlink_cuff_ic_n3.vhd (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/tb_tst_rlink_cuff_ic_n3.vhd (revision 21)
@@ -0,0 +1,40 @@
+-- $Id: tb_tst_rlink_cuff_ic_n3.vhd 512 2013-04-28 07:44:02Z mueller $
+--
+-- Copyright 2013- 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.
+--
+------------------------------------------------------------------------------
+-- Module Name: tb_tst_rlink_cuff_ic_n3
+-- Description: Configuration for tb_tst_rlink_cuff_ic_n3 for
+-- tb_nexys3_fusp_cuff
+--
+-- Dependencies: sys_tst_rlink_cuff_n3 (fx2_type = 'ic2')
+--
+-- To test: sys_tst_rlink_cuff_n3 (fx2_type = 'ic2')
+--
+-- Verified:
+-- Date Rev Code ghdl ise Target Comment
+-- 2013-01-xx xxx - 0.29 13.3 O76d xc6slx16-2 u:???
+--
+-- Revision History:
+-- Date Rev Version Comment
+-- 2013-04-27 512 1.0 Initial version
+------------------------------------------------------------------------------
+
+configuration tb_tst_rlink_cuff_ic_n3 of tb_nexys3_fusp_cuff is
+
+ for sim
+ for all : nexys3_fusp_cuff_aif
+ use entity work.sys_tst_rlink_cuff_n3;
+ end for;
+ end for;
+
+end tb_tst_rlink_cuff_ic_n3;
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/Makefile
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/Makefile (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/Makefile (revision 21)
@@ -0,0 +1,32 @@
+# $Id: Makefile 512 2013-04-28 07:44:02Z mueller $
+#
+# Revision History:
+# Date Rev Version Comment
+# 2013-04-27 512 1.0 Initial version
+#
+EXE_all = tb_tst_rlink_cuff_ic_n3
+#
+include $(RETROBASE)/rtl/make/xflow_default_nexys3.mk
+#
+.PHONY : all all_ssim all_tsim clean
+#
+all : $(EXE_all)
+all_ssim : $(EXE_all:=_ssim)
+all_tsim : $(EXE_all:=_tsim)
+#
+clean : ise_clean ghdl_clean
+ rm -f sys_tst_rlink_cuff_ic_n3.ucf
+#
+#-----
+#
+include $(RETROBASE)/rtl/make/generic_ghdl.mk
+include $(RETROBASE)/rtl/make/generic_xflow.mk
+#
+VBOM_all = $(wildcard *.vbom)
+#
+ifndef DONTINCDEP
+include $(VBOM_all:.vbom=.dep_xst)
+include $(VBOM_all:.vbom=.dep_ghdl)
+include $(wildcard *.o.dep_ghdl)
+endif
+#
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/.cvsignore
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/.cvsignore (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/.cvsignore (revision 21)
@@ -0,0 +1,6 @@
+tb_tst_rlink_cuff_ic_n3
+tb_tst_rlink_cuff_ic_n3_[sft]sim
+rlink_cext_fifo_rx
+rlink_cext_fifo_tx
+rlink_cext_conf
+*.dep_ucf_cpp
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/tb_tst_rlink_cuff_ic_n3.vbom
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/tb_tst_rlink_cuff_ic_n3.vbom (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb/tb_tst_rlink_cuff_ic_n3.vbom (revision 21)
@@ -0,0 +1,7 @@
+# configure tb_nexsy3_fusp_cuff with sys_tst_rlink_cuff_n3 target;
+# use vhdl configure file (tb_tst_rlink_cuff_ic_n3.vhd) to allow
+# that all configurations will co-exist in work library
+${nexys3_fusp_cuff_aif := ../sys_tst_rlink_cuff_ic_n3.vbom}
+sys_conf = sys_conf_sim.vhd
+../../../../../bplib/nexys3/tb/tb_nexys3_fusp_cuff.vbom
+tb_tst_rlink_cuff_ic_n3.vhd
Index: w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb
===================================================================
--- w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb (nonexistent)
+++ w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb (revision 21)
w11/trunk/rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb
Property changes :
Added: svn:ignore
## -0,0 +1,38 ##
+*.dep_ghdl
+*.dep_isim
+*.dep_xst
+work-obj93.cf
+*.vcd
+*.ghw
+*.sav
+*.tmp
+*.exe
+ise
+xflow.his
+*.ngc
+*.ncd
+*.pcf
+*.bit
+*.msk
+isim
+isim.log
+isim.wdb
+fuse.log
+*_[sft]sim.vhd
+*_tsim.sdf
+*_xst.log
+*_tra.log
+*_twr.log
+*_map.log
+*_par.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
+tb_tst_rlink_cuff_ic_n3
+tb_tst_rlink_cuff_ic_n3_[sft]sim
+rlink_cext_fifo_rx
+rlink_cext_fifo_tx
+rlink_cext_conf
+*.dep_ucf_cpp
Index: w11/trunk/doc/INSTALL.txt
===================================================================
--- w11/trunk/doc/INSTALL.txt (revision 20)
+++ w11/trunk/doc/INSTALL.txt (revision 21)
@@ -1,4 +1,4 @@
-# $Id: INSTALL.txt 511 2013-04-27 13:51:46Z mueller $
+# $Id: INSTALL.txt 512 2013-04-28 07:44:02Z mueller $
Guide to install and build w11a systems, test benches and support software
@@ -374,6 +374,11 @@
cd $RETROBASE/rtl/sys_gen/tst_rlink_cuff/nexys2/ic
make sys_tst_rlink_cuff_ic_n2.bit
+ b. for Digilent Nexys3 board
+
+ cd $RETROBASE/rtl/sys_gen/tst_rlink_cuff/nexys3/ic
+ make sys_tst_rlink_cuff_ic_n3.bit
+
3. w11a systems
a. for Digilent S3BOARD
/w11/trunk/doc/w11a_os_guide.txt
1,15 → 1,17
# $Id: w11a_os_guide.txt 511 2013-04-27 13:51:46Z mueller $ |
# $Id: w11a_os_guide.txt 518 2013-05-12 16:45:02Z mueller $ |
|
Guide to run operating system images on w11a systems |
|
Table of content: |
|
1. I/O emulation setup |
2. FPGA Board setup |
3. Unix V5 system |
4. 2.11BSD system |
1. I/O emulation setup |
2. FPGA Board setup |
3. Rlink and Backend Server setup |
4. simh simulator setup |
5. oskits |
a. Unix systems |
b. DEC operating systems |
|
|
1. I/O emulation setup ---------------------------------------------------- |
|
All UNIBUS peripherals which exchange data (currently DL11, LP11, PC11, RK11) |
16,6 → 18,11
are currently emulated via a backend process. The communication between |
FPGA board and backend server can be via |
|
- Direct USB connection using a Cypress FX2 USB controller |
- is supported on the nexys2 and nexys3 FPGA boards |
- much faster than serial port connections (see below) |
- also allows to configure the FPGA over the same USB connection |
|
- Serial port |
- via direct (/dev/ttySx) or via a USB-RS232 adapter. A direct connection |
is limited to 115k Baud on most PCs, while a connection via a USB-RS232 |
24,15 → 31,10
- via integrated USB-RS232 adapter, like on nexys3 board. This is much |
faster, allows bitrates up to 2 M Baud. |
|
Notes: - A USB-RS232 cable with a Prolific Technology PL2303 chip simply |
Notes: - A USB-RS232 cable with a FTDI FT232R chip, like the cable offered |
by FTDI as US232R-100 works fine. |
- A USB-RS232 cable with a Prolific Technology PL2303 chip simply |
never gave reliable connections for higher Baud rates. |
- A USB-RS232 cable with a FTDI FT232R chip, like the cable offered |
by FTDI as US232R-100 worked fine. |
- On older linux kernels (prior 2.6.32) it is essential to set the |
latency timer for the FTDI USB-RS232 cable to 1 ms (from the |
power up default of 16 ms), e.g. with |
sudo $RETROBASE/tools/bin/set_ftdi_lat USB0 1 |
For linux kernel 2.6.32 or newer the default is 1 ms already. |
- The rest assumes that a USB-RS232 cable with FTDI chip is used |
- A 460k Baud connection gives in practice a disk throughput of |
about 20 kB/s. This allows to test the system but is a bit slow |
39,193 → 41,154
to real usage. In an OS with good disk caching like 2.11BSD the |
impact of such a 'slow disk' is actually smaller than the bare |
numbers suggest. |
- On older linux kernels (prior 2.6.32) it is essential to set the |
latency timer for the FTDI USB-RS232 cable to 1 ms (from the |
power up default of 16 ms), e.g. with |
sudo $RETROBASE/tools/bin/set_ftdi_lat USB0 1 |
For linux kernel 2.6.32 or newer the default is 1 ms already. |
|
- Direct USB connection using a Cypress FX2 USB controller |
- is supported on the nexys2 and nexys3 FPGA boards |
- clearly much faster than serial port connections |
- also allows to configure the FPGA over the same USB connection |
|
2. FPGA Board setup ------------------------------------------------------- |
|
- Using serial port |
- Using Cypress FX2 USB controller for configuration and rlink communication |
- for nexys2 |
- connect USB cable to mini-USB connector (between RS232 and PS/2 port) |
- for nexys3 |
- connect USB cable to micro-USB connector labeled 'USB PROG' |
|
- Using serial port for rlink communication |
- for s3board and nexys2 |
- connect the USB-RS232 cable to the RS232 port of the s3board or nexys2 |
- for kernel < 2.6.32: set the latency timer of the USB-RS232, e.g. with |
sudo $RETROBASE/tools/bin/set_ftdi_lat USB0 1 |
- ensure that all 8 switches are in the indicated positions (SWI=...) |
- load the w11a design into the FPGA, e.g. via impact |
- connect the USB-RS232 cable to the RS232 port |
- for nexys3 |
- connect USB cable to the 'usb uart' port (next to the 5 buttons) |
- ensure that all 8 switches are in the indicated positions (SWI=...) |
- load the w11a design into the FPGA, e.g. via impact |
- connect USB cable to the micro-USB connector 'UART' |
(next to the 5 buttons) |
- connect a JTAG programmer (e.g. Xilinx USB Cable II) to JTAG pins |
|
- Using Cypress FX2 USB controller |
- for nexys2 |
- connect USB cable to mini-USB connector (between RS232 and PS/2 port) |
! Must be connected to a USB port able to deliver 500 mA ! |
- Configure the FPGA |
- if Cypress FX2 port is connected load design with |
make <sys>.jconfig |
- otherwise use impact with |
make <sys>.iconfig |
|
3. Unix V5 system --------------------------------------------------------- |
3. Rlink and Backend Server setup ----------------------------------------- |
|
- A disk set is available from |
http://www.retro11.de/data/oc_w11/unix_v5_rkset.tgz |
Download, unpack and copy the disk images (*.dsk) to |
$RETROBASE/rtl/sys_gen/w11a/tb |
All examples below use the same basic setup |
|
- Using old (pi_rri) backend server (serial port only) |
- setup vt100 emulator windows |
|
cd $RETROBASE/rtl/sys_gen/w11a/tb |
cd $RETROBASE/tools/oskit/<oskit-name> |
telnet_starter -d DL0 & |
telnet_starter -d DL1 & |
|
[for s3,n2:] |
SWI = 00000010 |
dorri -u0,460,1,2 @uv5_boot.pcmd |
[for n3:] |
SWI = 00000010 |
dorri -u0,2000,1,2 @uv5_boot.pcmd |
- setup rlink connection using ti_rri backend server via the ti_w11 |
quick start wrapper script. Ensure that all 8 switches on the board |
are in the indicated positions (SWI=...). The concrete boot script |
name <boot-script> is given in the following sections |
|
- Using new (ti_rri) backend server (serial and fx2 supported) |
[for n2,n3 over fx2:] |
SWI = 00000100 |
ti_w11 -u @<oskit-name>_boot.tcl |
|
cd $RETROBASE/rtl/sys_gen/w11a/tb |
telnet_starter -d DL0 & |
|
[for s3,n2 over serial:] |
SWI = 00000010 |
torri -tu0,460k,break,xon @uv5_boot.tcl |
ti_w11 -tu0,460k,break,xon @<oskit-name>_boot.tcl |
[for n3 over serial:] |
SWI = 00000010 |
torri -tu0,2M,break,xon @uv5_boot.tcl |
ti_w11 -tu0,2M,break,xon @<oskit-name>_boot.tcl |
|
4. simh simulator setup --------------------------------------------------- |
|
[for n2,n3 over fx2:] |
SWI = 00000100 |
torri -u @uv5_boot.tcl |
Sometimes it is good to compare the w11a behaviour with the PDP-11 software |
emulator from the simh project (see http://simh.trailing-edge.com/). |
|
- the boot dialog in the console xterm window will look like |
(required input is in {..}, with {<CR>} denoting a carriage return: |
Under $RETROBASE/tools/simh two setup files are provided with configure |
simh to reflect the w11a setup as close as possible: |
- setup_w11a_min.scmd |
Very close the current w11a state when it runs on an S3BOARD |
- processor: 11/70, no FPP, 1 Mbyte |
- periphery: 2 DL11, LP11, RK11, PC11 |
- setup_w11a_max.scmd |
Planned configuration for the w11a, in addition |
- processor: 4 Mbyte memory (as on Nexys2, Nexys3,...) |
- periphery: DZ11, RL11/RL02, RK70/RP06, TM11/TU10 |
|
@{unix} |
|
login: {root} |
Startup scripts are provided with each oskit. They call the w11a_max |
configuration, so will show in the emulator what w11a can do when |
finished. |
|
Now you are at the shell prompt and can excercise the system, e.g. |
All examples below use the same basic setup |
|
# {ls -al} |
total 62 |
drwxr-xr-x 9 bin 160 Jan 29 16:14 . |
drwxr-xr-x 9 bin 160 Jan 29 16:14 .. |
drwxr-xr-x 2 bin 944 Nov 26 18:13 bin |
drwxr-xr-x 2 bin 80 Nov 26 18:13 dev |
drwxr-xr-x 2 bin 240 Mar 21 12:07 etc |
drwxr-xr-x 2 bin 224 Nov 26 18:13 lib |
drwxr-xr-x 2 bin 32 Nov 26 18:13 mnt |
drwxrwxrwx 2 bin 32 Nov 26 18:13 tmp |
-rwxrwxrwx 1 bin 25802 Mar 21 12:07 unix |
drwxr-xr-x 14 bin 224 Nov 26 18:13 usr |
- setup vt100 emulator window for 2nd DL11 |
|
There is no 'halt' or 'shutdown' command, just ^D out of the server |
session. The disks aren't cached, so no need to sync either. |
cd $RETROBASE/tools/oskit/<oskit-name> |
telnet_starter -d -s DL1 & |
|
4. 2.11BSD system --------------------------------------------------------- |
- A disk set is available from |
http://www.retro11.de/data/oc_w11/211bsd_rkset.tgz |
Download, unpack and copy the disk images (*.dsk) to |
$RETROBASE/rtl/sys_gen/w11a/tb |
{Note: the -s ensures that the port numbers used by simh are taken!} |
|
- Using old (pi_rri) backend server (serial port only) |
- start the simulator |
|
cd $RETROBASE/rtl/sys_gen/w11a/tb |
sudo $RETROBASE/tools/bin/set_ftdi_lat USB0 1 |
telnet_starter -d DL0 & |
telnet_starter -d DL1 & |
pdp11 <oskit-name>_boot.scmd |
|
[for s3,n2:] |
SWI = 00000010 |
dorri -u0,460,1,2 @211bsd_rk_boot.pcmd |
[for n3:] |
SWI = 00000010 |
dorri -u0,2000,1,2 @211bsd_rk_boot.pcmd |
5. oskits ----------------------------------------------------------------- |
|
- Using new (ti_rri) backend server (serial and fx2 supported) |
Ready to be used 'oskits' are provided under |
$RETROBASE/tools/oskit/<oskit-name> |
|
cd $RETROBASE/rtl/sys_gen/w11a/tb |
telnet_starter -d DL0 & |
The tarballs with the disk images are provided from a web server |
and have to be installed separately. |
|
[for s3,n2 over serial:] |
SWI = 00000010 |
torri -tu0,460k,break,xon @211bsd_rk_boot.tcl |
[for n3 over serial:] |
SWI = 00000010 |
torri -tu0,2M,break,xon @211bsd_rk_boot.tcl |
5a. Unix systems ----------------------------------------------------- |
|
[for n2,n3 over fx2:] |
SWI = 00000100 |
torri -u @211bsd_rk_boot.tcl |
Legal and license issues: |
|
- the boot dialog in the console xterm window will look like |
(required input is in {..}, with {<CR>} denoting a carriage return: |
Ancient UNIX systems for the PDP-11 can now be freely used under the |
'Caldera license'. 2.11BSD was released 1992 under the 4 clause BSD |
license. Taken together |
|
70Boot from rk(0,0,0) at 0177404 |
: {<CR>} |
: rk(0,0,0)unix |
Boot: bootdev=03000 bootcsr=0177404 |
|
2.11 BSD UNIX #26: Thu Jan 1 19:49:13 PST 2009 |
root@curly.2bsd.com:/usr/src/sys/RETRONFPRK |
|
phys mem = 3932160 |
avail mem = 3577856 |
user mem = 307200 |
|
January 4 16:45:33 init: configure system |
|
dz ? csr 160100 vector 310 skipped: No CSR. |
lp 0 csr 177514 vector 200 attached |
rk ? csr 177400 vector 220 didn't interrupt. |
rl ? csr 174400 vector 160 skipped: No CSR. |
tm ? csr 172520 vector 224 skipped: No CSR. |
xp ? csr 176700 vector 254 skipped: No CSR. |
cn 1 csr 176500 vector 300 attached |
erase, kill ^U, intr ^C |
- Unix V1 to V7 |
- all BSD Unix versions for PDP-11 |
|
In first '#' prompt the system is in single-user mode. Just enter a ^D |
to continue the system startup to multi-user mode: |
can be freely distributed and used for non-commercial purposes. |
|
#^D |
checking quotas: done. |
Assuming non-networking system ... |
checking for core dump... |
preserving editor files |
clearing /tmp |
standard daemons: update cron accounting. |
starting lpd |
starting local daemons:Sun Jan 4 16:46:37 PST 2009 |
January 4 16:46:37 init: kernel security level changed from 0 to 1 |
January 4 16:46:40 getty: /dev/tty01: Device not configured |
... |
|
2.11 BSD UNIX (curly.2bsd.com) (console) |
|
login: {root} |
erase, kill ^U, intr ^C |
Two oskits are currently provided: |
|
Now the system is in multi-user mode, daemons runnng. You can explore |
the system, e.g. with a 'pstat -T' or a 'mount' command. At end is |
important to shutdown properly with a 'halt': |
- unix-v5_rk: Unix V5 System on RK05 |
- 211bsd_rk: 2.11BSD system on RK05 |
|
For further details consult the README_<oskit-name>set.txt file in the |
oskit directory. |
|
# {pstat -T} |
7/186 files |
39/208 inodes |
11/150 processes |
6/ 46 texts active, 28 used |
2/135 swapmap entries, 366 kB used, 2069 kB free, 2063 kB max |
33/150 coremap entries, 2960 kB free, 2867 kB max |
1/ 10 ub_map entries, 10 free, 10 max |
# {mount} |
/dev/rk0h on / |
/dev/rk2h on /tmp |
/dev/rk3h on /bin |
/dev/rk4h on /usr |
# {halt} |
syncing disks... done |
halting |
5b. DEC operating systems -------------------------------------------- |
|
Legal and license issues: |
|
Now the server process can be stopped with ^D. |
Unfortunately there is no general hobbyist license for DEC operating |
systems for PDP-11 computers. The 'Mentec license' commonly understood |
to cover the some older versions of DEC operating systems, for example |
- RT-11 V5.3 or prior |
- RSX-11M V4.3 or prior |
- RSX-11M PLUS V3.0 or prior |
on software simulators, most notably on the 'simh' suite. |
|
HOWEVER: THIS LICENSE DOES NOT COVER THE USAGE OF THESE HISTORIC DEC |
OPERATING SYSTEMS ON ANY 'REAL HARDWARE' IMPLEMENTATION OF A |
PDP-11. SO USAGE ON THE W11 IS *NOT* COVERED BY THE |
'Mentec-license'. |
|
Some oskits are provided with systems sysgen'ed to run on a configuration |
like the w11a. |
|
- Feel free to explore them with the simh simulator. |
The boot scripts for simh are included ( <kit>.simh ) |
|
- In case you happen to have a valid license feel free to try them |
out the W11A and let the author know whether is works as it should. |
For convenience the boot scripts are also included ( <kit>.tcl ). |
|
Three oskits are currently provided |
|
- rsx11m-31_rk: RSX-11M V3.1 on RK05 |
- rsx11m-40_rk: RSX-11M V4.0 on RK05 |
- rt11-40_rk: RT-11 V4.0 on RK05 |
|
For further details consult the README_<oskit-name>set.txt file in the |
oskit directory. |
/w11/trunk/doc/README.txt
1,4 → 1,4
# $Id: README.txt 511 2013-04-27 13:51:46Z mueller $ |
# $Id: README.txt 518 2013-05-12 16:45:02Z mueller $ |
|
Release notes for w11a |
|
35,7 → 35,7
rtl/ibus - ibus devices (UNIBUS peripherals) |
rtl/sys_gen - top level designs |
rtl/sys_gen/tst_fx2loop - top level designs for Cypress FX2 tester |
nexys2 - systems for Nexsy2 |
nexys2,nexys3 - systems for Nexsy2,Nexsy3 |
rtl/sys_gen/tst_rlink - top level designs for an rlink tester |
nexys2,nexys3,s3board - systems for Nexsy2,Nexsy3,S3BOARD |
rtl/sys_gen/tst_rlink_cuff - top level designs for rlink over FX2 tester |
67,6 → 67,8
tools/fx2/bin - pre-build firmware images in .ihx format |
tools/fx2/src - C and asm sources |
tools/fx2/sys - udev rules for USB on fpga eval boards |
tools/oskit - setup files for Operation System kits |
tools/oskit/... - several PDP-11 system kits available |
tools/src - C++ sources for rlink backend software |
tools/src/librlink - basic rlink interface |
tools/src/librlinktpp - C++ to tcl binding for rlink interface |
80,6 → 82,39
|
3. Change Log ---------------------------------------------------------------- |
|
- trunk (2013-05-12: svn rev 21(oc) 518(wfjm); untagged w11a_V0.58) +++++++++ |
|
- Summary |
- C++ and Tcl based backend server now fully functional, supports with |
DL11, RK11, LP11 and PC11 all devices available in w11a designs |
- the old perl based backend server (pi_rri) is obsolete and removed |
- operating system kits reorganized |
|
- New features |
- new directory trees for |
- tools/oskit - operating system kits |
- new modules |
- tools/src/librw11 |
- Rw11*LP11 - classes for LP11 printer handling |
- Rw11*PC11 - classes for PC11 paper tape handling |
- Rw11*Stream* - classes for Virtual stream handling |
- tools/src/librwxxtpp |
- RtclRw11*LP11 - tcl iface for LP11 printer handling |
- RtclRw11*PC11 - tcl iface for PC11 paper tape handling |
- RtclRw11*Stream* - tcl iface for Virtual Stream handling |
|
- Changes |
- renames |
- the w11 backend quick starter now named ti_w11 and under tools/bin |
(was rtl/sys_gen/w11a/tb/torri) |
- all operating system image related material now under |
tools/oskit (was under rtl/sys_gen/w11a/tb) |
|
- Bug fixes |
- rtl/ibus/ibdr_lp11 - err flag logic fixed, was cleared in ibus racc read |
- rtl/ibus/ibdr_pc11 - rbuf logic fixed. Was broken since ibus V2 update |
in V0.51! Went untested because pc11 rarely used. |
|
- trunk (2013-04-27: svn rev 20(oc) 511(wfjm); untagged w11a_V0.57) +++++++++ |
|
- Summary |
/w11/trunk/doc/w11a_known_issues.txt
1,4 → 1,4
# $Id: w11a_known_issues.txt 317 2010-07-22 19:36:56Z mueller $ |
# $Id: w11a_known_issues.txt 516 2013-05-05 21:24:52Z mueller $ |
|
Summary of known issues for w11a CPU and systems |
|
34,7 → 34,7
device would see it. The w11a doesn't implement this remapping, an access |
in the range 17000000:17757777 causes a NXM fault. |
|
All four points relate to very 11/70 specific behaviour, not operating system |
All four points relate to very 11/70 specific behaviour, no operating system |
depends on them, therefore they are considered acceptable implementation |
differences |
|
/w11/trunk/Makefile
1,4 → 1,4
# $Id: Makefile 489 2013-02-17 10:58:02Z mueller $ |
# $Id: Makefile 513 2013-05-01 14:02:06Z mueller $ |
# |
# 'Meta Makefile' for whole retro project |
# allows to make all synthesis targets |
6,6 → 6,7
# |
# Revision History: |
# Date Rev Version Comment |
# 2013-05-01 513 1.0.6 add clean_sim_tmp and clean_syn_tmp targets |
# 2012-12-29 466 1.0.5 add tst_rlink_cuff |
# 2011-12-26 445 1.0.4 add tst_fx2loop |
# 2011-12-23 444 1.0.3 enforce -j 1 in sub-makes |
15,6 → 16,8
# |
SYN_all += rtl/sys_gen/tst_fx2loop/nexys2/ic |
SYN_all += rtl/sys_gen/tst_fx2loop/nexys2/ic3 |
SYN_all += rtl/sys_gen/tst_fx2loop/nexys3/ic |
SYN_all += rtl/sys_gen/tst_fx2loop/nexys3/ic3 |
SYN_all += rtl/sys_gen/tst_rlink/nexys2 |
SYN_all += rtl/sys_gen/tst_rlink/nexys3 |
SYN_all += rtl/sys_gen/tst_rlink/s3board |
38,6 → 41,7
SIM_all += rtl/sys_gen/tst_rlink/nexys3/tb |
SIM_all += rtl/sys_gen/tst_rlink/s3board/tb |
SIM_all += rtl/sys_gen/tst_rlink_cuff/nexys2/ic/tb |
SIM_all += rtl/sys_gen/tst_rlink_cuff/nexys3/ic/tb |
SIM_all += rtl/sys_gen/tst_serloop/nexys2/tb |
SIM_all += rtl/sys_gen/tst_serloop/nexys3/tb |
SIM_all += rtl/sys_gen/tst_serloop/s3board/tb |
48,7 → 52,8
SIM_all += rtl/vlib/serport/tb |
SIM_all += rtl/w11a/tb |
# |
.PHONY : all clean clean_sim clean_sym all_sim all_syn |
.PHONY : all all_sim all_syn |
.PHONY : clean clean_sim clean_sim_tmp clean_sym clean_sym_tmp |
.PHONY : $(SYN_all) $(SIM_all) |
# |
all : |
59,6 → 64,8
@echo " make clean" |
@echo " make clean_sim" |
@echo " make clean_syn" |
@echo " make clean_sim_tmp" |
@echo " make clean_syn_tmp" |
@echo " for tool/documentation generation use:" |
@echo " make -j 4 all_lib" |
@echo " make clean_lib" |
73,6 → 80,11
clean_syn : |
for dir in $(SYN_all); do $(MAKE) -C $$dir clean; done |
# |
clean_sim_tmp : |
for dir in $(SIM_all); do $(MAKE) -C $$dir ghdl_tmp_clean; done |
clean_syn_tmp : |
for dir in $(SYN_all); do $(MAKE) -C $$dir ise_tmp_clean; done |
# |
all_sim : $(SIM_all) |
# |
all_syn : $(SYN_all) |