URL
https://opencores.org/ocsvn/w11/w11/trunk
Subversion Repositories w11
Compare Revisions
- This comparison shows the changes necessary to convert path
/w11/trunk
- from Rev 10 to Rev 9
- ↔ Reverse comparison
Rev 10 → Rev 9
/tools/make/generic_dep.mk
File deleted
/tools/make/generic_so.mk
File deleted
/tools/make/generic_cpp.mk
File deleted
tools/make
Property changes :
Deleted: svn:ignore
## -1,32 +0,0 ##
-*.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: tools/tcl/rbtest/test_attn.tcl
===================================================================
--- tools/tcl/rbtest/test_attn.tcl (revision 10)
+++ tools/tcl/rbtest/test_attn.tcl (nonexistent)
@@ -1,87 +0,0 @@
-# $Id: test_attn.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-20 372 0.1 First Draft
-#
-
-package provide rbtest 1.0
-
-package require rutiltpp
-package require rutil
-package require rlink
-
-namespace eval rbtest {
- #
- # Test with stat connectivity of the cntl register.
- #
- proc test_attn {{attnmsk 0x0}} {
- # quit if nothing to do...
- if {$attnmsk == 0} {return 0}
- #
- set esdval 0x00
- set esdmsk [regbld rlink::STAT {stat -1} attn]
- #
- set apats {}
- for {set i 0} {$i < 16} {incr i} {
- set apat [expr 1 << $i]
- if {[expr $apat & $attnmsk]} {lappend apats $apat}
- }
- #
- set errcnt 0
- rlc errcnt -clear
- #
- rlc log "rbtest::test_attn - init: clear regs and attn flags"
- rlc exec -init te.cntl [regbld rbtest::INIT cntl data fifo]
- rlc exec -attn
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 1: verify connection of attn bits"
- foreach apat $apats {
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.attn $apat \
- -rreg te.attn -estat [regbld rlink::STAT attn] \
- -attn -edata $apat \
- -rreg te.attn -estat 0x0
- }
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 2: verify that attn flags accumulate"
- foreach apat $apats {
- rlc exec -wreg te.attn $apat -estat $esdval $esdmsk
- }
- rlc exec -attn -edata $attnmsk -estat $esdval $esdmsk
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 3: verify that comma is send"
- set apat [lindex $apats 0]
- rlc exec -init 0xff [regbld rlink::INIT anena] -estat $esdval $esdmsk
- rlc exec -wreg te.attn $apat -estat $esdval $esdmsk
- rlc wtlam 1.
- rlc exec -attn -edata $apat -estat $esdval $esdmsk
-
- #
- #-------------------------------------------------------------------------
- rlc log "rbtest::test_attn - cleanup: clear regs and attn flags"
- rlc exec -init te.cntl [regbld rbtest::INIT cntl data fifo]
- rlc exec -attn
- #
- incr errcnt [rlc errcnt -clear]
- return $errcnt
- }
-}
Index: tools/tcl/rbtest/test_all.tcl
===================================================================
--- tools/tcl/rbtest/test_all.tcl (revision 10)
+++ tools/tcl/rbtest/test_all.tcl (nonexistent)
@@ -1,35 +0,0 @@
-# $Id: test_all.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-13 369 0.1 First draft
-#
-
-package provide rbtest 1.0
-
-namespace eval rbtest {
- #
- # Driver for all rbtest tests
- #
- proc test_all {{statmsk 0x0} {attnmsk 0x0}} {
- #
- set errcnt 0
- incr errcnt [rbtest::test_data]
- incr errcnt [rbtest::test_fifo]
- incr errcnt [rbtest::test_stat $statmsk]
- incr errcnt [rbtest::test_attn $attnmsk]
- return $errcnt
- }
-}
Index: tools/tcl/rbtest/test_data.tcl
===================================================================
--- tools/tcl/rbtest/test_data.tcl (revision 10)
+++ tools/tcl/rbtest/test_data.tcl (nonexistent)
@@ -1,162 +0,0 @@
-# $Id: test_data.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-13 369 0.1 First Draft
-#
-
-package provide rbtest 1.0
-
-package require rutiltpp
-package require rutil
-package require rlink
-
-namespace eval rbtest {
- #
- # Basic tests with cntl and data registers.
- # All tests depend only on rbd_tester logic alone and not on how the
- # rbd_tester is embedded in the design (e.g. stat and attn connections)
- #
- proc test_data {} {
- set esdval 0x00
- set esdmsk [regbld rlink::STAT {stat -1}]
- #
- set errcnt 0
- rlc errcnt -clear
- #
- rlc log "rbtest::test_data - init: clear cntl, data, and fifo"
- # Note: fifo clear via init is tested later, used here 'speculatively'
- rlc exec -init te.cntl [regbld rbtest::INIT fifo data cntl]
- #
- #-------------------------------------------------------------------------
- rlc log " test 1a: cntl, data are write- and read-able"
- foreach {addr valw valr} [list te.cntl 0xffff 0xf3ff \
- te.cntl 0x0000 0x0000 \
- te.data 0xffff 0xffff \
- te.data 0x0000 0x0000 ] {
- rlc exec -wreg $addr $valw -estat $esdval $esdmsk
- rlc exec -rreg $addr -edata $valr -estat $esdval $esdmsk
- }
- #
- #
- rlc log " test 1b: as test 1a, now use clists and check cntl/data distinct"
- foreach {valc vald} [list 0x0000 0x0000 [regbld rbtest::CNTL nofifo] 0xffff] {
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $valc \
- -wreg te.data $vald \
- -rreg te.cntl -edata $valc \
- -rreg te.data -edata $vald
- }
- #
- #
- 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 ) ]
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $valc \
- -wreg te.data $vald \
- -rreg te.cntl -edata $valc \
- -rreg te.data -edata $vald
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 2: cntl.nbusy is write- and readable (last nbusy=0 again)"
- foreach nbusy {0x00f 0x0ff 0x3ff 0x000} {
- set valc [regbld rbtest::CNTL [list nbusy $nbusy]]
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $valc \
- -rreg te.cntl -edata $valc
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 3: verify that large nbusy causes timeout"
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.data 0xdead \
- -rreg te.data -edata 0xdead \
- -wreg te.cntl [regbld rbtest::CNTL {nbusy 0x3ff}] \
- -wreg te.data 0xbeaf -estat [regbld rlink::STAT rbnak] $esdmsk \
- -rreg te.data -estat [regbld rlink::STAT rbnak] $esdmsk \
- -wreg te.cntl 0x0000 \
- -rreg te.data -edata 0xdead -edata 0xdead
- #
- # -------------------------------------------------------------------------
- rlc log " test 4a: verify that init 001 clears cntl and not data"
- set valc [regbld rbtest::CNTL nofifo {stat 0x3}]
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $valc \
- -wreg te.data 0x1234 \
- -init te.cntl [regbld rbtest::INIT cntl] \
- -rreg te.cntl -edata 0x0 \
- -wreg te.data 0x1234
- rlc log " test 4b: verify that init 010 clears data and not cntl"
- set valc [regbld rbtest::CNTL {stat 0x7}]
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $valc \
- -wreg te.data 0x4321 \
- -init te.cntl [regbld rbtest::INIT data] \
- -rreg te.cntl -edata $valc \
- -wreg te.data 0x0
- rlc log " test 4c: verify that init 011 clears data and cntl"
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl [regbld rbtest::CNTL nofifo {stat 0x7} {nbusy 2}] \
- -wreg te.data 0xabcd \
- -init te.cntl [regbld rbtest::INIT data cntl] \
- -rreg te.cntl -edata 0x0 \
- -wreg te.data 0x0
- #
- # -------------------------------------------------------------------------
- rlc log " test 5: test that te.attn returns # of cycles for te.data w&r"
- foreach nbusy {0x03 0x07 0x0f 0x1f 0x00} {
- 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 ]
- }
- #
- # -------------------------------------------------------------------------
- rlc log " test 6: verify stat command after te.data wreg & rreg"
- set rlist [rlc exec -rlist -estatdef $esdval $esdmsk \
- -wreg te.data 0x1234 \
- -stat ]
- #rlist like: {wreg 90 23 0} {stat 4 39 0 90 1}
- set xreg_ccode [lindex $rlist 0 1]
- set stat_ccode [lindex $rlist 1 4]
- if {$xreg_ccode != $stat_ccode} {
- rlc log " ---- stat ccmd mismatch, d=[pbvi o8 $xreg_ccode]! D=[pbvi o8 $stat_ccode] FAIL"
- incr errcnt
- }
- set rlist [rlc exec -rlist -estatdef $esdval $esdmsk \
- -rreg te.data -edata 0x1234 \
- -stat -edata 0x1234]
- #rlist like: {rreg 72 23 0 4660} {stat 12 39 0 72 4660}
- set xreg_ccode [lindex $rlist 0 1]
- set stat_ccode [lindex $rlist 1 4]
- if {$xreg_ccode != $stat_ccode} {
- rlc log " ---- stat ccmd mismatch, d=[pbvi o8 $xreg_ccode]! D=[pbvi o8 $stat_ccode] FAIL"
- incr errcnt
- }
- #
- #-------------------------------------------------------------------------
- rlc log "rbtest::test_data - cleanup: clear cntl and data"
- rlc exec -init te.cntl [regbld rbtest::INIT data cntl]
- #
- incr errcnt [rlc errcnt -clear]
- return $errcnt
- }
-}
Index: tools/tcl/rbtest/test_stat.tcl
===================================================================
--- tools/tcl/rbtest/test_stat.tcl (revision 10)
+++ tools/tcl/rbtest/test_stat.tcl (nonexistent)
@@ -1,61 +0,0 @@
-# $Id: test_stat.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-20 372 0.1 First Draft
-#
-
-package provide rbtest 1.0
-
-package require rutiltpp
-package require rutil
-package require rlink
-
-namespace eval rbtest {
- #
- # Test with stat connectivity of the cntl register.
- #
- proc test_stat {{statmsk 0x0}} {
- # quit if nothing to do...
- if {$statmsk == 0} {return 0}
-
- #
- set errcnt 0
- rlc errcnt -clear
- #
- rlc log "rbtest::test_stat - init: clear cntl"
- rlc exec -init te.cntl [regbld rbtest::INIT cntl]
- #
- #-------------------------------------------------------------------------
- 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 cntl [regbld rbtest::CNTL [list stat $spat]]
- rlc exec \
- -wreg te.cntl $cntl \
- -rreg te.cntl -edata $cntl \
- -estat [regbld rlink::STAT [list stat $spat]]
- }
- }
- #
- #-------------------------------------------------------------------------
- rlc log "rbtest::test_stat - cleanup: clear cntl"
- rlc exec -init te.cntl [regbld rbtest::INIT cntl]
- #
- incr errcnt [rlc errcnt -clear]
- return $errcnt
- }
-}
Index: tools/tcl/rbtest/.cvsignore
===================================================================
--- tools/tcl/rbtest/.cvsignore (revision 10)
+++ tools/tcl/rbtest/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-pkgIndex.tcl
Index: tools/tcl/rbtest/util.tcl
===================================================================
--- tools/tcl/rbtest/util.tcl (revision 10)
+++ tools/tcl/rbtest/util.tcl (nonexistent)
@@ -1,165 +0,0 @@
-# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-13 369 0.1 Frist draft
-#
-
-package provide rbtest 1.0
-
-package require rutiltpp
-package require rutil
-package require rlink
-
-namespace eval rbtest {
- #
- # setup register descriptions for rbd_tester
- #
- regdsc CNTL {nofifo 15} {stat 14 3} {nbusy 9 10}
- regdsc INIT {fifo 2} {data 1} {cntl 0}
- #
- # 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]
- }
- #
- # init: reset rbd_tester (clear via init)
- #
- proc init {} {
- rlc exec -init te.cntl [regbld rbtest::INIT fifo data cntl]
- }
- #
- # nbusymax: returns maximal nbusy value not causing timeout
- #
- proc nbusymax {} {
- set esdmsk [regbld rlink::STAT {stat -1} attn]
- rlc exec -estatdef 0 $esdmsk \
- -rreg te.cntl sav_cntl \
- -wreg te.cntl [regbld rbtest::CNTL {nbusy -1}] \
- -rreg te.data -estat [regbld rlink::STAT rbnak] $esdmsk \
- -rreg te.attn ncyc
- rlc exec -estatdef 0 $esdmsk \
- -wreg te.cntl $sav_cntl
- return [expr $ncyc - 1]
- }
- #
- # probe: determine rbd_tester environment (max nbusy, stat and attn wiring)
- #
- proc probe {} {
- set esdval 0x00
- set esdmsk [regbld rlink::STAT {stat -1}]
- set esdmsknak [regbld rlink::STAT {stat -1} rbnak]
- set esdmskatt [regbld rlink::STAT {stat -1} attn]
- set rbusy {}
- set rstat {}
- set rattn {}
- #
- # probe max nbusy for write and read
- #
- set wrerr {}
- set rderr {}
- for {set i 3} { $i < 8 } {incr i} {
- set nbusy0 [expr ( 1 << $i )]
- for {set j -1} { $j <= 1 } {incr j} {
- set nbusy [expr $nbusy0 + $j]
- set valc [regbld rbtest::CNTL [list nbusy $nbusy]]
- rlc exec \
- -wreg te.cntl $valc -estat $esdval $esdmsk\
- -wreg te.data 0x0000 statwr -estat $esdval $esdmsknak \
- -rreg te.data dummy statrd -estat $esdval $esdmsknak
- if {[llength $wrerr] == 0 && [regget rlink::STAT(rbnak) $statwr] != 0} {
- lappend wrerr $i $j $nbusy
- }
- if {[llength $rderr] == 0 && [regget rlink::STAT(rbnak) $statrd] != 0} {
- lappend rderr $i $j $nbusy
- }
- }
- }
- rlc exec -init te.cntl [regbld rbtest::INIT fifo data cntl]
- lappend rbusy $wrerr $rderr
- #
- # probe stat wiring
- #
- for {set i 0} { $i < 3 } {incr 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
- lappend rstat [list $i [regget rlink::STAT(stat) $statrd]]
- }
- rlc exec -init te.cntl [regbld rbtest::INIT fifo data cntl]
- #
- # probe attn wiring
- #
- rlc exec -attn
- for {set i 0} { $i < 16 } {incr i} {
- rlc exec -estatdef $esdval $esdmskatt \
- -wreg te.attn [expr 1 << $i] \
- -attn attnpat
- lappend rattn [list $i $attnpat]
- }
- rlc exec -attn
- #
- return [list $rbusy $rstat $rattn]
- }
- #
- # probe_print: print probe results
- #
- proc probe_print {{plist {}}} {
- set rval {}
-
- if {[llength $plist] == 0} {
- set plist [probe]
- }
-
- set rbusy [lindex $plist 0]
- set rstat [lindex $plist 1]
- set rattn [lindex $plist 2]
- #
- append rval \
- "nbusy: write max [lindex $rbusy 0 2] --> WIDTH=[lindex $rbusy 0 0]"
- append rval \
- "\nnbusy: read max [lindex $rbusy 1 2] --> WIDTH=[lindex $rbusy 1 0]"
- #
- for {set i 0} { $i < 3 } {incr i} {
- set rcvpat [lindex $rstat $i 1]
- set rcvind [print_bitind $rcvpat]
- append rval [format "\nstat: te.cntl line %2d --> design %2d %s" \
- $i $rcvind [pbvi b3 $rcvpat]]
- }
- #
- for {set i 0} { $i < 16 } {incr i} {
- set rcvpat [lindex $rattn $i 1]
- set rcvind [print_bitind $rcvpat]
- append rval [format "\nattn: te.attn line %2d --> design %2d %s" \
- $i $rcvind [pbvi b16 $rcvpat]]
- }
- return $rval
- }
-
- #
- # print_bitind: helper for probe_print:
- #
- proc print_bitind {pat} {
- for {set i 0} { $i < 16 } {incr i} {
- if {[expr $pat & [expr 1 << $i]]} { return $i}
- }
- return -1
- }
-}
Index: tools/tcl/rbtest/test_fifo.tcl
===================================================================
--- tools/tcl/rbtest/test_fifo.tcl (revision 10)
+++ tools/tcl/rbtest/test_fifo.tcl (nonexistent)
@@ -1,179 +0,0 @@
-# $Id: test_fifo.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-13 369 0.1 First draft
-#
-
-package provide rbtest 1.0
-
-package require rutiltpp
-package require rutil
-package require rlink
-
-namespace eval rbtest {
- #
- # Basic tests with cntl and fifo registers.
- #
- proc test_fifo {} {
- set esdval 0x00
- set esdmsk [regbld rlink::STAT {stat -1}]
- #
- set errcnt 0
- rlc errcnt -clear
- #
- rlc log "rbtest::test_fifo - init: clear cntl, data, and fifo"
- # Note: fifo clear via init is tested later, used here 'speculatively'
- rlc exec -init te.cntl [regbld rbtest::INIT fifo data cntl]
- #
- #-------------------------------------------------------------------------
- rlc log " test 1: fifo write/read with wreg/rreg"
- # single word
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.fifo 0x0000 \
- -rreg te.fifo -estat 0x0000
- # three words
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.fifo 0xdead \
- -wreg te.fifo 0xbeaf \
- -wreg te.fifo 0x1234 \
- -rreg te.fifo -edata 0xdead \
- -rreg te.fifo -edata 0xbeaf \
- -rreg te.fifo -edata 0x1234
- #
- #-------------------------------------------------------------------------
- rlc log " test 2: fifo write/read with wblk/rblk"
- # two words
- set blk {0x1111 0x2222}
- rlc exec -estatdef $esdval $esdmsk \
- -wblk te.fifo $blk \
- -rblk te.fifo [llength $blk] -edata $blk
- # six words
- set blk {0x3333 0x4444 0x5555 0x6666 0x7777 0x8888}
- rlc exec -estatdef $esdval $esdmsk \
- -wblk te.fifo $blk \
- -rblk te.fifo [llength $blk] -edata $blk
- #
- #-------------------------------------------------------------------------
- rlc log " test 3a: fifo read error (write 3, read 4)"
- set blk {0xdead 0xbeaf 0x1234}
- rlc exec -estatdef $esdval $esdmsk \
- -wblk te.fifo $blk \
- -rblk te.fifo 4 -edata $blk -estat [regbld rlink::STAT rberr] $esdmsk
- #
- #
- 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 ) ]
- }
- rlc exec -estatdef $esdval $esdmsk \
- -wblk te.fifo $blk -estat [regbld rlink::STAT rberr] $esdmsk \
- -rblk te.fifo 16 -edata [lrange $blk 0 15]
- #
- #-------------------------------------------------------------------------
- rlc log " test 4a: verify that init 100 clears fifo ant not cntl&data"
- # check fifo empty; write a value; clear fifo via init; check fifo empty
- # check that cntl and data not affected
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl [regbld rbtest::CNTL {stat 0x7}] \
- -wreg te.data 0x1234 \
- -rreg te.fifo -estat [regbld rlink::STAT rberr] $esdmsk \
- -wreg te.fifo 0x4321 \
- -init te.cntl [regbld rbtest::INIT fifo] \
- -rreg te.fifo -estat [regbld rlink::STAT rberr] $esdmsk \
- -rreg te.cntl -edata [regbld rbtest::CNTL {stat 0x7}] \
- -rreg te.data -edata 0x1234
- #
- #
- rlc log " test 4b: verify fifo clear via nofifo flag in cntl"
- # write a value; set and clear nofifo flag in cntl; ckeck fifo empty
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.fifo 0x4321 \
- -wreg te.cntl [regbld rbtest::CNTL nofifo] \
- -wreg te.cntl 0x0000 \
- -rreg te.fifo -estat [regbld rlink::STAT rberr] $esdmsk
- #
- #-------------------------------------------------------------------------
- rlc log " test 5: verify that nofifo causes a rbnak on fifo access"
- # write fifo; set nofifo in cntl; write/read fifo(->rbnak);
- # clr nofifo in cntl; read fifo(->rberr)
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.fifo 0x12ab \
- -wreg te.cntl [regbld rbtest::CNTL nofifo] \
- -wreg te.fifo 0x12cd -estat [regbld rlink::STAT rbnak] $esdmsk \
- -rreg te.fifo -estat [regbld rlink::STAT rbnak] $esdmsk \
- -wreg te.cntl 0x0000 \
- -rreg te.fifo -estat [regbld rlink::STAT rberr] $esdmsk
- #
- #-------------------------------------------------------------------------
- rlc log " test 6: test that te.attn returns # of cycles for te.fifo w&r"
- foreach nbusy {0x03 0x07 0x0f 0x1f 0x00} {
- 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 ]
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 7: verify escaping (all 256 byte codes transported)"
- 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 )]
- }
- rlc exec -estatdef $esdval $esdmsk \
- -wblk te.fifo $blk \
- -rblk te.fifo [llength $blk] -edata $blk
- }
- #
- # -------------------------------------------------------------------------
- rlc log " test 8: verify stat command after te.data wblk & rblk"
- set blk {0x1234 0x2345}
- set rlist [rlc exec -rlist -estatdef $esdval $esdmsk \
- -wblk te.fifo $blk \
- -stat ]
- #puts $rlist
- #rlist like: {wblk 99 23 0} {stat 4 39 0 99 65279}
- set xreg_ccode [lindex $rlist 0 1]
- set stat_ccode [lindex $rlist 1 4]
- if {$xreg_ccode != $stat_ccode} {
- rlc log " ---- stat ccmd mismatch, d=[pbvi o8 $xreg_ccode]! D=[pbvi o8 $stat_ccode] FAIL"
- incr errcnt
- }
- set rlist [rlc exec -rlist -estatdef $esdval $esdmsk \
- -rblk te.fifo [llength $blk] -edata $blk \
- -stat -edata 0x2345]
- #puts $rlist
- #{rblk 97 23 0 {4660 9029}} {stat 12 39 0 97 9029}
- set xreg_ccode [lindex $rlist 0 1]
- set stat_ccode [lindex $rlist 1 4]
- if {$xreg_ccode != $stat_ccode} {
- rlc log " ---- stat ccmd mismatch, d=[pbvi o8 $xreg_ccode]! D=[pbvi o8 $stat_ccode] FAIL"
- incr errcnt
- }
- #
- #-------------------------------------------------------------------------
- rlc log "rbtest::test_fifo - cleanup: clear cntl, data, and fifo"
- rlc exec -init te.cntl [regbld rbtest::INIT fifo data cntl]
- #
- incr errcnt [rlc errcnt -clear]
- return $errcnt
- }
-}
Index: tools/tcl/rbtest
===================================================================
--- tools/tcl/rbtest (revision 10)
+++ tools/tcl/rbtest (nonexistent)
tools/tcl/rbtest
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-pkgIndex.tcl
Index: tools/tcl/rbbram/.cvsignore
===================================================================
--- tools/tcl/rbbram/.cvsignore (revision 10)
+++ tools/tcl/rbbram/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-pkgIndex.tcl
Index: tools/tcl/rbbram/util.tcl
===================================================================
--- tools/tcl/rbbram/util.tcl (revision 10)
+++ tools/tcl/rbbram/util.tcl (nonexistent)
@@ -1,39 +0,0 @@
-# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-19 372 0.1 Initial version
-#
-
-package provide rbbram 1.0
-
-namespace eval rbbram {
- #
- # setup register descriptions for rbd_bram
- #
- regdsc CNTL {nbusy 15 6} {addr 9 10}
- #
- # 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]
- }
- #
- # init: reset rbd_bram (clear cntl register)
- #
- proc init {} {
- rlc exec -wreg br.cntl 0x0000
- }
-}
Index: tools/tcl/rbbram
===================================================================
--- tools/tcl/rbbram (revision 10)
+++ tools/tcl/rbbram (nonexistent)
tools/tcl/rbbram
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-pkgIndex.tcl
Index: tools/tcl/rbmoni/.cvsignore
===================================================================
--- tools/tcl/rbmoni/.cvsignore (revision 10)
+++ tools/tcl/rbmoni/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-pkgIndex.tcl
Index: tools/tcl/rbmoni/util.tcl
===================================================================
--- tools/tcl/rbmoni/util.tcl (revision 10)
+++ tools/tcl/rbmoni/util.tcl (nonexistent)
@@ -1,205 +0,0 @@
-# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-13 369 0.1 First draft
-#
-
-package provide rbmoni 1.0
-
-package require rutil
-package require rlink
-
-namespace eval rbmoni {
- #
- # setup register descriptions for rbd_rbmon
- #
- regdsc CNTL {go 0}
- regdsc ALIM {hilim 15 8} {lolim 7 8}
- regdsc ADDR {wrap 15} {addr 10 11 "-"} {laddr 10 9} {waddr 1 2}
- #
- regdsc DAT3 {flags 15 8 "-"} {ack 15} {busy 14} {err 13} {nak 12} {tout 11} \
- {init 9} {we 8} {addr 7 8}
- regdsc DAT0 {ndlymsb 15 4} {nbusy 11 12}
- #
- # 'pseudo register', describes 1st word in return list element of rbmoni::read
- # must have same bit sequence as DAT3(flags)
- regdsc FLAGS {ack 7} {busy 6} {err 5} {nak 4} {tout 3} {init 1} {we 0}
- #
- # 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]
- }
- #
- # init: reset rbd_rbmon (stop, reset alim)
- #
- proc init {} {
- rlc exec \
- -wreg rm.cntl 0x0000 \
- -wreg rm.alim [regbld rbmoni::ALIM {hilim 0xff} {lolim 0x00}] \
- -wreg rm.addr 0x0000
- }
- #
- # start: start the rbmon
- #
- proc start {} {
- rlc exec -wreg rm.cntl [regbld rbmoni::CNTL go]
- }
- #
- # stop: stop the rbmon
- #
- proc stop {} {
- rlc exec -wreg rm.cntl 0x0000
- }
- #
- # read: read nent last entries (by default all)
- #
- proc read {{nent -1}} {
- set amax [regget rbmoni::ADDR(laddr) -1]
- if {$nent == -1} { set nent $amax }
-
- rlc exec -rreg rm.addr raddr
-
- set laddr [regget rbmoni::ADDR(laddr) $raddr]
- set nval $laddr
- if {[regget rbmoni::ADDR(wrap) $raddr]} { set nval $amax }
-
- if {$nent > $nval} {set nent $nval}
- if {$nent == 0} { return {} }
-
- 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]
- if {$nblk > 256} {set nblk 256}
- rlc exec -rblk rm.data $nblk rawdat
-
- 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 enbusy [regget rbmoni::DAT0(nbusy) $d0]
- lappend rval [list $eflag $eaddr $d2 $edly $enbusy]
- }
-
- set nent [expr $nent - ( $nblk >> 2 ) ]
- }
-
- rlc exec -wreg rm.addr $raddr
-
- return $rval
- }
- #
- # print: print rbmon data (optionally also read them)
- #
- proc print {{mondat -1}} {
-
- if {[llength $mondat] == 1} {
- set ele [lindex $mondat 0]
- if {[llength $ele] == 1} {
- set nent [lindex $ele 0]
- set mondat [read $nent]
- }
- }
-
- set rval {}
-
- set eind [expr 1 - [llength $mondat]]
- append rval " ind addr data delay nbusy ac bs er na to in we"
-
- foreach {ele} $mondat {
- foreach {eflag eaddr edata edly enbusy} $ele { break }
- set fack [regget rbmoni::FLAGS(ack) $eflag]
- set fbsy [regget rbmoni::FLAGS(busy) $eflag]
- set ferr [regget rbmoni::FLAGS(err) $eflag]
- set fnak [regget rbmoni::FLAGS(nak) $eflag]
- set fto [regget rbmoni::FLAGS(tout) $eflag]
- set fini [regget rbmoni::FLAGS(init) $eflag]
- set fwe [regget rbmoni::FLAGS(we) $eflag]
- set ename ""
- set comment ""
- if {$ferr} {append comment " err=1!"}
- if {$fini} {
- append comment " init"
- } else {
- if {$fnak} {append comment " nak=1!"}
- }
- if {$fto} {append comment " tout=1!"}
- if {[rlc amap -testaddr $eaddr]} {set ename [rlc amap -name $eaddr]}
- append rval [format \
- "\n%4d %-10s %4.4x %6d %4d %2.2x %d %d %d %d %d %d %d %s" \
- $eind $ename $edata $edly $enbusy $eflag \
- $fack $fbsy $ferr $fnak $fto $fini $fwe $comment]
- incr eind
- }
-
- return $rval
- }
-
- #
- # raw_edata: prepare edata lists for raw data reads in tests
- # args is list of {eflag eaddr edata enbusy} sublists
-
- proc raw_edata {edat emsk args} {
- upvar $edat uedat
- upvar $emsk uemsk
- set uedat {}
- set uemsk {}
-
- set m0 [expr 0xffff & ~[regget rbmoni::DAT0(nbusy) -1] ]
- set d1 0x0000
- set m1 0xffff
- set m3 0x0000
-
- foreach line $args {
- foreach {eflags eaddr edata enbusy} $line { break }
- set d0 [regbld rbmoni::DAT0 [list nbusy $enbusy]]
- if {$edata ne ""} {
- set m2 0x0000
- set d2 $edata
- } else {
- set m2 0xffff
- set d2 0x0000
- }
- set d3 [regbld rbmoni::DAT3 [list flags $eflags] [list addr $eaddr]]
-
- lappend uedat $d0 $d1 $d2 $d3
- lappend uemsk $m0 $m1 $m2 $m3
- }
-
- return ""
- }
-
- #
- # raw_check: check raw data against expect values prepared by raw_edata
- #
- proc raw_check {edat emsk} {
-
- rlc exec -estatdef 0x0 [regbld rlink::STAT {stat -1}] \
- -rreg rm.addr -edata [llength $edat] \
- -wreg rm.addr 0 \
- -rblk rm.data [llength $edat] -edata $edat $emsk \
- -rreg rm.addr -edata [llength $edat]
- return ""
- }
-
-}
Index: tools/tcl/rbmoni/test_regs.tcl
===================================================================
--- tools/tcl/rbmoni/test_regs.tcl (revision 10)
+++ tools/tcl/rbmoni/test_regs.tcl (nonexistent)
@@ -1,89 +0,0 @@
-# $Id: test_regs.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-13 369 0.1 First Draft
-#
-
-package provide rbmoni 1.0
-
-package require rutiltpp
-package require rutil
-package require rlink
-
-namespace eval rbmoni {
- #
- # Basic tests with rbtester registers
- #
- proc test_regs {} {
- set esdval 0x00
- set esdmsk [regbld rlink::STAT {stat -1}]
- #
- set errcnt 0
- rlc errcnt -clear
- #
- rlc log "rbmoni::test_regs - start"
- #
- #-------------------------------------------------------------------------
- rlc log " test 1: write/read cntl"
- foreach val [list [regbld rbmoni::CNTL go] 0x0] {
- rlc exec -estatdef $esdval $esdmsk \
- -wreg rm.cntl $val \
- -rreg rm.cntl -edata $val
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 2: write/read alim"
- foreach val [list [regbld rbmoni::ALIM {hilim 0x00} {lolim 0x00}] \
- [regbld rbmoni::ALIM {hilim 0xff} {lolim 0xff}] \
- [regbld rbmoni::ALIM {hilim 0x00} {lolim 0xff}] \
- [regbld rbmoni::ALIM {hilim 0xff} {lolim 0x00}]
- ] {
- rlc exec -estatdef $esdval $esdmsk \
- -wreg rm.alim $val \
- -rreg rm.alim -edata $val
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 3: write/read addr"
- set amax [regget rbmoni::ADDR(laddr) -1]
- foreach {laddr waddr} [list 0x0000 0 0x0000 3 $amax 0 $amax 3] {
- set addr [regbld rbmoni::ADDR [list laddr $laddr] [list waddr $waddr]]
- rlc exec -estatdef $esdval $esdmsk \
- -wreg rm.addr $addr \
- -rreg rm.addr -edata $addr
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 4: verify that cntl.go 0->1 clear addr"
- rlc exec -estatdef $esdval $esdmsk \
- -wreg rm.cntl 0x0 \
- -rreg rm.cntl -edata 0x0 \
- -wreg rm.addr [regbld rbmoni::ADDR [list laddr $amax]] \
- -rreg rm.addr -edata [regbld rbmoni::ADDR [list laddr $amax]] \
- -wreg rm.cntl [regbld rbmoni::CNTL go] \
- -rreg rm.cntl -edata [regbld rbmoni::CNTL go] \
- -rreg rm.addr -edata 0x00 \
- -wreg rm.cntl 0x0 \
- -rreg rm.cntl -edata 0x0
- #
- #-------------------------------------------------------------------------
- rlc log "rbmoni::test_regs - cleanup"
- rbmoni::init
- #
- incr errcnt [rlc errcnt -clear]
- return $errcnt
- }
-}
Index: tools/tcl/rbmoni/test_rbtest.tcl
===================================================================
--- tools/tcl/rbmoni/test_rbtest.tcl (revision 10)
+++ tools/tcl/rbmoni/test_rbtest.tcl (nonexistent)
@@ -1,306 +0,0 @@
-# $Id: test_rbtest.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-13 369 0.1 First Draft
-#
-
-package provide rbmoni 1.0
-
-package require rutiltpp
-package require rutil
-package require rlink
-package require rbtest
-
-namespace eval rbmoni {
- #
- # Basic tests with rbtester registers
- #
- proc test_rbtest {{print 0}} {
- set esdval 0x00
- set esdmsk [regbld rlink::STAT {stat -1}]
- #
- set errcnt 0
- rlc errcnt -clear
- #
- rlc log "rbmoni::test_rbtest - init"
- rbmoni::init
- rbtest::init
- #
- set atecntl [rlc amap te.cntl]
- set atedata [rlc amap te.data]
- set atefifo [rlc amap te.fifo]
- #
- #-------------------------------------------------------------------------
- rlc log " test 1: exercise monitor data access via data/addr regs"
-
- set vtecntl [regbld rbtest::CNTL {stat -1}]
- set vtedata 0x1234
-
- # setup te.cntl and te.data
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $vtecntl \
- -wreg te.data $vtedata
-
- # read te.cntl and te.data with rbmoni on; check that 2 lines aquired
- rlc exec -estatdef $esdval $esdmsk \
- -wreg rm.cntl [regbld rbmoni::CNTL go] \
- -rreg te.cntl -edata $vtecntl \
- -rreg te.data -edata $vtedata \
- -wreg rm.cntl 0x0 \
- -rreg rm.addr -edata [regbld rbmoni::ADDR {laddr 2}]
-
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS ack] $atecntl $vtecntl 0] \
- [list [regbld rbmoni::FLAGS ack] $atedata $vtedata 0]
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 1a: read all in one rblk"
- rlc exec -estatdef $esdval $esdmsk \
- -wreg rm.addr 0x0000 \
- -rblk rm.data 8 -edata $edat $emsk \
- -rreg rm.addr -edata 0x8
- #
- #-------------------------------------------------------------------------
- rlc log " test 1b: random address with rreg"
- foreach addr {0x1 0x3 0x5 0x7 0x6 0x4 0x2 0x0} {
- 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]
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 1c: random address with rblk length 2"
- 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]
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 2a: test rreg,wreg capture (ncyc=0); ack, we flags"
- set vtedata 0x4321
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS ack we] $atedata $vtedata 0] \
- [list [regbld rbmoni::FLAGS ack ] $atedata $vtedata 0]
- #
- rbmoni::start
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.data $vtedata \
- -rreg te.data -edata $vtedata
- rbmoni::stop
- if {$print} {puts [print]}
- raw_check $edat $emsk
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 2b: test rreg,wreg capture (ncyc=1,4); busy flag and nbusy"
- set nbusy_1 [regbld rbtest::CNTL {nbusy 1}]
- set nbusy_4 [regbld rbtest::CNTL {nbusy 4}]
- set vtedata 0xbeaf
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS ack we] $atecntl $nbusy_1 0] \
- [list [regbld rbmoni::FLAGS ack busy we] $atedata $vtedata 1] \
- [list [regbld rbmoni::FLAGS ack we] $atecntl $nbusy_4 0] \
- [list [regbld rbmoni::FLAGS ack busy ] $atedata $vtedata 4] \
- [list [regbld rbmoni::FLAGS ack we] $atecntl 0 0]
- #
- rbmoni::start
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $nbusy_1 \
- -wreg te.data $vtedata \
- -wreg te.cntl $nbusy_4 \
- -rreg te.data -edata $vtedata \
- -wreg te.cntl 0
- rbmoni::stop
- if {$print} {puts [print]}
- raw_check $edat $emsk
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 2c: test rreg,wreg capture (timeout); busy,tout flag"
- set vtecntl [regbld rbtest::CNTL {nbusy -1}]
- set vtedata 0xdead
- set nmax [rbtest::nbusymax]
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS ack we] $atecntl $vtecntl 0] \
- [list [regbld rbmoni::FLAGS ack busy tout we] $atedata $vtedata $nmax] \
- [list [regbld rbmoni::FLAGS ack busy tout ] $atedata 0x5555 $nmax] \
- [list [regbld rbmoni::FLAGS ack we] $atecntl 0 0]
- #
- rbmoni::start
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $vtecntl \
- -wreg te.data $vtedata -estat [regbld rlink::STAT rbnak] \
- -rreg te.data -edata 0x5555 -estat [regbld rlink::STAT rbnak] \
- -wreg te.cntl 0
- rbmoni::stop
- if {$print} {puts [print]}
- raw_check $edat $emsk
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 2d: test rreg,wreg capture (prompt nak); nak flag"
- set vtecntl [regbld rbtest::CNTL nofifo]
- set vtefifo 0xdead
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS ack we] $atecntl $vtecntl 0] \
- [list [regbld rbmoni::FLAGS nak we] $atefifo $vtefifo 0] \
- [list [regbld rbmoni::FLAGS nak ] $atefifo {} 0] \
- [list [regbld rbmoni::FLAGS ack we] $atecntl 0 0]
- #
- rbmoni::start
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $vtecntl \
- -wreg te.fifo $vtefifo -estat [regbld rlink::STAT rbnak] \
- -rreg te.fifo -estat [regbld rlink::STAT rbnak] \
- -wreg te.cntl 0
- rbmoni::stop
- if {$print} {puts [print]}
- raw_check $edat $emsk
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 2e: test rreg,wreg capture (delayed nak); nak flag"
- set vtecntl [regbld rbtest::CNTL nofifo {nbusy 7}]
- set vtefifo 0xdead
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS ack we] $atecntl $vtecntl 0] \
- [list [regbld rbmoni::FLAGS ack busy nak we] $atefifo $vtefifo 7] \
- [list [regbld rbmoni::FLAGS ack busy nak ] $atefifo {} 7] \
- [list [regbld rbmoni::FLAGS ack we] $atecntl 0 0]
- #
- rbmoni::start
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $vtecntl \
- -wreg te.fifo $vtefifo -estat [regbld rlink::STAT rbnak] \
- -rreg te.fifo -estat [regbld rlink::STAT rbnak] \
- -wreg te.cntl 0
- rbmoni::stop
- if {$print} {puts [print]}
- raw_check $edat $emsk
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 2f: test rreg,wreg capture (prompt rbus err); err flag"
- set vtefifo 0x1357
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS ack we] $atefifo $vtefifo 0] \
- [list [regbld rbmoni::FLAGS ack ] $atefifo $vtefifo 0] \
- [list [regbld rbmoni::FLAGS ack err ] $atefifo {} 0]
- #
- rbmoni::start
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.fifo $vtefifo \
- -rreg te.fifo -edata $vtefifo \
- -rreg te.fifo -estat [regbld rlink::STAT rberr]
- rbmoni::stop
- if {$print} {puts [print]}
- raw_check $edat $emsk
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 2g: test rreg,wreg capture (delayed rbus err); err flag"
- set vtecntl [regbld rbtest::CNTL {nbusy 5}]
- set vtefifo 0x1357
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS ack we] $atecntl $vtecntl 0] \
- [list [regbld rbmoni::FLAGS ack busy we] $atefifo $vtefifo 5] \
- [list [regbld rbmoni::FLAGS ack busy ] $atefifo $vtefifo 5] \
- [list [regbld rbmoni::FLAGS ack busy err ] $atefifo {} 5] \
- [list [regbld rbmoni::FLAGS ack we] $atecntl 0 0]
- #
- rbmoni::start
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $vtecntl \
- -wreg te.fifo $vtefifo \
- -rreg te.fifo -edata $vtefifo \
- -rreg te.fifo -estat [regbld rlink::STAT rberr] \
- -wreg te.cntl 0x0
- rbmoni::stop
- if {$print} {puts [print]}
- raw_check $edat $emsk
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 3: test init capture; init flag"
- set vtecntl [regbld rbtest::CNTL {nofifo}]
- set vteinit [regbld rbtest::INIT {cntl}]
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS ack we ] $atecntl $vtecntl 0] \
- [list [regbld rbmoni::FLAGS nak init we] $atecntl $vteinit 0] \
- [list [regbld rbmoni::FLAGS ack ] $atecntl 0 0]
- #
- rbmoni::start
- rlc exec -estatdef $esdval $esdmsk \
- -wreg te.cntl $vtecntl \
- -init te.cntl $vteinit \
- -rreg te.cntl -edata 0
- rbmoni::stop
- if {$print} {puts [print]}
- raw_check $edat $emsk
-
- #
- #-------------------------------------------------------------------------
- rlc log " test 4: test rblk,wblk capture (ncyc=2 on read)"
- set vteinit [regbld rbtest::INIT cntl fifo]
- set nbusy_2 [regbld rbtest::CNTL {nbusy 2}]
- set vtefifo {0xdead 0xbeaf 0x4711}
- # build expect list: list of {eflag eaddr edata enbusy} sublists
- raw_edata edat emsk \
- [list [regbld rbmoni::FLAGS nak init we] $atecntl $vteinit 0] \
- [list [regbld rbmoni::FLAGS ack we] $atefifo 0xdead 0] \
- [list [regbld rbmoni::FLAGS ack we] $atefifo 0xbeaf 0] \
- [list [regbld rbmoni::FLAGS ack we] $atefifo 0x4711 0] \
- [list [regbld rbmoni::FLAGS ack we] $atecntl $nbusy_2 0] \
- [list [regbld rbmoni::FLAGS ack busy ] $atefifo 0xdead 2] \
- [list [regbld rbmoni::FLAGS ack busy ] $atefifo 0xbeaf 2] \
- [list [regbld rbmoni::FLAGS ack busy ] $atefifo 0x4711 2] \
- [list [regbld rbmoni::FLAGS nak init we] $atecntl $vteinit 0]
- #
- rbmoni::start
- rlc exec -estatdef $esdval $esdmsk \
- -init te.cntl $vteinit \
- -wblk te.fifo $vtefifo \
- -wreg te.cntl $nbusy_2 \
- -rblk te.fifo [llength $vtefifo] -edata $vtefifo \
- -init te.cntl $vteinit
- rbmoni::stop
- if {$print} {puts [print]}
- raw_check $edat $emsk
-
- #
- #-------------------------------------------------------------------------
- rlc log "rbmoni::test_rbtest - cleanup:"
- rbtest::init
- rbmoni::init
- #
- incr errcnt [rlc errcnt -clear]
- return $errcnt
- }
-}
Index: tools/tcl/rbmoni
===================================================================
--- tools/tcl/rbmoni (revision 10)
+++ tools/tcl/rbmoni (nonexistent)
tools/tcl/rbmoni
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-pkgIndex.tcl
Index: tools/tcl/rbs3hio/.cvsignore
===================================================================
--- tools/tcl/rbs3hio/.cvsignore (revision 10)
+++ tools/tcl/rbs3hio/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-pkgIndex.tcl
Index: tools/tcl/rbs3hio/util.tcl
===================================================================
--- tools/tcl/rbs3hio/util.tcl (revision 10)
+++ tools/tcl/rbs3hio/util.tcl (nonexistent)
@@ -1,70 +0,0 @@
-# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-19 372 0.1 First draft
-#
-
-package provide rbs3hio 1.0
-
-package require rutil
-package require rutiltpp
-
-namespace eval rbs3hio {
- #
- # setup register descriptions for s3_humanio_rbus
- #
- regdsc CNTL {daten 11} {dpen 10} {leden 9} {swien 8} {btn 3 4}
- regdsc LED {dp 11 4} {led 7 8}
- #
- # 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]
- }
- #
- # init: reset s3_humanio_rbus (clear all enables)
- #
- proc init {} {
- rlc exec -wreg hi.cntl 0x0000
- }
- #
- # print: show status
- #
- proc print {} {
- set rval {}
- rlc exec \
- -rreg hi.cntl r_cntl \
- -rreg hi.swi r_swi \
- -rreg hi.led r_led \
- -rreg hi.dsp r_dsp
- set led [regget rbs3hio::LED(led) $r_led]
- set dp [regget rbs3hio::LED(dp) $r_led]
- append rval " cntl: [regtxt rbs3hio::CNTL $r_cntl]"
- append rval "\n leds: [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]
- append dspval [format "%x" $digval]
- if {$digdp} {append dspval "."} else {append dspval " "}
- }
- append rval "\n disp: [pbvi b16 $r_dsp] - [pbvi b4 $dp] -> \"$dspval\""
- return $rval
- }
-}
Index: tools/tcl/rbs3hio
===================================================================
--- tools/tcl/rbs3hio (revision 10)
+++ tools/tcl/rbs3hio (nonexistent)
tools/tcl/rbs3hio
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-pkgIndex.tcl
Index: tools/tcl/tst_rlink/util.tcl
===================================================================
--- tools/tcl/tst_rlink/util.tcl (revision 10)
+++ tools/tcl/tst_rlink/util.tcl (nonexistent)
@@ -1,56 +0,0 @@
-# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-04-02 375 1.0 Initial version
-# 2011-03-19 372 0.1 First draft
-#
-
-package provide tst_rlink 1.0
-
-package require rlink
-package require rbtest
-package require rbmoni
-package require rbbram
-package require rbs3hio
-package require rbemon
-
-namespace eval tst_rlink {
- #
- # setup: amap definitions for tst_rlink
- #
- proc setup {} {
- rlc amap -clear; # clear first to allow re-run
- rbmoni::setup [bvi b 11111100]
- rbemon::setup [bvi b 11111000]
- rbbram::setup [bvi b 11110100]
- rbtest::setup [bvi b 11110000]
- rlc amap -insert timer.1 [bvi b 11100001]
- rlc amap -insert timer.0 [bvi b 11100000]
- rbs3hio::setup [bvi b 11000000]
- }
-
- #
- # init: reset tst_rlink design to initial state
- #
- proc init {} {
- rlink::init; # reset rlink
- rbtest::init
- rbbram::init
- rbmoni::init
- rbs3hio::init
- rbemon::init
- rlink::init; # re-reset rlink
- }
-}
Index: tools/tcl/tst_rlink/test_all.tcl
===================================================================
--- tools/tcl/tst_rlink/test_all.tcl (revision 10)
+++ tools/tcl/tst_rlink/test_all.tcl (nonexistent)
@@ -1,41 +0,0 @@
-# $Id: test_all.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-04-02 375 1.0 Initial version
-# 2011-03-26 373 0.1 First draft
-#
-
-package provide tst_rlink 1.0
-
-package require rbtest
-package require rbmoni
-
-namespace eval tst_rlink {
- #
- # Driver for all tst_rlink tests
- #
- proc test_all {} {
- #
- set errcnt 0
- incr errcnt [rbtest::test_all 0x7 0xfffc]
- incr errcnt [rbmoni::test_regs]
- incr errcnt [rbmoni::test_rbtest]
- incr errcnt [rbemon::test_regs]
-
- puts "tst_rlink::test_all errcnt = $errcnt --> [rutil::errcnt2txt $errcnt]"
-
- return $errcnt
- }
-}
Index: tools/tcl/tst_rlink/.cvsignore
===================================================================
--- tools/tcl/tst_rlink/.cvsignore (revision 10)
+++ tools/tcl/tst_rlink/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-pkgIndex.tcl
Index: tools/tcl/tst_rlink
===================================================================
--- tools/tcl/tst_rlink (revision 10)
+++ tools/tcl/tst_rlink (nonexistent)
tools/tcl/tst_rlink
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-pkgIndex.tcl
Index: tools/tcl/setup_packages
===================================================================
--- tools/tcl/setup_packages (revision 10)
+++ tools/tcl/setup_packages (nonexistent)
@@ -1,13 +0,0 @@
-#! /usr/bin/env tclsh
-#
-pkg_mkIndex -verbose ../lib libr*tpp.so
-#
-pkg_mkIndex -verbose rutil *.tcl
-pkg_mkIndex -verbose rlink *.tcl
-pkg_mkIndex -verbose rbtest *.tcl
-pkg_mkIndex -verbose rbmoni *.tcl
-pkg_mkIndex -verbose rbbram *.tcl
-pkg_mkIndex -verbose rbs3hio *.tcl
-pkg_mkIndex -verbose rbemon *.tcl
-#
-pkg_mkIndex -verbose tst_rlink *.tcl
tools/tcl/setup_packages
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: tools/tcl/rlink/.cvsignore
===================================================================
--- tools/tcl/rlink/.cvsignore (revision 10)
+++ tools/tcl/rlink/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-pkgIndex.tcl
Index: tools/tcl/rlink/util.tcl
===================================================================
--- tools/tcl/rlink/util.tcl (revision 10)
+++ tools/tcl/rlink/util.tcl (nonexistent)
@@ -1,68 +0,0 @@
-# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-26 373 1.0 Initial version
-# 2011-03-19 372 0.1 First draft
-#
-
-package provide rlink 1.0
-
-package require rutil 1.0
-
-namespace eval rlink {
- regdsc STAT {stat 7 3} {attn 4} {cerr 3} {derr 2} {rbnak 1} {rberr 0}
- regdsc INIT {anena 15} {itoena 14} {itoval 7 8}
- #
- # 'pseudo register', describes 3rd word in return list element for -rlist
- regdsc FLAGS {vol 16} \
- {chkdata 13} {chkstat 12} \
- {errcrc 11} {errcmd 10} {errmiss 9} {errnak 8} \
- {resend 7} {recov 6} {pktend 5} {pktbeg 4} \
- {done 2} {send 1} {init 0}
-
- variable IINT 0x00ff
-
- #
- # init: reset rlink (disable enables; clear attn register
- #
- proc init {} {
- rlc exec \
- -init $rlink::IINT 0x0000 \
- -attn
- return ""
- }
- #
- # isopen: returns 1 if open and 0 if close
- #
- proc isopen {} {
- if {[rlc open] eq ""} { return 0 }
- return 1
- }
- #
- # isfifo: returns 1 if open and fifo, 0 otherwise
- #
- proc isfifo {} {
- set name [rlc open]
- if {$name ne "" && [regexp -- {^fifo:} $name]} { return 1 }
- return 0
- }
- #
- # issim: returns 1 if open and in simulation mode, 0 otherwise
- #
- proc issim {} {
- if {![info exists rlink::sim_mode]} { return 0}
- return $rlink::sim_mode
- }
-}
Index: tools/tcl/rlink
===================================================================
--- tools/tcl/rlink (revision 10)
+++ tools/tcl/rlink (nonexistent)
tools/tcl/rlink
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-pkgIndex.tcl
Index: tools/tcl/rutil/.cvsignore
===================================================================
--- tools/tcl/rutil/.cvsignore (revision 10)
+++ tools/tcl/rutil/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-pkgIndex.tcl
Index: tools/tcl/rutil/util.tcl
===================================================================
--- tools/tcl/rutil/util.tcl (revision 10)
+++ tools/tcl/rutil/util.tcl (nonexistent)
@@ -1,201 +0,0 @@
-# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0 Initial version
-# 2011-03-19 372 0.1 First draft
-#
-
-package provide rutil 1.0
-
-package require rutiltpp
-
-namespace eval rutil {
- #
- # regdsc: setup a register descriptor
- #
- proc regdsc {name args} {
- upvar $name rdsc
- set fbegmax -1
- set mskftot 0
-
- foreach arg $args {
- set nopt [llength $arg]
- if {$nopt < 2} {
- error "wrong number of elements in field dsc \"$arg\""
- }
- set fnam [lindex $arg 0]
- set fbeg [lindex $arg 1]
- set flen [lindex $arg 2]
- if {$nopt < 3} { set flen 1 }
- set popt [lindex $arg 3]
- if {$nopt < 4} { set popt "b" }
-
- if {( $flen - 1 ) > $fbeg} {
- error "error in field dsc \"$arg\": length > start position"
- }
-
- 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 rdsc(-n) [lsort -decreasing -command regdsc_sort \
- [array names rdsc -regexp {^[^-]}] ]
-
- set rdsc(-w) [expr $fbegmax + 1]
- set rdsc(-m) $mskftot
-
- return ""
- }
-
- #
- # regdsc_print: print regsiter descriptor
- #
- proc regdsc_print {name} {
- upvar $name rdsc
- set rval ""
- if {! [info exists rdsc]} {
- error "can't access \"$name\": variable doesn't exist"
- }
-
- set rsize $rdsc(-w)
-
- append rval " field bits bitmask"
-
- foreach fnam $rdsc(-n) {
- set fdsc $rdsc($fnam)
- set fbeg [lindex $fdsc 0]
- set flen [lindex $fdsc 1]
- set fmskf [lindex $fdsc 3]
- set line " "
- append line [format "%8s" $fnam]
- if {$flen > 1} {
- append line [format " %2d:%2d" $fbeg [expr $fbeg - $flen + 1]]
- } else {
- append line [format " %2d" $fbeg]
- }
- append line " "
- append line [pbvi "b${rsize}" $fmskf]
- append rval "\n$line"
- }
- return $rval
- }
-
- proc regdsc_sort {a b} {
- upvar rdsc urdsc
- return [expr [lindex $urdsc($a) 0] - [lindex $urdsc($b) 0]]
- }
-
- #
- # regbld: build a register value from a list of fields
- #
- proc regbld {name args} {
- upvar $name rdsc
- set rval 0
- foreach arg $args {
- if {[llength $arg] < 1 || [llength $arg] > 2} {
- error "error in field specifier \"$arg\": must be 'name [val]'"
- }
- set fnam [lindex $arg 0]
- if {! [info exists rdsc($fnam)] } {
- error "error in field specifier \"$arg\": field unknown"
- }
- set fbeg [lindex $rdsc($fnam) 0]
- set flen [lindex $rdsc($fnam) 1]
-
- if {[llength $arg] == 1} {
- if {$flen > 1} {
- error "error in field specifier \"$arg\": no value and flen>1"
- }
- set mskf [lindex $rdsc($fnam) 3]
- set rval [expr $rval | $mskf]
-
- } else {
- set fval [lindex $arg 1]
- set mskb [lindex $rdsc($fnam) 2]
- if {$fval >= 0} {
- if {$fval > $mskb} {
- error "error in field specifier \"$arg\": value > $mskb"
- }
- } else {
- if {$fval < [expr - $mskb]} {
- error "error in field specifier \"$arg\": value < [expr -$mskb]"
- }
- set fval [expr $fval & $mskb]
- }
- set rval [expr $rval | $fval << ( $fbeg - ( $flen - 1 ) )]
- }
-
- }
- return $rval
- }
-
- #
- # regget: extract field from a register value
- #
- proc regget {name val} {
- upvar $name fdsc
- set fbeg [lindex $fdsc 0]
- set flen [lindex $fdsc 1]
- set mskb [lindex $fdsc 2]
- return [expr ( $val >> ( $fbeg - ( $flen - 1 ) ) ) & $mskb]
- }
-
- #
- # regtxt: convert register value to a text string
- #
- proc regtxt {name val} {
- upvar $name rdsc
- set rval ""
-
- foreach fnam $rdsc(-n) {
- set popt [lindex $rdsc($fnam) 4]
- set fval [regget rdsc($fnam) $val]
- if {$popt ne "-"} {
- if {$rval ne ""} {append rval " "}
- append rval "${fnam}:"
- if {$popt eq "b"} {
- set flen [lindex $rdsc($fnam) 1]
- append rval [pbvi b${flen} $fval]
- } else {
- append rval [format "%${popt}" $fval]
- }
- }
- }
- return $rval
- }
- #
- # errcnt2txt: returns "PASS" if 0 and "FAIL" otherwise
- #
- proc errcnt2txt {errcnt} {
- if {$errcnt} {return "FAIL"}
- return "PASS"
- }
-
- namespace export regdsc
- namespace export regdsc_print
- namespace export regbld
- namespace export regget
- namespace export regtxt
-}
-
-namespace import rutil::regdsc
-namespace import rutil::regdsc_print
-namespace import rutil::regbld
-namespace import rutil::regget
-namespace import rutil::regtxt
Index: tools/tcl/rutil
===================================================================
--- tools/tcl/rutil (revision 10)
+++ tools/tcl/rutil (nonexistent)
tools/tcl/rutil
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-pkgIndex.tcl
Index: tools/tcl/rbemon/.cvsignore
===================================================================
--- tools/tcl/rbemon/.cvsignore (revision 10)
+++ tools/tcl/rbemon/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-pkgIndex.tcl
Index: tools/tcl/rbemon/util.tcl
===================================================================
--- tools/tcl/rbemon/util.tcl (revision 10)
+++ tools/tcl/rbemon/util.tcl (nonexistent)
@@ -1,85 +0,0 @@
-# $Id: util.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-04-02 375 1.0 Initial version
-#
-
-package provide rbemon 1.0
-
-package require rutil
-package require rlink
-
-namespace eval rbemon {
- #
- # setup register descriptions for rbd_eyemon
- #
- regdsc CNTL {ena01 3} {ena10 2} {clr 1} {go 0}
- regdsc RDIV {rdiv 7 8}
- regdsc ADDR {addr 9 10 "-"} {laddr 9 8} {waddr 0}
- #
- # 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]
- }
- #
- # init: reset rbd_eyemon (stop monitor, clear rdiv and addr)
- #
- proc init {} {
- rlc exec \
- -wreg em.cntl 0x0000 \
- -wreg em.rdiv 0x0000
- }
- #
- # clear: clear eyemon data
- #
- proc clear {} {
- set clrbit [regbld rbemon::CNTL clr]
- rlc exec -rreg em.cntl cur_cntl
- 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]
- incr npoll 1
- if {$npoll > 10} {
- error "-E: rbemon::clear failed, CNTL.clr didn't go back to 0"
- }
- }
- return ""
- }
- #
- # start: start the eyemon
- #
- proc start {{ena01 0} {ena10 0}} {
- if {$ena01 == 0 && $ena10 == 0} {
- set ena01 1
- set ena10 1
- }
- rlc exec -wreg em.cntl [regbld rbemon::CNTL go \
- [list ena01 $ena01] [list ena10 $ena10] ]
- }
- #
- # stop: stop the eyemon
- #
- proc stop {} {
- rlc exec -wreg em.cntl 0x0000
- }
-
-}
Index: tools/tcl/rbemon/test_regs.tcl
===================================================================
--- tools/tcl/rbemon/test_regs.tcl (revision 10)
+++ tools/tcl/rbemon/test_regs.tcl (nonexistent)
@@ -1,97 +0,0 @@
-# $Id: test_regs.tcl 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-04-02 375 1.0 Initial version
-#
-
-package provide rbemon 1.0
-
-package require rutiltpp
-package require rutil
-package require rlink
-
-namespace eval rbemon {
- #
- # Basic tests with rbd_eyemon registers
- #
- proc test_regs {} {
- set esdval 0x00
- set esdmsk [regbld rlink::STAT {stat -1}]
- #
- set errcnt 0
- rlc errcnt -clear
- #
- rlc log "rbemon::test_regs - start"
- #
- #-------------------------------------------------------------------------
- rlc log " test 1a: write/read cntl"
- # ensure that last value 0x0 -> go=0
- foreach val [list [regbld rbemon::CNTL ena01] [regbld rbemon::CNTL ena10] \
- [regbld rbemon::CNTL go] 0x0 ] {
- rlc exec -estatdef $esdval $esdmsk \
- -wreg em.cntl $val \
- -rreg em.cntl -edata $val
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 1b: write/read rdiv"
- foreach val [list [regbld rbemon::RDIV {rdiv -1}] 0x0 ] {
- rlc exec -estatdef $esdval $esdmsk \
- -wreg em.rdiv $val \
- -rreg em.rdiv -edata $val
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 1c: write/read addr"
- set amax [regget rbemon::ADDR(addr) -1]
- foreach addr [list 0x1 $amax 0x0] {
- rlc exec -estatdef $esdval $esdmsk \
- -wreg em.addr $addr \
- -rreg em.addr -edata $addr
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 2: verify addr increments on data reads"
- 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.data \
- -rreg em.addr -edata [expr ( $addr + 2 ) & $amax]
- }
- #
- #-------------------------------------------------------------------------
- rlc log " test 3: verify rberr on DATA write and DATE read if in go state"
- rlc exec \
- -wreg em.data 0x0000 -estat [regbld rlink::STAT rberr] $esdmsk \
- -wreg em.cntl [regbld rbemon::CNTL go] -estat $esdval $esdmsk \
- -rreg em.data -estat [regbld rlink::STAT rberr] $esdmsk
- #
- #-------------------------------------------------------------------------
- rlc log " test 4: verify that CNTL.clr returns to 0"
- set npoll 32
- set edat {}
- set emsk {}
- for {set i 0} {$i < $npoll} {incr i} { lappend edat 0x0000 }
- for {set i 1} {$i < $npoll} {incr i} { lappend emsk 0xffff }
- rlc exec -estatdef $esdval $esdmsk \
- -wreg em.cntl [regbld rbemon::CNTL clr] \
- -rblk em.cntl $npoll -edata $edat $emsk
- #
- incr errcnt [rlc errcnt -clear]
- return $errcnt
- }
-}
Index: tools/tcl/rbemon
===================================================================
--- tools/tcl/rbemon (revision 10)
+++ tools/tcl/rbemon (nonexistent)
tools/tcl/rbemon
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-pkgIndex.tcl
Index: tools/tcl
===================================================================
--- tools/tcl (revision 10)
+++ tools/tcl (nonexistent)
tools/tcl
Property changes :
Deleted: svn:ignore
## -1,32 +0,0 ##
-*.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: tools/src/librlink/RlinkCommandExpect.cpp
===================================================================
--- tools/src/librlink/RlinkCommandExpect.cpp (revision 10)
+++ tools/src/librlink/RlinkCommandExpect.cpp (nonexistent)
@@ -1,195 +0,0 @@
-// $Id: RlinkCommandExpect.cpp 375 2011-04-02 07:56:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-12 368 1.0 Initial version
-// 2011-01-15 355 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RlinkCommandExpect.cpp 375 2011-04-02 07:56:47Z mueller $
- \brief Implemenation of class RlinkCommandExpect.
- */
-
-// debug
-#include
-
-#include
-#include
-
-#include "RlinkCommandExpect.hpp"
-
-#include "librtools/RosFill.hpp"
-#include "librtools/RosPrintf.hpp"
-#include "librtools/RosPrintBvi.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RlinkCommandExpect
- \brief FIXME_docs
-*/
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-RlinkCommandExpect::RlinkCommandExpect()
- : fStatusVal(0),
- fStatusMsk(0xff),
- fDataVal(0),
- fDataMsk(0xffff),
- fBlockVal(),
- fBlockMsk()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RlinkCommandExpect::RlinkCommandExpect(uint8_t stat, uint8_t statmsk)
- : fStatusVal(stat),
- fStatusMsk(statmsk),
- fDataVal(0),
- fDataMsk(0xffff),
- fBlockVal(),
- fBlockMsk()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RlinkCommandExpect::RlinkCommandExpect(uint8_t stat, uint8_t statmsk,
- uint16_t data, uint16_t datamsk)
- : fStatusVal(stat),
- fStatusMsk(statmsk),
- fDataVal(data),
- fDataMsk(datamsk),
- fBlockVal(),
- fBlockMsk()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RlinkCommandExpect::RlinkCommandExpect(uint8_t stat, uint8_t statmsk,
- const std::vector& block)
- : fStatusVal(stat),
- fStatusMsk(statmsk),
- fDataVal(0),
- fDataMsk(0xffff),
- fBlockVal(block),
- fBlockMsk()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RlinkCommandExpect::RlinkCommandExpect(uint8_t stat, uint8_t statmsk,
- const std::vector& block,
- const std::vector& blockmsk)
- : fStatusVal(stat),
- fStatusMsk(statmsk),
- fDataVal(0),
- fDataMsk(0xffff),
- fBlockVal(block),
- fBlockMsk(blockmsk)
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RlinkCommandExpect::~RlinkCommandExpect()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RlinkCommandExpect::BlockCheck(size_t ind, uint16_t val) const
-{
- if (ind >= fBlockVal.size()) return true;
- uint16_t eval = fBlockVal[ind];
- uint16_t emsk = (ind < fBlockMsk.size()) ? fBlockMsk[ind] : 0x0000;
- return (val|emsk) == (eval|emsk);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-size_t RlinkCommandExpect::BlockCheck(const uint16_t* pval, size_t size) const
-{
- size_t nerr = 0;
- for (size_t i=0; i= fBlockVal.size()) break;
- uint16_t eval = fBlockVal[i];
- uint16_t emsk = (i < fBlockMsk.size()) ? fBlockMsk[i] : 0x0000;
- if ((pval[i]|emsk) != (eval|emsk)) nerr += 1;
- }
-
- return nerr;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RlinkCommandExpect::BlockIsChecked(size_t ind) const
-{
- if (ind >= fBlockVal.size()) return false;
- if (ind >= fBlockMsk.size()) return true;
- return fBlockMsk[ind] != 0xffff;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RlinkCommandExpect::Dump(std::ostream& os, int ind, const char* text) const
-{
- RosFill bl(ind);
- os << bl << (text?text:"--") << "RlinkCommandExpect @ " << this << endl;
-
- os << bl << " fStatusVal: " << RosPrintBvi(fStatusVal,0) << endl;
- os << bl << " fStatusMsk: " << RosPrintBvi(fStatusMsk,0) << endl;
- os << bl << " fDataVal: " << RosPrintBvi(fDataVal,0) << endl;
- os << bl << " fDataMsk: " << RosPrintBvi(fDataMsk,0) << endl;
- os << bl << " fBlockVal.size: " << RosPrintf(fBlockVal.size(),"d",3) << endl;
- os << bl << " fBlockMsk.size: " << RosPrintf(fBlockMsk.size(),"d",3) << endl;
- if (fBlockVal.size() > 0) {
- os << bl << " fBlockVal & Msk data: ";
- size_t width = (fBlockMsk.size()>0) ? 9 : 4;
- size_t ncol = max(1u, (80-ind-4-5)/(width+1));
- for (size_t i=0; i< fBlockVal.size(); i++) {
- if (i%ncol == 0) os << "\n" << bl << " " << RosPrintf(i,"d",3) << ": ";
-
- os << RosPrintBvi(fBlockVal[i],16);
- if (fBlockMsk.size()>0) {
- if (i
-//
-// 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
-// 2011-03-27 374 1.0 Initial version
-// 2011-01-15 356 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RlinkPortFifo.cpp 375 2011-04-02 07:56:47Z mueller $
- \brief Implemenation of RlinkPortFifo.
-*/
-
-#include
-#include
-#include
-#include
-
-#include "RlinkPortFifo.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RlinkPortFifo
- \brief FIXME_text
-*/
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-RlinkPortFifo::RlinkPortFifo()
- : RlinkPort()
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RlinkPortFifo::~RlinkPortFifo()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_text
-
-bool RlinkPortFifo::Open(const std::string& url, RerrMsg& emsg)
-{
- if (IsOpen()) Close();
-
- if (!ParseUrl(url, "|keep|", emsg)) return false;
-
- // Note: _rx fifo must be opened before the _tx fifo, otherwise the test
- // bench might close with EOF on read prematurely (is a race condition).
-
- fFdWrite = OpenFifo(UrlPath() + "_rx", true, emsg);
- if (fFdWrite < 0) return false;
-
- fFdRead = OpenFifo(UrlPath() + "_tx", false, emsg);
- if (fFdRead < 0) {
- close(fFdWrite);
- fFdWrite = -1;
- return false;
- }
-
- fIsOpen = true;
-
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_text
-
-int RlinkPortFifo::OpenFifo(const std::string& name, bool snd, RerrMsg& emsg)
-{
- struct stat stat_fifo;
-
- int irc;
-
- irc = stat(name.c_str(), &stat_fifo);
- if (irc == 0) {
- if ((stat_fifo.st_mode & S_IFIFO) == 0) {
- emsg.Init("RlinkPortFifo::OpenFiFo()",
- string("\"") + name + string("\" exists but is not a pipe"));
- return -1;
- }
- } else {
- mode_t mode = S_IRUSR | S_IWUSR; // user read and write allowed
- irc = mkfifo(name.c_str(), mode);
- if (irc != 0) {
- emsg.InitErrno("RlinkPortFifo::OpenFifo()",
- string("mkfifo() for \"") + name + string("\" failed: "),
- errno);
- return -1;
- }
- }
-
- irc = open(name.c_str(), snd ? O_WRONLY : O_RDONLY);
- if (irc < 0) {
- emsg.InitErrno("RlinkPortFifo::OpenFifo()",
- string("open() for \"") + name + string("\" failed: "),
- errno);
- return -1;
- }
-
- return irc;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RlinkPortFifo_NoInline))
-#define inline
-//#include "RlinkPortFifo.ipp"
-#undef inline
-#endif
Index: tools/src/librlink/RlinkPort.hpp
===================================================================
--- tools/src/librlink/RlinkPort.hpp (revision 10)
+++ tools/src/librlink/RlinkPort.hpp (nonexistent)
@@ -1,123 +0,0 @@
-// $Id: RlinkPort.hpp 375 2011-04-02 07:56:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-27 375 1.0 Initial version
-// 2011-01-15 356 0.1 First draft
-// ---------------------------------------------------------------------------
-
-
-/*!
- \file
- \version $Id: RlinkPort.hpp 375 2011-04-02 07:56:47Z mueller $
- \brief Declaration of class RlinkPort.
-*/
-
-#ifndef included_Retro_RlinkPort
-#define included_Retro_RlinkPort 1
-
-#include
-#include
tools/src/librlink
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-*.dep
Index: tools/src/librtools/RosPrintBvi.ipp
===================================================================
--- tools/src/librtools/RosPrintBvi.ipp (revision 10)
+++ tools/src/librtools/RosPrintBvi.ipp (nonexistent)
@@ -1,53 +0,0 @@
-// $Id: RosPrintBvi.ipp 367 2011-03-06 20:07:18Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-05 366 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosPrintBvi.ipp 367 2011-03-06 20:07:18Z mueller $
- \brief Implemenation (inline) of RosPrintBvi.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-/*!
- \relates RosPrintBvi
- \brief ostream insertion operator.
-*/
-
-inline std::ostream& operator<<(std::ostream& os, const RosPrintBvi& obj)
-{
- obj.Print(os);
- return os;
-}
-
-//------------------------------------------+-----------------------------------
-/*!
- \relates RosPrintBvi
- \brief string insertion operator.
-*/
-
-inline std::string& operator<<(std::string& os, const RosPrintBvi& obj)
-{
- obj.Print(os);
- return os;
-}
-
-
-} // end namespace Retro
Index: tools/src/librtools/RosPrintf.hpp
===================================================================
--- tools/src/librtools/RosPrintf.hpp (revision 10)
+++ tools/src/librtools/RosPrintf.hpp (nonexistent)
@@ -1,73 +0,0 @@
-// $Id: RosPrintf.hpp 357 2011-01-31 08:00:13Z mueller $
-//
-// Copyright 2000-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Adopted from CTBprintf
-// 2000-12-18 - - Last change on CTBprintf
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosPrintf.hpp 357 2011-01-31 08:00:13Z mueller $
- \brief Declaration of RosPrintf functions.
-
- For a detailed description of the usage of the \c RosPrintf system
- look into \ref using_rosprintf.
-*/
-
-#ifndef included_Retro_RosPrintf
-#define included_Retro_RosPrintf 1
-
-#include "RosPrintfS.hpp"
-
-namespace Retro {
-
- RosPrintfS RosPrintf(char value, const char* form=0,
- int width=0, int prec=0);
-
- RosPrintfS RosPrintf(signed char value, const char* form=0,
- int width=0, int prec=0);
- RosPrintfS RosPrintf(unsigned char value, const char* form=0,
- int width=0, int prec=0);
-
- RosPrintfS RosPrintf(short value, const char* form=0,
- int width=0, int prec=0);
- RosPrintfS RosPrintf(unsigned short value, const char* form=0,
- int width=0, int prec=0);
-
- RosPrintfS RosPrintf(int value, const char* form=0,
- int width=0, int prec=0);
- RosPrintfS RosPrintf(unsigned int value, const char* form=0,
- int width=0, int prec=0);
-
- RosPrintfS RosPrintf(long value, const char* form=0,
- int width=0, int prec=0);
- RosPrintfS RosPrintf(unsigned long value, const char* form=0,
- int width=0, int prec=0);
-
- RosPrintfS RosPrintf(double value, const char* form=0,
- int width=0, int prec=0);
-
- RosPrintfS RosPrintf(const char* value, const char* form=0,
- int width=0, int prec=0);
-
- RosPrintfS RosPrintf(const void* value, const char* form=0,
- int width=0, int prec=0);
-
-} // end namespace Retro
-
-// implementation is all inline
-#include "RosPrintf.ipp"
-
-#endif
Index: tools/src/librtools/RosPrintf.ipp
===================================================================
--- tools/src/librtools/RosPrintf.ipp (revision 10)
+++ tools/src/librtools/RosPrintf.ipp (nonexistent)
@@ -1,269 +0,0 @@
-// $Id: RosPrintf.ipp 358 2011-02-05 09:45:14Z mueller $
-//
-// Copyright 2000-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Adopted from CTBprintf
-// 2000-12-18 - - Last change on CTBprintf
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosPrintf.ipp 358 2011-02-05 09:45:14Z mueller $
- \brief Implemenation (inline) of RosPrintf.
-*/
-
-//------------------------------------------+-----------------------------------
-/*!
- \defgroup RosPrintf RosPrintf -- print format object creators
-*/
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a \c char value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(char value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a signed char value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(signed char value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a unsigned char value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(unsigned char value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a \c short value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(short value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a unsigned short value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(unsigned short value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a \c int value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(int value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a unsigned int value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(unsigned int value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a \c long value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(long value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of an unsigned long value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(unsigned long value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a \c double value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(double value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a const char* value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(const char* value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Creates a print object for the formatted output of a \c const void* value.
-/*!
- \ingroup RosPrintf
-
- For a full description of the of the \c RosPrintf system look into
- \ref using_rosprintf.
-
- \param value variable or expression to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline Retro::RosPrintfS
- Retro::RosPrintf(const void* value, const char* form, int width, int prec)
-{
- return Retro::RosPrintfS(value, form, width, prec);
-}
-
Index: tools/src/librtools/RosPrintfS.cpp
===================================================================
--- tools/src/librtools/RosPrintfS.cpp (revision 10)
+++ tools/src/librtools/RosPrintfS.cpp (nonexistent)
@@ -1,138 +0,0 @@
-// $Id: RosPrintfS.cpp 364 2011-02-26 08:33:01Z mueller $
-//
-// Copyright 2000-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-25 364 1.0.1 allow NULL ptr for const char*, output
-// 2011-01-30 357 1.0 Adopted from CTBprintfS
-// 2000-10-29 - - Last change on CTBprintfS
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosPrintfS.cpp 364 2011-02-26 08:33:01Z mueller $
- \brief Implemenation of RosPrintfS .
-*/
-
-#include
-
-#include "RiosState.hpp"
-#include "RosPrintfS.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class RosPrintfS
- \brief Print object for scalar values . **
-*/
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief Constructor.
-
- \param value value to be printed
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-template
-RosPrintfS::RosPrintfS(T value, const char* form, int width, int prec)
- : RosPrintfBase(form, width, prec),
- fValue(value)
-{}
-
-//------------------------------------------+-----------------------------------
-template
-void RosPrintfS::ToStream(std::ostream& os) const
-{
- RiosState iostate(os, fForm, fPrec);
- os << setw(fWidth) << fValue;
-}
-
-//------------------------------------------+-----------------------------------
-template <>
-void RosPrintfS::ToStream(std::ostream& os) const
-{
- RiosState iostate(os, fForm, fPrec);
- char ctype = iostate.Ctype();
-
- os.width(fWidth);
- if (ctype == 0 || ctype == 'c') {
- os << fValue;
- } else {
- os << (int) fValue;
- }
-}
-
-//------------------------------------------+-----------------------------------
-template <>
-void RosPrintfS::ToStream(std::ostream& os) const
-{
- RiosState iostate(os, fForm, fPrec);
- char ctype = iostate.Ctype();
-
- os.width(fWidth);
- if (ctype == 'c') {
- os << (char) fValue;
- } else {
- os << fValue;
- }
-}
-
-//------------------------------------------+-----------------------------------
-template <>
-void RosPrintfS::ToStream(std::ostream& os) const
-{
- RiosState iostate(os, fForm, fPrec);
- char ctype = iostate.Ctype();
-
- os.width(fWidth);
- if (ctype == 'p') {
- os << (const void*) fValue;
- } else {
- os << (fValue?fValue:"");
- }
-}
-
-//------------------------------------------+-----------------------------------
-template <>
-void RosPrintfS::ToStream(std::ostream& os) const
-{
- RiosState iostate(os, fForm, fPrec);
- char ctype = iostate.Ctype();
-
- os.width(fWidth);
- if (ctype == 0 || ctype == 'p') {
- os << fValue;
- } else {
- os << (unsigned long) fValue;
- }
-}
-
-//!! Note:
-//!! 1. This specialization is printing signed and unsigned char types and
-//!! implements the `c' conversion format,
-
-// finally do an explicit instantiation of the required CTBioState
-
-template class RosPrintfS;
-template class RosPrintfS;
-template class RosPrintfS;
-template class RosPrintfS;
-template class RosPrintfS;
-template class RosPrintfS;
-
-template class RosPrintfS;
-template class RosPrintfS;
Index: tools/src/librtools/RmethDsc.hpp
===================================================================
--- tools/src/librtools/RmethDsc.hpp (revision 10)
+++ tools/src/librtools/RmethDsc.hpp (nonexistent)
@@ -1,55 +0,0 @@
-// $Id: RmethDsc.hpp 360 2011-02-11 20:35:11Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-11 360 1.1 templetize object type TO and arglist type TA
-// 2011-02-06 359 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RmethDsc.hpp 360 2011-02-11 20:35:11Z mueller $
- \brief Declaration of class RmethDsc .
-*/
-
-#include "RmethDscBase.hpp"
-
-#ifndef included_Retro_RmethDsc
-#define included_Retro_RmethDsc 1
-
-namespace Retro {
-
- template
- class RmethDsc : public RmethDscBase {
- public:
- typedef int (TO::*pmeth_t) (TA& alist);
-
- RmethDsc();
- RmethDsc(TO* pobj, pmeth_t pmeth);
- RmethDsc(const RmethDsc& rhs);
- virtual ~RmethDsc();
-
- virtual int operator()(TA& alist);
-
- private:
- TO* fpObj;
- pmeth_t fpMeth;
- };
-
-} // end namespace Retro
-
-// implementation is all inline
-#include "RmethDsc.ipp"
-
-#endif
Index: tools/src/librtools/RosPrintfS.hpp
===================================================================
--- tools/src/librtools/RosPrintfS.hpp (revision 10)
+++ tools/src/librtools/RosPrintfS.hpp (nonexistent)
@@ -1,55 +0,0 @@
-// $Id: RosPrintfS.hpp 357 2011-01-31 08:00:13Z mueller $
-//
-// Copyright 2000-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Adopted from CTBprintfS
-// 2000-10-29 - - Last change on CTBprintfS
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosPrintfS.hpp 357 2011-01-31 08:00:13Z mueller $
- \brief Declaration of class RosPrintfS .
-*/
-
-#ifndef included_Retro_RosPrintfS
-#define included_Retro_RosPrintfS 1
-
-#include "RosPrintfBase.hpp"
-
-namespace Retro {
-
- template
- class RosPrintfS : public RosPrintfBase {
- public:
- RosPrintfS(T value, const char* form, int width, int prec);
-
- virtual void ToStream(std::ostream& os) const;
-
- protected:
- T fValue; //!< value to be printed
- };
-
- template <>
- void RosPrintfS::ToStream(std::ostream& os) const;
- template <>
- void RosPrintfS::ToStream(std::ostream& os) const;
- template <>
- void RosPrintfS::ToStream(std::ostream& os) const;
- template <>
- void RosPrintfS::ToStream(std::ostream& os) const;
-
-} // end namespace Retro
-
-#endif
Index: tools/src/librtools/RmethDsc.ipp
===================================================================
--- tools/src/librtools/RmethDsc.ipp (revision 10)
+++ tools/src/librtools/RmethDsc.ipp (nonexistent)
@@ -1,88 +0,0 @@
-// $Id: RmethDsc.ipp 360 2011-02-11 20:35:11Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-11 360 1.1 templetize object type TO and arglist type TA
-// 2011-02-06 359 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RmethDsc.ipp 360 2011-02-11 20:35:11Z mueller $
- \brief Implemenation (inline) of RmethDsc
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-/*!
- \class RmethDsc
- \brief FIXME_text
-*/
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief Default constructor.
-*/
-
-template
-inline RmethDsc::RmethDsc()
- : fpObj(),
- fpMeth()
-{}
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief FIXME_text
-*/
-
-template
-inline RmethDsc::RmethDsc(TO* pobj, pmeth_t pmeth)
- : fpObj(pobj),
- fpMeth(pmeth)
-{}
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief Copy constructor.
-*/
-
-template
-inline RmethDsc::RmethDsc(const RmethDsc& rhs)
- : fpObj(rhs.fpObj),
- fpMeth(rhs.fpMeth)
-{}
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief Destructor.
-*/
-
-template
-inline RmethDsc::~RmethDsc()
-{}
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief FIXME_text
-*/
-
-template
-inline int RmethDsc::operator()(TA& alist)
-{
- return (fpObj->*fpMeth)(alist);
-}
-
-
-} // end namespace Retro
Index: tools/src/librtools/RerrMsg.cpp
===================================================================
--- tools/src/librtools/RerrMsg.cpp (revision 10)
+++ tools/src/librtools/RerrMsg.cpp (nonexistent)
@@ -1,183 +0,0 @@
-// $Id: RerrMsg.cpp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-06 359 1.1 use references in interface, fix printf usage
-// 2011-01-15 356 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RerrMsg.cpp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation of RerrMsg.
-*/
-
-#include
-#include
-#include
-
-#include "RerrMsg.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RerrMsg
- \brief FIXME_docs
-*/
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-RerrMsg::RerrMsg()
- : fMeth(),
- fText()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RerrMsg::RerrMsg(const RerrMsg& rhs)
- : fMeth(rhs.fMeth),
- fText(rhs.fText)
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RerrMsg::~RerrMsg()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RerrMsg::Init(const std::string& meth, const std::string& text)
-{
- fMeth = meth;
- fText = text;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RerrMsg::InitErrno(const std::string& meth,
- const std::string& text, int errnum)
-{
- fMeth = meth;
- fText = text;
- AppendErrno(errnum);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RerrMsg::InitPrintf(const std::string& meth, const char* format, ...)
-{
- fMeth = meth;
-
- char buf[1024];
- buf[0] = 0;
-
- va_list ap;
- va_start (ap, format);
- vsnprintf (buf, sizeof(buf), format, ap);
- va_end (ap);
-
- fText = buf;
-
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RerrMsg::Prepend(const std::string& meth)
-{
- fMeth = meth + "->" + fMeth;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RerrMsg::Append(const std::string& text)
-{
- fText += text;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RerrMsg::AppendErrno(int errnum)
-{
- fText += strerror(errnum);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RerrMsg::AppendPrintf(const char* format, ...)
-{
- char buf[1024];
- buf[0] = 0;
-
- va_list ap;
- va_start (ap, format);
- vsnprintf (buf, sizeof(buf), format, ap);
- va_end (ap);
-
- fText += buf;
-
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-std::string RerrMsg::Message() const
-{
- return fMeth + ": " + fText;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RerrMsg::Grab(RerrMsg& rhs)
-{
- fMeth.swap(rhs.fMeth);
- fText.swap(rhs.fText);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RerrMsg& RerrMsg::operator=(const RerrMsg& rhs)
-{
- if (&rhs == this) return *this;
- fMeth = rhs.fMeth;
- fText = rhs.fText;
- return *this;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RerrMsg_NoInline))
-#define inline
-#include "RerrMsg.ipp"
-#undef inline
-#endif
Index: tools/src/librtools/RosPrintfBase.cpp
===================================================================
--- tools/src/librtools/RosPrintfBase.cpp (revision 10)
+++ tools/src/librtools/RosPrintfBase.cpp (nonexistent)
@@ -1,51 +0,0 @@
-// $Id: $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-25 364 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: $
- \brief Implemenation of RosPrintfBase .
-*/
-
-#include
-
-#include "RosPrintfBase.hpp"
-
-using namespace std;
-using namespace Retro;
-
-//------------------------------------------+-----------------------------------
-/*!
- \relates RosPrintfBase
- \brief string insertion
-*/
-
-std::string& Retro::operator<<(std::string& os, const RosPrintfBase& obj)
-{
- std::ostringstream sos;
- obj.ToStream(sos);
- os += sos.str();
- return os;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RosPrintfBase_NoInline))
-#define inline
-#include "RosPrintfBase.ipp"
-#undef inline
-#endif
Index: tools/src/librtools/Rtools.cpp
===================================================================
--- tools/src/librtools/Rtools.cpp (revision 10)
+++ tools/src/librtools/Rtools.cpp (nonexistent)
@@ -1,63 +0,0 @@
-// $Id: $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-12 368 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: $
- \brief Implemenation of Rtools .
-*/
-
-#include
-
-#include "Rtools.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::Rtools
- \brief FIXME_docs
-*/
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-std::string Rtools::Flags2String(uint32_t flags, const RflagName* fnam,
- char delim)
-{
- if (fnam == 0)
- throw invalid_argument("Rtools::Flags2String: fnam==NULL");
-
- string rval;
- while (fnam->mask) {
- if (flags & fnam->mask) {
- if (!rval.empty()) rval += delim;
- rval += fnam->name;
- }
- fnam++;
- }
- return rval;
-}
-
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_Rtools_NoInline))
-#define inline
-//#include "Rtools.ipp"
-#undef inline
-#endif
Index: tools/src/librtools/RerrMsg.hpp
===================================================================
--- tools/src/librtools/RerrMsg.hpp (revision 10)
+++ tools/src/librtools/RerrMsg.hpp (nonexistent)
@@ -1,77 +0,0 @@
-// $Id: RerrMsg.hpp 359 2011-02-06 22:37:43Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-06 359 1.1 use references in interface
-// 2011-01-15 356 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-
-/*!
- \file
- \version $Id: RerrMsg.hpp 359 2011-02-06 22:37:43Z mueller $
- \brief Declaration of class RerrMsg.
-*/
-
-#ifndef included_Retro_RerrMsg
-#define included_Retro_RerrMsg 1
-
-#include
-#include
-
-namespace Retro {
-
- class RerrMsg {
- public:
- RerrMsg();
- RerrMsg(const RerrMsg& rhs);
- ~RerrMsg();
-
- void Init(const std::string& meth, const std::string& text);
- void InitErrno(const std::string& meth,
- const std::string& text, int errnum);
- void InitPrintf(const std::string& meth,
- const char* format, ...);
-
- void SetMeth(const std::string& meth);
- void SetText(const std::string& text);
-
- void Prepend(const std::string& meth);
- void Append(const std::string& text);
- void AppendErrno(int errnum);
- void AppendPrintf(const char* format, ...);
-
- const std::string& Meth() const;
- const std::string& Text() const;
- std::string Message() const;
-
- void Grab(RerrMsg& rhs);
-
- RerrMsg& operator=(const RerrMsg& rhs);
- operator std::string() const;
-
- protected:
- std::string fMeth; //!< originating method
- std::string fText; //!< message text
- };
-
- std::ostream& operator<<(std::ostream& os, const RerrMsg& obj);
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RerrMsg_NoInline))
-#include "RerrMsg.ipp"
-#endif
-
-#endif
Index: tools/src/librtools/RosPrintfBase.hpp
===================================================================
--- tools/src/librtools/RosPrintfBase.hpp (revision 10)
+++ tools/src/librtools/RosPrintfBase.hpp (nonexistent)
@@ -1,57 +0,0 @@
-// $Id: RosPrintfBase.hpp 364 2011-02-26 08:33:01Z mueller $
-//
-// Copyright 2006-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-25 364 1.1 Support << also to string
-// 2011-01-30 357 1.0 Adopted from CTBprintfBase
-// 2006-04-16 - - Last change on CTBprintfBase
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosPrintfBase.hpp 364 2011-02-26 08:33:01Z mueller $
- \brief Declaration of RosPrintfBase class .
-*/
-
-#ifndef included_Retro_RosPrintfBase
-#define included_Retro_RosPrintfBase 1
-
-#include
-#include
-
-namespace Retro {
-
- class RosPrintfBase {
- public:
- RosPrintfBase(const char* form, int width, int prec);
- virtual ~RosPrintfBase();
-
- virtual void ToStream(std::ostream& os) const = 0;
-
- protected:
- const char* fForm; //!< format string
- int fWidth; //!< field width
- int fPrec; //!< field precision
- };
-
- std::ostream& operator<<(std::ostream& os, const RosPrintfBase& obj);
- std::string& operator<<(std::string& os, const RosPrintfBase& obj);
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RosPrintfBase_NoInline))
-#include "RosPrintfBase.ipp"
-#endif
-
-#endif
Index: tools/src/librtools/RerrMsg.ipp
===================================================================
--- tools/src/librtools/RerrMsg.ipp (revision 10)
+++ tools/src/librtools/RerrMsg.ipp (nonexistent)
@@ -1,83 +0,0 @@
-// $Id: RerrMsg.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-06 359 1.1 use references in interface
-// 2011-01-15 356 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RerrMsg.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of RerrMsg.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RerrMsg::SetMeth(const std::string& meth)
-{
- fMeth = meth;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RerrMsg::SetText(const std::string& text)
-{
- fText = text;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline const std::string& RerrMsg::Meth() const
-{
- return fMeth;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline const std::string& RerrMsg::Text() const
-{
- return fText;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline RerrMsg::operator std::string() const
-{
- return Message();
-}
-
-//------------------------------------------+-----------------------------------
-/*!
- \relates RerrMsg
- \brief ostream insertion operator.
-*/
-
-inline std::ostream& operator<<(std::ostream& os, const RerrMsg& obj)
-{
- os << obj.Message();
- return os;
-}
-
-} // end namespace Retro
Index: tools/src/librtools/RosPrintfBase.ipp
===================================================================
--- tools/src/librtools/RosPrintfBase.ipp (revision 10)
+++ tools/src/librtools/RosPrintfBase.ipp (nonexistent)
@@ -1,74 +0,0 @@
-// $Id: RosPrintfBase.ipp 359 2011-02-06 22:37:43Z mueller $
-//
-// Copyright 2006-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Adopted from RosPrintfBase
-// 2006-04-16 - - Last change on RosPrintfBase
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosPrintfBase.ipp 359 2011-02-06 22:37:43Z mueller $
- \brief Implemenation (inline) of RosPrintfBase
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-/*!
- \class RosPrintfBase
- \brief Base class for print objects. **
-*/
-//------------------------------------------+-----------------------------------
-/*!
- \fn Retro::RosPrintfBase::ToStream(ostream& os) const
- \brief Concrete implementation of the ostream insertion.
-*/
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief Constructor.
-
- \param form format descriptor string
- \param width field width
- \param prec precision
-*/
-
-inline RosPrintfBase::RosPrintfBase(const char* form, int width, int prec)
- : fForm(form),
- fWidth(width),
- fPrec(prec)
-{}
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief Destructor.
-*/
-
-inline RosPrintfBase::~RosPrintfBase()
-{}
-
-//------------------------------------------+-----------------------------------
-/*!
- \relates RosPrintfBase
- \brief ostream insertion
-*/
-
-inline std::ostream& operator<<(std::ostream& os, const RosPrintfBase& obj)
-{
- obj.ToStream(os);
- return os;
-}
-
-} // end namespace Retro
Index: tools/src/librtools/Rtools.hpp
===================================================================
--- tools/src/librtools/Rtools.hpp (revision 10)
+++ tools/src/librtools/Rtools.hpp (nonexistent)
@@ -1,50 +0,0 @@
-// $Id: $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-12 368 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: $
- \brief Declaration of class Rtools .
-*/
-
-#ifndef included_Retro_Rtools
-#define included_Retro_Rtools 1
-
-#include
-#include
-
-namespace Retro {
-
- struct RflagName {
- uint32_t mask;
- const char* name;
- };
-
-
- namespace Rtools {
- std::string Flags2String(uint32_t flags, const RflagName* fnam,
- char delim='|');
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_Rtools_NoInline))
-//#include "Rtools.ipp"
-#endif
-
-#endif
Index: tools/src/librtools/Makefile
===================================================================
--- tools/src/librtools/Makefile (revision 10)
+++ tools/src/librtools/Makefile (nonexistent)
@@ -1,57 +0,0 @@
-# $Id: Makefile 374 2011-03-27 17:02:47Z mueller $
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-27 374 1.0.1 removed Rnamed (obsolete now)
-# 2011-01-15 357 1.0 Initial version (adopted from CTB...)
-#---
-#
-# Name of the sharable library
-#
-SONAME = rtools
-SOMAJV = 1
-SOMINV = 0
-#
-# Compile and Link search paths
-#
-INCLFLAGS =
-LDLIBS =
-#
-# Object files to be included
-#
-OBJ_all = RerrMsg.o RosFill.o RosPrintBvi.o RosPrintfBase.o RosPrintfS.o \
- RiosState.o \
- RlogFile.o RlogStd.o \
- Rstats.o Rtools.o
-#
-DEP_all = $(OBJ_all:.o=.dep)
-#
-#- generic part ----------------------------------------------------------------
-#
-SOFILE = lib$(SONAME).so
-SOFILEV = lib$(SONAME).so.$(SOMAJV)
-SOFILEVV = lib$(SONAME).so.$(SOMAJV).$(SOMINV)
-#
-include $(RETROBASE)/tools/make/generic_cpp.mk
-include $(RETROBASE)/tools/make/generic_dep.mk
-include $(RETROBASE)/tools/make/generic_so.mk
-#
-# The magic autodependcy include
-#
-include $(DEP_all)
-#
-# cleanup phonies:
-#
-.PHONY : clean cleandep realclean
-clean :
- @ rm -f $(OBJ_all)
- @ echo "Object files removed"
-#
-cleandep :
- @ rm -f $(DEP_all)
- @ echo "Dependency files removed"
-#
-realclean : clean cleandep
- @ rm -f $(SOPATH)/lib$(SONAME).a $(SOPATH)/lib$(SONAME).so*
- @ echo "Libraries removed"
-#
Index: tools/src/librtools/.cvsignore
===================================================================
--- tools/src/librtools/.cvsignore (revision 10)
+++ tools/src/librtools/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-*.dep
Index: tools/src/librtools/RlogFile.cpp
===================================================================
--- tools/src/librtools/RlogFile.cpp (revision 10)
+++ tools/src/librtools/RlogFile.cpp (nonexistent)
@@ -1,145 +0,0 @@
-// $Id: RlogFile.cpp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RlogFile.cpp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation of RlogFile.
-*/
-
-#include
-
-#include "RlogFile.hpp"
-#include "RosPrintf.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RlogFile
- \brief FIXME_docs
-*/
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-RlogFile::RlogFile()
- : fpExtStream(0),
- fIntStream()
-{
- ClearTime();
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RlogFile::RlogFile(std::ostream* os)
- : fpExtStream(os),
- fIntStream()
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RlogFile::~RlogFile()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RlogFile::Open(std::string name)
-{
- fpExtStream = 0;
- fIntStream.open(name.c_str());
- return fIntStream.is_open();
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RlogFile::Close()
-{
- fIntStream.close();
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RlogFile::UseStream(std::ostream* os)
-{
- if (fIntStream.is_open()) Close();
- fpExtStream = os;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-std::ostream& RlogFile::operator()(char c)
-{
- struct timeval tval;
- gettimeofday(&tval, 0);
-
- struct tm tymd;
- localtime_r(&tval.tv_sec, &tymd);
-
- ostream& os = operator()();
-
- if (tymd.tm_year != fTagYear ||
- tymd.tm_mon != fTagMonth ||
- tymd.tm_mday != fTagDay) {
-
- os << "-+- "
- << RosPrintf(tymd.tm_year+1900,"d",4) << "-"
- << RosPrintf(tymd.tm_mon,"d0",2) << "-"
- << RosPrintf(tymd.tm_mday,"d0",2) << " -+- \n";
-
- fTagYear = tymd.tm_year;
- fTagMonth = tymd.tm_mon;
- fTagDay = tymd.tm_mday;
- }
-
- int usec = (int)(tval.tv_usec/1000);
-
- os << "-" << c << "- "
- << RosPrintf(tymd.tm_hour,"d0",2) << ":"
- << RosPrintf(tymd.tm_min,"d0",2) << ":"
- << RosPrintf(tymd.tm_sec,"d0",2) << "."
- << RosPrintf(usec,"d0",3) << " : ";
-
- return os;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RlogFile::ClearTime()
-{
- fTagYear = -1;
- fTagMonth = -1;
- fTagDay = -1;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RlogFile_NoInline))
-#define inline
-#include "RlogFile.ipp"
-#undef inline
-#endif
Index: tools/src/librtools/RlogFile.hpp
===================================================================
--- tools/src/librtools/RlogFile.hpp (revision 10)
+++ tools/src/librtools/RlogFile.hpp (nonexistent)
@@ -1,71 +0,0 @@
-// $Id: RlogFile.hpp 357 2011-01-31 08:00:13Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RlogFile.hpp 357 2011-01-31 08:00:13Z mueller $
- \brief Declaration of class RlogFile.
-*/
-
-#ifndef included_Retro_RlogFile
-#define included_Retro_RlogFile 1
-
-#include
-#include
-#include
-
-namespace Retro {
-
- class RlogFile {
- public:
- RlogFile();
- explicit RlogFile(std::ostream* os);
- ~RlogFile();
-
- bool Open(std::string name);
- void Close();
- void UseStream(std::ostream* os);
-
- std::ostream& operator()();
- std::ostream& operator()(char c);
-
- protected:
- void ClearTime();
-
- protected:
- std::ostream* fpExtStream; //!< pointer to external stream
- std::ofstream fIntStream; //!< internal stream
- int fTagYear; //!< year of last time tag
- int fTagMonth; //!< month of last time tag
- int fTagDay; //!< day of last time tag
-
- // RlogFile is not copy or assignable
- private:
- RlogFile(const RlogFile& rhs);
- RlogFile& operator=(const RlogFile& rhs);
-
-
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RlogFile_NoInline))
-#include "RlogFile.ipp"
-#endif
-
-#endif
Index: tools/src/librtools/RmethDscBase.hpp
===================================================================
--- tools/src/librtools/RmethDscBase.hpp (revision 10)
+++ tools/src/librtools/RmethDscBase.hpp (nonexistent)
@@ -1,48 +0,0 @@
-// $Id: RmethDscBase.hpp 360 2011-02-11 20:35:11Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-11 360 1.1 templetize arglist type
-// 2011-02-06 359 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RmethDscBase.hpp 360 2011-02-11 20:35:11Z mueller $
- \brief Declaration of class RmethDscBase .
-*/
-
-#ifndef included_Retro_RmethDscBase
-#define included_Retro_RmethDscBase 1
-
-namespace Retro {
-
- template
- class RmethDscBase {
- public:
- RmethDscBase();
- RmethDscBase(const RmethDscBase& rhs);
- virtual ~RmethDscBase();
-
- virtual int operator()(TA& alist)=0;
-
- private:
- };
-
-} // end namespace Retro
-
-// implementation is all inline
-#include "RmethDscBase.ipp"
-
-#endif
Index: tools/src/librtools/RlogFile.ipp
===================================================================
--- tools/src/librtools/RlogFile.ipp (revision 10)
+++ tools/src/librtools/RlogFile.ipp (nonexistent)
@@ -1,36 +0,0 @@
-// $Id: RlogFile.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RlogFile.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of RlogFile.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline std::ostream& RlogFile::operator()()
-{
- return fpExtStream ? *fpExtStream : fIntStream;
-}
-
-} // end namespace Retro
Index: tools/src/librtools/RosFill.cpp
===================================================================
--- tools/src/librtools/RosFill.cpp (revision 10)
+++ tools/src/librtools/RosFill.cpp (nonexistent)
@@ -1,92 +0,0 @@
-// $Id: RosFill.cpp 364 2011-02-26 08:33:01Z mueller $
-//
-// Copyright 2000-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-25 364 1.1 Support << also to string
-// 2011-01-30 357 1.0 Adopted from RosFill
-// 2000-02-29 - - Last change on RosFill
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosFill.cpp 364 2011-02-26 08:33:01Z mueller $
- \brief Implemenation of RosFill .
-*/
-
-#include "RosFill.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RosFill
- \brief I/O appicator to generate fill characters.
-
- An \c RosFill object will add a given number of fill characters to an output
- stream each time the object is inserted into the stream. The fill character
- and the repeat count are specified when the object is constructed.
-
- A typical usage of \c RosFill is to implement indention, especially when the
- amount of indention is only known at runtime. The a Dump() function of a
- class may use use \c RosFill following the pattern:
- \code
-void xyz::Dump(ostream& os, int indent) const
-{
- RosFill bl(indent);
-
- os << bl << "-- xyz " << " @ " << this << endl;
- os << bl << " fMember1: " << fMember1 << endl;
- os << bl << " fMember2: " << fMember2 << endl;
- fEmbeddedClass.Dump(os, indent+2);
- return;
-}
- \endcode
-
- The indention is passed with \c indent. The object \c bl is setup to
- create \c indent blanks and thrown into the outstream \c os at the
- start of each output line. The \c Dump() function of member variables of
- class type is called with a increamented indention (here \c indent+2).
- This finally produces a nicely structured output.
-*/
-
-//------------------------------------------+-----------------------------------
-/*!
- \relates RosFill
- \brief ostream insertion operator.
-*/
-
-std::ostream& Retro::operator<<(std::ostream& os, const RosFill& obj)
-{
- for (int i=0; i
-//
-// 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
-// 2011-02-11 360 1.1 templetize arglist type
-// 2011-02-06 359 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RmethDscBase.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of RmethDscBase
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-/*!
- \class RmethDscBase
- \brief FIXME_docs
-*/
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief Default constructor.
-*/
-
-template
-inline RmethDscBase::RmethDscBase()
-{}
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief Copy constructor.
-*/
-
-template
-inline RmethDscBase::RmethDscBase(const RmethDscBase& rhs)
-{}
-
-//------------------------------------------+-----------------------------------
-/*!
- \brief Destructor.
-*/
-
-template
-inline RmethDscBase::~RmethDscBase()
-{}
-
-
-} // end namespace Retro
Index: tools/src/librtools/RiosState.cpp
===================================================================
--- tools/src/librtools/RiosState.cpp (revision 10)
+++ tools/src/librtools/RiosState.cpp (nonexistent)
@@ -1,161 +0,0 @@
-// $Id: RiosState.cpp 359 2011-02-06 22:37:43Z mueller $
-//
-// Copyright 2006-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Adopted from CTBioState
-// 2006-04-16 - - Last change on CTBioState
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RiosState.cpp 359 2011-02-06 22:37:43Z mueller $
- \brief Implemenation of RiosState.
-*/
-
-#include "RiosState.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RiosState
- \brief Stack object for ostream state. **
-*/
-
-//------------------------------------------+-----------------------------------
-//! Construct with stream.
-
-RiosState::RiosState(ios& stream)
- : fStream(stream)
-{
- fOldFlags = fStream.flags();
- fOldPrecision = -1;
- fOldFill = 0;
- fCtype = 0;
-}
-
-//------------------------------------------+-----------------------------------
-//! Construct from stream and format.
-
-RiosState::RiosState(ios& stream, const char* form, int prec)
- : fStream(stream)
-{
- fOldFlags = fStream.flags();
- fOldPrecision = -1;
- fOldFill = 0;
- SetFormat(form, prec);
-}
-
-//------------------------------------------+-----------------------------------
-//! Destructor.
-
-RiosState::~RiosState()
-{
- fStream.flags(fOldFlags);
- if (fOldPrecision >= 0) fStream.precision(fOldPrecision);
- if (fOldFill != 0) fStream.fill(fOldFill);
-}
-
-//------------------------------------------+-----------------------------------
-//! Setup format.
-
-void RiosState::SetFormat(const char* form, int prec)
-{
- bool b_plus = false;
- bool b_minus = false;
- bool b_point = false;
- bool b_dollar = false;
- bool b_internal = false;
- char c_ctype = 0;
- char c_fill = 0;
- char c;
-
- if (form == 0) form = ""; // allow null as format
-
- for (c = *form++; ; c = *form++) {
- if (c == '+') { b_plus = true; continue;}
- if (c == '-') { b_minus = true; continue;}
- if (c == '.') { b_point = true; continue;}
- if (c == '$') { b_dollar = true; continue;}
- break;
- }
-
- if (c != 0 && isalpha(c)) { c_ctype = c; c = *form++; }
- if (c != 0) c_fill = c;
-
- if (prec >= 0) {
- int i_old_precision = fStream.precision(prec);
- if (fOldPrecision < 0) fOldPrecision = i_old_precision;
- }
- if (c_fill != 0) {
- char c_old_fill = fStream.fill(c_fill);
- if (fOldFill == 0) fOldFill = c_old_fill;
- }
-
- fCtype = c_ctype;
-
- switch(c_ctype) {
- case 'd':
- b_internal = !b_minus & (c_fill == '0');
- fStream.setf(ios::dec,ios::basefield);
- break;
- case 'o':
- b_internal = !b_minus & (c_fill == '0');
- fStream.setf(ios::oct,ios::basefield);
- break;
- case 'x':
- case 'X':
- b_internal = !b_minus & (c_fill == '0');
- fStream.setf(ios::hex,ios::basefield);
- if (isupper(c_ctype)) fStream.setf(ios::uppercase);
- break;
- case 'g':
- case 'G':
- b_internal = !b_minus & (c_fill == '0');
- fStream.setf(ios_base::fmtflags(0),ios::floatfield);
- if (isupper(c_ctype)) fStream.setf(ios::uppercase);
- break;
- case 'f':
- b_internal = !b_minus & (c_fill == '0');
- fStream.setf(ios::fixed,ios::floatfield);
- break;
- case 'e':
- case 'E':
- b_internal = !b_minus & (c_fill == '0');
- fStream.setf(ios::scientific,ios::floatfield);
- if (isupper(c_ctype)) fStream.setf(ios::uppercase);
- break;
- case 's':
- case 'p':
- case 'c':
- break;
- }
-
- {
- ios_base::fmtflags l_flags = ios_base::fmtflags(0);
- if (b_plus) l_flags |= ios::showpos;
- if (b_point) l_flags |= ios::showpoint;
- if (b_dollar) l_flags |= ios::showbase;
- fStream.setf(l_flags);
- fStream.setf(b_internal ? ios::internal :
- (b_minus ? ios::left : ios::right), ios::adjustfield);
- }
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RiosState_NoInline))
-#define inline
-#include "RiosState.ipp"
-#undef inline
-#endif
Index: tools/src/librtools/RlogStd.cpp
===================================================================
--- tools/src/librtools/RlogStd.cpp (revision 10)
+++ tools/src/librtools/RlogStd.cpp (nonexistent)
@@ -1,34 +0,0 @@
-// $Id: RlogStd.cpp 359 2011-02-06 22:37:43Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-04 358 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RlogStd.cpp 359 2011-02-06 22:37:43Z mueller $
- \brief Implemenation of RlogStd.
-*/
-
-#include
-
-#include "RlogStd.hpp"
-
-//------------------------------------------+-----------------------------------
-// define global RlogFile objects
-
-Retro::RlogFile Retro::gRcout(&std::cout); //!< foo
-Retro::RlogFile Retro::gRcerr(&std::cerr); //!< bar
-
Index: tools/src/librtools/RosFill.hpp
===================================================================
--- tools/src/librtools/RosFill.hpp (revision 10)
+++ tools/src/librtools/RosFill.hpp (nonexistent)
@@ -1,57 +0,0 @@
-// $Id: RosFill.hpp 364 2011-02-26 08:33:01Z mueller $
-//
-// Copyright 2000-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-25 364 1.1 Support << also to string
-// 2011-01-30 359 1.0 Adopted from CTBosFill
-// 2000-02-06 - - Last change on CTBosFill
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosFill.hpp 364 2011-02-26 08:33:01Z mueller $
- \brief Declaration of class RosFill .
-*/
-
-#ifndef included_Retro_RosFill
-#define included_Retro_RosFill 1
-
-#include
-#include
-
-namespace Retro {
-
- class RosFill {
- public:
- RosFill(int count=0, char fill=' ');
-
- int Count() const;
- char Fill() const;
-
- private:
- int fCount; //!< blank count
- char fFill; //!< fill character
-
- };
-
- std::ostream& operator<<(std::ostream& os, const RosFill& obj);
- std::string& operator<<(std::string& os, const RosFill& obj);
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RosFill_NoInline))
-#include "RosFill.ipp"
-#endif
-
-#endif
Index: tools/src/librtools/Rstats.cpp
===================================================================
--- tools/src/librtools/Rstats.cpp (revision 10)
+++ tools/src/librtools/Rstats.cpp (nonexistent)
@@ -1,213 +0,0 @@
-// $Id: Rstats.cpp 368 2011-03-12 09:58:53Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-06 367 1.0.1 use max from algorithm
-// 2011-02-06 359 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: Rstats.cpp 368 2011-03-12 09:58:53Z mueller $
- \brief Implemenation of Rstats .
-*/
-
-#include
-#include
-
-#include "Rstats.hpp"
-#include "RosFill.hpp"
-#include "RosPrintf.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::Rstats
- \brief FIXME_docs
-*/
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-Rstats::Rstats()
- : fValue(),
- fName(),
- fText(),
- fHash(0),
- fFormat("f"),
- fWidth(12),
- fPrec(0)
-{}
-
-//------------------------------------------+-----------------------------------
-//! Copy constructor
-
-Rstats::Rstats(const Rstats& rhs)
- : fValue(rhs.fValue),
- fName(rhs.fName),
- fText(rhs.fText),
- fHash(rhs.fHash),
- fFormat(rhs.fFormat),
- fWidth(rhs.fWidth),
- fPrec(rhs.fPrec)
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-Rstats::~Rstats()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void Rstats::Define(size_t ind, const std::string& name,
- const std::string& text)
-{
- // update hash
- for (size_t i=0; i= Size()) {
- fValue.resize(ind+1);
- fName.resize(ind+1);
- fText.resize(ind+1);
- }
- fValue[ind] = 0.;
- fName[ind] = name;
- fText[ind] = text;
- }
-
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void Rstats::SetFormat(const char* format, int width, int prec)
-{
- fFormat = format;
- fWidth = width;
- fPrec = prec;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void Rstats::Print(std::ostream& os, const char* format,
- int width, int prec) const
-{
- if (format == 0 || format[0]==0) {
- format = fFormat.c_str();
- width = fWidth;
- prec = fPrec;
- }
-
- for (size_t i=0; i
-//
-// 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
-// 2011-01-30 359 1.0 Adopted from CTBosFill
-// 2000-02-06 - - Last change on CTBosFill
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosFill.ipp 359 2011-02-06 22:37:43Z mueller $
- \brief Implemenation (inline) of RosFill.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! Constructor.
-/*!
- The fill character is specified with \a fill, the repeat count is
- specified with \a count. Note, that RosFill does not have a default
- constructor and that this constructor is the only means to set this object up.
- Note also, that the \a fill argument can be omitted, the default fill
- character is a blank.
-*/
-inline RosFill::RosFill(int count, char fill)
- : fCount(count),
- fFill(fill)
-{}
-
-//------------------------------------------+-----------------------------------
-//! Get repeat count.
-
-inline int RosFill::Count() const
-{
- return fCount;
-}
-
-//------------------------------------------+-----------------------------------
-//! Get fill character.
-
-inline char RosFill::Fill() const
-{
- return fFill;
-}
-
-} // end namespace Retro
Index: tools/src/librtools/RosPrintBvi.cpp
===================================================================
--- tools/src/librtools/RosPrintBvi.cpp (revision 10)
+++ tools/src/librtools/RosPrintBvi.cpp (nonexistent)
@@ -1,147 +0,0 @@
-// $Id: RosPrintBvi.cpp 368 2011-03-12 09:58:53Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-12 368 1.0.1 allow base=0, will print in hex,oct and bin
-// 2011-03-05 366 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosPrintBvi.cpp 368 2011-03-12 09:58:53Z mueller $
- \brief Implemenation of RosPrintBvi .
-*/
-
-#include
-
-#include "RosPrintBvi.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RosPrintBvi
- \brief FIXME_docs.
-*/
-
-//------------------------------------------+-----------------------------------
-//! Constructor. FIXME_docs
-
-RosPrintBvi::RosPrintBvi(uint8_t val, size_t base, size_t nbit)
- : fVal((uint8_t)val),
- fBase(base),
- fNbit(nbit)
-{
- if (base!=0 && base!=2 && base!=8 && base!=16)
- throw invalid_argument("RosPrintBvi::ctor: base must be 0,2,8, or 16");
- if (nbit<1 || nbit>8)
- throw invalid_argument("RosPrintBvi::ctor: nbit must be in 1,..,8");
-}
-
-//------------------------------------------+-----------------------------------
-//! Constructor. FIXME_docs
-
-RosPrintBvi::RosPrintBvi(uint16_t val, size_t base, size_t nbit)
- : fVal((uint16_t)val),
- fBase(base),
- fNbit(nbit)
-{
- if (base!=0 && base!=2 && base!=8 && base!=16)
- throw invalid_argument("RosPrintBvi::ctor: base must be 0,2,8, or 16");
- if (nbit<1 || nbit>16)
- throw invalid_argument("RosPrintBvi::ctor: nbit must be in 1,..,16");
-}
-
-//------------------------------------------+-----------------------------------
-//! Constructor. FIXME_docs
-
-RosPrintBvi::RosPrintBvi(uint32_t val, size_t base, size_t nbit)
- : fVal(val),
- fBase(base),
- fNbit(nbit)
-{
- if (base!=0 && base!=2 && base!=8 && base!=16)
- throw invalid_argument("RosPrintBvi::ctor: base must be 0,2,8, or 16");
- if (nbit<1 || nbit>32)
- throw invalid_argument("RosPrintBvi::ctor: nbit must be in 1,..,32");
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RosPrintBvi::Print(std::ostream& os) const
-{
- if (fBase == 0) {
- os << RosPrintBvi(fVal, 16, fNbit) << " "
- << RosPrintBvi(fVal, 8, fNbit) << " "
- << RosPrintBvi(fVal, 2, fNbit);
- return;
- }
-
- char buf[33];
- Convert(buf);
- os << buf;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RosPrintBvi::Print(std::string& os) const
-{
- if (fBase == 0) {
- os << RosPrintBvi(fVal, 16, fNbit);
- os += " ";
- os << RosPrintBvi(fVal, 8, fNbit);
- os += " ";
- os << RosPrintBvi(fVal, 2, fNbit);
- return;
- }
-
- char buf[33];
- Convert(buf);
- os += buf;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RosPrintBvi::Convert(char* pbuf) const
-{
-
- size_t nwidth = 1;
- if (fBase == 8) nwidth = 3;
- if (fBase == 16) nwidth = 4;
- uint32_t nmask = (1<0; i--) {
- uint32_t nibble = ((fVal)>>((i-1)*nwidth)) & nmask;
- nibble += (nibble <= 9) ? '0' : ('a'-10);
- *pbuf++ = (char) nibble;
- }
-
- *pbuf++ = '\0';
-
- return;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RosPrintBvi_NoInline))
-#define inline
-#include "RosPrintBvi.ipp"
-#undef inline
-#endif
Index: tools/src/librtools/RiosState.hpp
===================================================================
--- tools/src/librtools/RiosState.hpp (revision 10)
+++ tools/src/librtools/RiosState.hpp (nonexistent)
@@ -1,64 +0,0 @@
-// $Id: RiosState.hpp 357 2011-01-31 08:00:13Z mueller $
-//
-// Copyright 2006-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Adopted from CTBioState
-// 2006-04-16 - - Last change on CTBioState
-// ---------------------------------------------------------------------------
-
-
-/*!
- \file
- \version $Id: RiosState.hpp 357 2011-01-31 08:00:13Z mueller $
- \brief Declaration of class RiosState.
-*/
-
-#ifndef included_Retro_RiosState
-#define included_Retro_RiosState 1
-
-#include
-
-namespace Retro {
-
- class RiosState {
- public:
- RiosState(std::ios& stream);
- RiosState(std::ios& stream, const char* form, int prec=-1);
- ~RiosState();
-
- void SetFormat(const char* form, int prec=-1);
- char Ctype();
-
- protected:
- std::ios& fStream;
- std::ios_base::fmtflags fOldFlags;
- int fOldPrecision;
- char fOldFill;
- char fCtype;
-
- // RiosState can't be default constructed, copied or assigned
- private:
- RiosState();
- RiosState(const RiosState& rhs);
- RiosState& operator=(const RiosState& rhs);
-
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RiosState_NoInline))
-#include "RiosState.ipp"
-#endif
-
-#endif
Index: tools/src/librtools/RiosState.ipp
===================================================================
--- tools/src/librtools/RiosState.ipp (revision 10)
+++ tools/src/librtools/RiosState.ipp (nonexistent)
@@ -1,37 +0,0 @@
-// $Id: RiosState.ipp 359 2011-02-06 22:37:43Z mueller $
-//
-// Copyright 2006-2011 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-01-30 357 1.0 Adopted from CTBioState
-// 2006-04-16 - - Last change on CTBioState
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RiosState.ipp 359 2011-02-06 22:37:43Z mueller $
- \brief Implemenation (inline) of RiosState.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! Get conversion type.
-
-inline char RiosState::Ctype()
-{
- return fCtype;
-}
-
-} // end namespace Retro
Index: tools/src/librtools/RlogStd.hpp
===================================================================
--- tools/src/librtools/RlogStd.hpp (revision 10)
+++ tools/src/librtools/RlogStd.hpp (nonexistent)
@@ -1,37 +0,0 @@
-// $Id: RlogStd.hpp 358 2011-02-05 09:45:14Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-04 358 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RlogStd.hpp 358 2011-02-05 09:45:14Z mueller $
- \brief Declaration of class RlogStd.
-*/
-
-#ifndef included_Retro_RlogStd
-#define included_Retro_RlogStd 1
-
-#include "RlogFile.hpp"
-
-namespace Retro {
-
- extern RlogFile gRcout;
- extern RlogFile gRcerr;
-
-} // end namespace Retro
-
-#endif
Index: tools/src/librtools/Rstats.hpp
===================================================================
--- tools/src/librtools/Rstats.hpp (revision 10)
+++ tools/src/librtools/Rstats.hpp (nonexistent)
@@ -1,83 +0,0 @@
-// $Id: Rstats.hpp 364 2011-02-26 08:33:01Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-06 359 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: Rstats.hpp 364 2011-02-26 08:33:01Z mueller $
- \brief Declaration of class Rstats .
-*/
-
-#ifndef included_Retro_Rstats
-#define included_Retro_Rstats 1
-
-#include
-#include
-#include
-#include
-#include
-
-namespace Retro {
-
- class Rstats {
- public:
- Rstats();
- Rstats(const Rstats& rhs);
- ~Rstats();
-
- void Define(size_t ind, const std::string& name,
- const std::string& text);
-
- void Set(size_t ind, double val);
- void Inc(size_t ind, double val=1.);
-
- void SetFormat(const char* format, int width=0, int prec=0);
-
- size_t Size() const;
- double Value(size_t ind) const;
- const std::string& Name(size_t ind) const;
- const std::string& Text(size_t ind) const;
-
- void Print(std::ostream& os, const char* format=0,
- int width=0, int prec=0) const;
- void Dump(std::ostream& os, int ind=0, const char* text=0) const;
-
- double operator[](size_t ind) const;
-
- Rstats& operator=(const Rstats& rhs);
- Rstats& operator-(const Rstats& rhs);
- Rstats& operator*(double rhs);
-
- private:
- std::vector fValue; //!< counter value
- std::vector fName; //!< counter name
- std::vector fText; //!< counter text
- std::uint32_t fHash; //!< hash value for name+text
- std::string fFormat; //!< default format for Print
- int fWidth; //!< default width for Print
- int fPrec; //!< default precision for Print
- };
-
- std::ostream& operator<<(std::ostream& os, const Rstats& obj);
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_Rstats_NoInline))
-#include "Rstats.ipp"
-#endif
-
-#endif
Index: tools/src/librtools/RosPrintBvi.hpp
===================================================================
--- tools/src/librtools/RosPrintBvi.hpp (revision 10)
+++ tools/src/librtools/RosPrintBvi.hpp (nonexistent)
@@ -1,62 +0,0 @@
-// $Id: RosPrintBvi.hpp 366 2011-03-05 14:55:15Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-05 366 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RosPrintBvi.hpp 366 2011-03-05 14:55:15Z mueller $
- \brief Declaration of class RosPrintBvi .
-*/
-
-#ifndef included_Retro_RosPrintBvi
-#define included_Retro_RosPrintBvi 1
-
-#include
-#include
-#include
-
-namespace Retro {
-
- class RosPrintBvi {
- public:
- explicit RosPrintBvi(uint8_t val, size_t base=2, size_t nbit=8);
- explicit RosPrintBvi(uint16_t val, size_t base=2, size_t nbit=16);
- explicit RosPrintBvi(uint32_t val, size_t base=2, size_t nbit=32);
-
- void Print(std::ostream& os) const;
- void Print(std::string& os) const;
-
- protected:
- void Convert(char* pbuf) const;
-
- protected:
- uint32_t fVal; //!< value to be printed
- size_t fBase; //!< base: 2,8, or 16
- size_t fNbit; //!< number of bits to print
-
- };
-
- std::ostream& operator<<(std::ostream& os, const RosPrintBvi& obj);
- std::string& operator<<(std::string& os, const RosPrintBvi& obj);
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RosPrintBvi_NoInline))
-#include "RosPrintBvi.ipp"
-#endif
-
-#endif
Index: tools/src/librtools/Rstats.ipp
===================================================================
--- tools/src/librtools/Rstats.ipp (revision 10)
+++ tools/src/librtools/Rstats.ipp (nonexistent)
@@ -1,98 +0,0 @@
-// $Id: Rstats.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-06 359 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: Rstats.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of Rstats.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void Rstats::Set(size_t ind, double val)
-{
- fValue.at(ind) = val;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void Rstats::Inc(size_t ind, double val)
-{
- fValue.at(ind) += val;
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline size_t Rstats::Size() const
-{
- return fValue.size();
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline double Rstats::Value(size_t ind) const
-{
- return fValue.at(ind);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline const std::string& Rstats::Name(size_t ind) const
-{
- return fName.at(ind);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline const std::string& Rstats::Text(size_t ind) const
-{
- return fText.at(ind);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline double Rstats::operator[](size_t ind) const
-{
- return fValue.at(ind);
-}
-
-//------------------------------------------+-----------------------------------
-/*!
- \relates Rstats
- \brief ostream insertion operator.
-*/
-
-inline std::ostream& operator<<(std::ostream& os, const Rstats& obj)
-{
- obj.Print(os);
- return os;
-}
-
-} // end namespace Retro
Index: tools/src/librtools
===================================================================
--- tools/src/librtools (revision 10)
+++ tools/src/librtools (nonexistent)
tools/src/librtools
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-*.dep
Index: tools/src/librlinktpp/Rlinktpp_Init.cpp
===================================================================
--- tools/src/librlinktpp/Rlinktpp_Init.cpp (revision 10)
+++ tools/src/librlinktpp/Rlinktpp_Init.cpp (nonexistent)
@@ -1,62 +0,0 @@
-// $Id: Rlinktpp_Init.cpp 375 2011-04-02 07:56:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-20 372 1.0.2 renamed ..tcl -> ..tpp
-// 2011-03-19 371 1.0.1 moved Bvi into librtoolstcl
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: Rlinktpp_Init.cpp 375 2011-04-02 07:56:47Z mueller $
- \brief Implemenation of Rlinktpp_Init .
-*/
-
-#include "tcl.h"
-
-#include
-
-#include "librtcltools/RtclClassOwned.hpp"
-#include "RtclRlinkConnect.hpp"
-
-using namespace std;
-using namespace Retro;
-
-//------------------------------------------+-----------------------------------
-extern "C" int Rlinktpp_Init(Tcl_Interp* interp)
-{
- int irc;
-
- // use stubs
- const char* vers = Tcl_InitStubs(interp, TCL_VERSION, 0);
- if (vers == NULL) return TCL_ERROR;
-
- // declare package name and version
- irc = Tcl_PkgProvide(interp, "rlinktpp", "1.0.0");
- if (irc != TCL_OK) return irc;
-
- try {
- // register class commands
- RtclClassOwned::CreateClass(interp, "rlinkconnect",
- "RlinkConnect");
- return TCL_OK;
-
- } catch (exception& e) {
- Tcl_AppendResult(interp, "-E: exception caught in Rlinktpp_Init: \"",
- e.what(), "\"", NULL);
- }
- return TCL_ERROR;
-}
-
Index: tools/src/librlinktpp/.cvsignore
===================================================================
--- tools/src/librlinktpp/.cvsignore (revision 10)
+++ tools/src/librlinktpp/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-*.dep
Index: tools/src/librlinktpp/Makefile
===================================================================
--- tools/src/librlinktpp/Makefile (revision 10)
+++ tools/src/librlinktpp/Makefile (nonexistent)
@@ -1,54 +0,0 @@
-# $Id: Makefile 372 2011-03-20 22:48:11Z mueller $
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-20 372 1.0.1 renamed ..tcl -> ..tpp
-# 2011-02-12 360 1.0 Initial version
-#---
-#
-# Name of the sharable library
-#
-SONAME = rlinktpp
-SOMAJV = 1
-SOMINV = 0
-#
-# Compile and Link search paths
-#
-INCLFLAGS = -I/usr/include/tcl8.4 -I${RETROBASE}/tools/src
-LDLIBS = -L${RETROBASE}/tools/lib -lrtools -lrtcltools -lrlink
-#
-# Object files to be included
-#
-OBJ_all = Rlinktpp_Init.o RtclRlinkConnect.o
-#
-DEP_all = $(OBJ_all:.o=.dep)
-#
-#- generic part ----------------------------------------------------------------
-#
-SOFILE = lib$(SONAME).so
-SOFILEV = lib$(SONAME).so.$(SOMAJV)
-SOFILEVV = lib$(SONAME).so.$(SOMAJV).$(SOMINV)
-#
-include $(RETROBASE)/tools/make/generic_cpp.mk
-include $(RETROBASE)/tools/make/generic_dep.mk
-include $(RETROBASE)/tools/make/generic_so.mk
-#
-# The magic autodependcy include
-#
-include $(DEP_all)
-#
-# cleanup phonies:
-#
-.PHONY : clean cleandep realclean
-clean :
- @ rm -f $(OBJ_all)
- @ echo "Object files removed"
-#
-cleandep :
- @ rm -f $(DEP_all)
- @ echo "Dependency files removed"
-#
-realclean : clean cleandep
- @ rm -f $(SOPATH)/lib$(SONAME).a $(SOPATH)/lib$(SONAME).so*
- @ echo "Libraries removed"
-#
Index: tools/src/librlinktpp/RtclRlinkConnect.cpp
===================================================================
--- tools/src/librlinktpp/RtclRlinkConnect.cpp (revision 10)
+++ tools/src/librlinktpp/RtclRlinkConnect.cpp (nonexistent)
@@ -1,833 +0,0 @@
-// $Id: RtclRlinkConnect.cpp 375 2011-04-02 07:56:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-27 374 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclRlinkConnect.cpp 375 2011-04-02 07:56:47Z mueller $
- \brief Implemenation of class RtclRlinkConnect.
- */
-
-#include
-
-#include
-#include
-
-#include "librtcltools/Rtcl.hpp"
-#include "librtcltools/RtclOPtr.hpp"
-#include "librtcltools/RtclNameSet.hpp"
-#include "librtcltools/RtclStats.hpp"
-#include "librtools/RmethDsc.hpp"
-#include "librtools/RosPrintf.hpp"
-#include "librlink/RlinkCommandList.hpp"
-#include "RtclRlinkConnect.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RtclRlinkConnect
- \brief FIXME_docs
-*/
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-RtclRlinkConnect::RtclRlinkConnect(Tcl_Interp* interp, const char* name)
- : RtclProxyOwned("RlinkConnect", interp, name,
- new RlinkConnect()),
- fErrCnt(0),
- fLogFileName("-")
-{
- typedef RmethDsc mdsc_t;
- AddMeth("open", new mdsc_t(this, &RtclRlinkConnect::M_open));
- AddMeth("close", new mdsc_t(this, &RtclRlinkConnect::M_close));
- AddMeth("exec", new mdsc_t(this, &RtclRlinkConnect::M_exec));
- AddMeth("amap", new mdsc_t(this, &RtclRlinkConnect::M_amap));
- AddMeth("errcnt", new mdsc_t(this, &RtclRlinkConnect::M_errcnt));
- AddMeth("wtlam", new mdsc_t(this, &RtclRlinkConnect::M_wtlam));
- AddMeth("oob", new mdsc_t(this, &RtclRlinkConnect::M_oob));
- AddMeth("stats", new mdsc_t(this, &RtclRlinkConnect::M_stats));
- AddMeth("log", new mdsc_t(this, &RtclRlinkConnect::M_log));
- AddMeth("print", new mdsc_t(this, &RtclRlinkConnect::M_print));
- AddMeth("dump", new mdsc_t(this, &RtclRlinkConnect::M_dump));
- AddMeth("config", new mdsc_t(this, &RtclRlinkConnect::M_config));
- AddMeth("$default", new mdsc_t(this, &RtclRlinkConnect::M_default));
-
- for (size_t i=0; i<8; i++) {
- fCmdnameObj[i] = Tcl_NewStringObj(RlinkCommand::CommandName(i), -1);
- }
-}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RtclRlinkConnect::~RtclRlinkConnect()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_open(RtclArgs& args)
-{
- string path;
-
- if (!args.GetArg("?path", path)) return kERR;
- if (!args.AllDone()) return kERR;
-
- RerrMsg emsg;
- if (args.NOptMiss() == 0) { // open path
- if (!Obj().Open(path, emsg)) {
- args.AppendResult(emsg.Message());
- return kERR;
- }
- } else { // open
- string name = Obj().IsOpen() ? Obj().Port()->Url() : string();
- args.SetResult(name);
- }
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_close(RtclArgs& args)
-{
- if (!args.AllDone()) return kERR;
-
- if (!Obj().IsOpen()) {
- args.AppendResult("-E: port not open", NULL);
- return kERR;
- }
- Obj().Close();
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_exec(RtclArgs& args)
-{
- static RtclNameSet optset("-rreg|-rblk|-wreg|-wblk|-stat|-attn|-init|"
- "-edata|-estat|-estatdef|"
- "-volatile|-print|-dump|-rlist");
-
- Tcl_Interp* interp = args.Interp();
-
- RlinkCommandList clist;
- string opt;
- uint16_t addr;
-
- vector vardata;
- vector varstat;
- string varprint;
- string vardump;
- string varlist;
-
- uint8_t estatdef_val = 0x00;
- uint8_t estatdef_msk = 0xff;
-
- while (args.NextOpt(opt, optset)) {
-
- size_t lsize = clist.Size();
- if (opt == "-rreg") { // -rreg addr ?varData ?varStat ---
- if (!GetAddr(args, Obj(), addr)) return kERR;
- if (!GetVarName(args, "??varData", lsize, vardata)) return kERR;
- if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR;
- clist.AddRreg(addr);
-
- } else if (opt == "-rblk") { // -rblk addr size ?varData ?varStat
- int32_t bsize;
- if (!GetAddr(args, Obj(), addr)) return kERR;
- if (!args.GetArg("bsize", bsize, 1, 256)) return kERR;
- if (!GetVarName(args, "??varData", lsize, vardata)) return kERR;
- if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR;
- clist.AddRblk(addr, (size_t) bsize);
-
- } else if (opt == "-wreg") { // -wreg addr data ?varStat -------
- uint16_t data;
- if (!GetAddr(args, Obj(), addr)) return kERR;
- if (!args.GetArg("data", data)) return kERR;
- if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR;
- clist.AddWreg(addr, data);
-
- } else if (opt == "-wblk") { // -wblk addr block ?varStat ------
- vector block;
- if (!GetAddr(args, Obj(), addr)) return kERR;
- if (!args.GetArg("data", block, 1, 256)) return kERR;
- if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR;
- clist.AddWblk(addr, block);
-
- } else if (opt == "-stat") { // -stat varData ?varStat ---------
- if (!GetVarName(args, "??varData", lsize, vardata)) return kERR;
- if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR;
- clist.AddStat();
-
- } else if (opt == "-attn") { // -attn varData ?varStat ---------
- if (!GetVarName(args, "??varData", lsize, vardata)) return kERR;
- if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR;
- clist.AddAttn();
-
- } else if (opt == "-init") { // -init addr data ?varStat -------
- uint16_t data;
- if (!GetAddr(args, Obj(), addr)) return kERR;
- if (!args.GetArg("data", data)) return kERR;
- if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR;
- clist.AddInit(addr, data);
-
- } else if (opt == "-edata") { // -edata data ?mask --------------
- if (!ClistNonEmpty(args, clist)) return kERR;
- if (clist[lsize-1].Expect()==0) {
- clist.LastExpect(new RlinkCommandExpect());
- }
- if (clist[lsize-1].Command() == RlinkCommand::kCmdRblk) {
- vector data;
- vector mask;
- size_t bsize = clist[lsize-1].BlockSize();
- if (!args.GetArg("data", data, 0, bsize)) return kERR;
- if (!args.GetArg("??mask", mask, 0, bsize)) return kERR;
- clist[lsize-1].Expect()->SetBlock(data, mask);
- } else {
- uint16_t data=0;
- uint16_t mask=0;
- if (!args.GetArg("data", data)) return kERR;
- if (!args.GetArg("??mask", mask)) return kERR;
- clist[lsize-1].Expect()->SetData(data, mask);
- }
-
- } else if (opt == "-estat") { // -estat ?stat ?mask -------------
- if (!ClistNonEmpty(args, clist)) return kERR;
- uint8_t stat=0;
- uint8_t mask=0;
- if (!args.GetArg("??stat", stat)) return kERR;
- if (!args.GetArg("??mask", mask)) return kERR;
- if (args.NOptMiss() == 2) mask = 0xff;
- if (clist[lsize-1].Expect()==0) {
- clist.LastExpect(new RlinkCommandExpect());
- }
- clist[lsize-1].Expect()->SetStatus(stat, mask);
-
- } else if (opt == "-estatdef") { // -estatdef ?stat ?mask -----------
- uint8_t stat=0;
- uint8_t mask=0;
- if (!args.GetArg("??stat", stat)) return kERR;
- if (!args.GetArg("??mask", mask)) return kERR;
- if (args.NOptMiss() == 2) mask = 0xff;
- estatdef_val = stat;
- estatdef_msk = mask;
-
- } else if (opt == "-volatile") { // -volatile ----------------------
- if (!ClistNonEmpty(args, clist)) return kERR;
- clist.LastVolatile();
-
- } else if (opt == "-print") { // -print ?varRes -----------------
- varprint = "-";
- if (!args.GetArg("??varRes", varprint)) return kERR;
- } else if (opt == "-dump") { // -dump ?varRes ------------------
- vardump = "-";
- if (!args.GetArg("??varRes", vardump)) return kERR;
- } else if (opt == "-rlist") { // -rlist ?varRes -----------------
- varlist = "-";
- if (!args.GetArg("??varRes", varlist)) return kERR;
- }
-
- if (lsize != clist.Size()) { // cmd added to clist (ind=lsize!)
- if (estatdef_msk != 0xff) { // estatdef defined
- if (clist[lsize].Expect()==0) {
- clist.LastExpect(new RlinkCommandExpect());
- }
- clist[lsize].Expect()->SetStatus(estatdef_val, estatdef_msk);
- }
- }
- }
-
- int nact = 0;
- if (varprint == "-") nact += 1;
- if (vardump == "-") nact += 1;
- if (varlist == "-") nact += 1;
- if (nact > 1) {
- args.AppendResult("-E: more that one of -print,-dump,-list without ",
- "target variable found", NULL);
- return kERR;
- }
-
- if (!args.AllDone()) return kERR;
-
- RerrMsg emsg;
-
- if (!Obj().Exec(clist, emsg)) {
- args.AppendResult(emsg.Message());
- return kERR;
- }
-
- for (size_t icmd=0; icmd retstat;
- RtclOPtr pele;
- switch (cmd.Command()) {
- case RlinkCommand::kCmdRreg:
- case RlinkCommand::kCmdAttn:
- pres = Tcl_NewIntObj((int)cmd.Data());
- break;
-
- case RlinkCommand::kCmdRblk:
- pres = Rtcl::NewListIntObj(cmd.Block());
- break;
-
- case RlinkCommand::kCmdStat:
- retstat.resize(2);
- retstat[0] = cmd.StatRequest();
- retstat[1] = cmd.Data();
- pres = Rtcl::NewListIntObj(retstat);
- break;
- }
- if(!Rtcl::SetVar(interp, vardata[icmd], pres)) return kERR;
- }
-
- if (icmdfirst);
- tpair[1] = Tcl_NewStringObj((it->second).c_str(),(it->second).length());
- Tcl_ListObjAppendElement(NULL, plist, Tcl_NewListObj(2, tpair));
- }
- args.SetResult(plist);
- }
- }
-
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_errcnt(RtclArgs& args)
-{
- static RtclNameSet optset("-clear");
- string opt;
- bool fclear = false;
-
- while (args.NextOpt(opt, optset)) {
- if (opt == "-clear") fclear = true;
- }
- if (!args.AllDone()) return kERR;
-
- args.SetResult(int(fErrCnt));
- if (fclear) fErrCnt = 0;
-
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_wtlam(RtclArgs& args)
-{
- double tout;
- if (!args.GetArg("tout", tout, 0.001)) return kERR;
- if (!args.AllDone()) return kERR;
-
- RerrMsg emsg;
- double twait = Obj().WaitAttn(tout, emsg);
-
- if (twait == -2.) {
- args.AppendResult(emsg.Message());
- return kERR;
- } else if (twait == -1.) {
- if (Obj().GetLogOpts().printlevel >= 2) {
- Obj().LogFile()() << "-- wtlam to=" << RosPrintf(tout, "f", 0,3)
- << " FAIL timeout" << endl;
- fErrCnt += 1;
- args.SetResult(tout);
- return kOK;
- }
- }
-
- if (Obj().GetLogOpts().printlevel >= 1) {
- Obj().LogFile()() << "-- wtlam to=" << RosPrintf(tout, "f", 0,3)
- << " T=" << RosPrintf(twait, "f", 0,3)
- << " OK" << endl;
- }
-
- args.SetResult(twait);
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_oob(RtclArgs& args)
-{
- static RtclNameSet optset("-rlmon|-rbmon|-sbcntl|-sbdata");
-
- string opt;
- uint16_t addr;
- uint16_t data;
- RerrMsg emsg;
-
- if (args.NextOpt(opt, optset)) {
- if (opt == "-rlmon") { // oob -rlmon (0|1)
- if (!args.GetArg("val", data, 1)) return kERR;
- if (!args.AllDone()) return kERR;
- addr = 15; // rlmon on bit 15
- if (!Obj().SndOob(0x00, (addr<<8)+data, emsg)) {
- args.AppendResult(emsg.Message());
- return kERR;
- }
-
- } else if (opt == "-rbmon") { // oob -rbmon (0|1)
- if (!args.GetArg("val", data, 1)) return kERR;
- if (!args.AllDone()) return kERR;
- addr = 14; // rbmon on bit 14
- if (!Obj().SndOob(0x00, (addr<<8)+data, emsg)) {
- args.AppendResult(emsg.Message());
- return kERR;
- }
-
- } else if (opt == "-sbcntl") { // oob -sbcntl bit (0|1)
- if (!args.GetArg("bit", addr, 15)) return kERR;
- if (!args.GetArg("val", data, 1)) return kERR;
- if (!args.AllDone()) return kERR;
- if (!Obj().SndOob(0x00, (addr<<8)+data, emsg)) {
- args.AppendResult(emsg.Message());
- return kERR;
- }
-
- } else if (opt == "-sbdata") { // oob -sbdata addr val
- if (!args.GetArg("bit", addr, 0x0ff)) return kERR;
- if (!args.GetArg("val", data)) return kERR;
- if (!args.AllDone()) return kERR;
- if (!Obj().SndOob(addr, data, emsg)) {
- args.AppendResult(emsg.Message());
- return kERR;
- }
- }
- } else {
- args.AppendResult("-E: missing option, one of "
- "-rlmon,-rbmon,-sbcntl,-sbdata",
- NULL);
- return kERR;
- }
-
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_stats(RtclArgs& args)
-{
- RtclStats::Context cntx;
- if (!RtclStats::GetArgs(args, cntx)) return kERR;
- if (!RtclStats::Exec(args, cntx, Obj().Stats())) return kERR;
- if (Obj().Port()) {
- if (!RtclStats::Exec(args, cntx, Obj().Port()->Stats())) return kERR;
- }
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_log(RtclArgs& args)
-{
- string msg;
- if (!args.GetArg("msg", msg)) return kERR;
- if (!args.AllDone()) return kERR;
- if (Obj().GetLogOpts().printlevel != 0 ||
- Obj().GetLogOpts().dumplevel != 0 ||
- Obj().GetLogOpts().tracelevel != 0) {
- Obj().LogFile()() << "# " << msg << endl;
- }
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_print(RtclArgs& args)
-{
- if (!args.AllDone()) return kERR;
-
- ostringstream sos;
- Obj().Print(sos);
- args.SetResult(sos);
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_dump(RtclArgs& args)
-{
- if (!args.AllDone()) return kERR;
-
- ostringstream sos;
- Obj().Dump(sos, 0);
- args.SetResult(sos);
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_config(RtclArgs& args)
-{
- static RtclNameSet optset("-baseaddr|-basedata|-basestat|"
- "-logfile|-logprintlevel|-logdumplevel|"
- "-logtracelevel");
-
- RlinkConnect::LogOpts logopts = Obj().GetLogOpts();
-
- if (args.NDone() == (size_t)args.Objc()) {
- ostringstream sos;
- sos << "-baseaddr " << RosPrintf(logopts.baseaddr, "d")
- << " -basedata " << RosPrintf(logopts.basedata, "d")
- << " -basestat " << RosPrintf(logopts.basestat, "d")
- << " -logfile {" << fLogFileName << "}"
- << " -logprintlevel " << RosPrintf(logopts.printlevel, "d")
- << " -logdumplevel " << RosPrintf(logopts.dumplevel, "d")
- << " -logtracelevel " << RosPrintf(logopts.tracelevel, "d");
- args.AppendResult(sos);
- return kOK;
- }
-
- string opt;
- while (args.NextOpt(opt, optset)) {
- if (opt == "-baseaddr") { // -baseaddr ?base -----------------
- if (!ConfigBase(args, logopts.baseaddr)) return kERR;
- if (args.NOptMiss() == 0) Obj().SetLogOpts(logopts);
-
- } else if (opt == "-basedata") { // -basedata ?base -----------------
- if (!ConfigBase(args, logopts.basedata)) return kERR;
- if (args.NOptMiss() == 0) Obj().SetLogOpts(logopts);
-
- } else if (opt == "-basestat") { // -basestat ?base -----------------
- if (!ConfigBase(args, logopts.basestat)) return kERR;
- if (args.NOptMiss() == 0) Obj().SetLogOpts(logopts);
-
- } else if (opt == "-logfile") { // -logfile ?name ------------------
- if (!args.Config("??name", fLogFileName)) return false;
- if (args.NOptMiss() == 0) { // new filename ?
- if (fLogFileName == "-") {
- Obj().LogUseStream(&cout);
- } else {
- if (!Obj().LogOpen(fLogFileName)) {
- args.AppendResult("-E: open failed for \"",
- fLogFileName.c_str(), "\", using stdout", NULL);
- Obj().LogUseStream(&cout);
- fLogFileName = "-";
- return kERR;
- }
- }
- }
-
- } else if (opt == "-logprintlevel") { // -logprintlevel ?loglevel --------
- if (!args.Config("??loglevel", logopts.printlevel, 3)) return false;
- if (args.NOptMiss() == 0) Obj().SetLogOpts(logopts);
-
- } else if (opt == "-logdumplevel") { // -logdumplevel ?loglevel ---------
- if (!args.Config("??loglevel", logopts.dumplevel, 3)) return false;
- if (args.NOptMiss() == 0) Obj().SetLogOpts(logopts);
-
- } else if (opt == "-logtracelevel") { // -logtracelevel ?loglevel --------
- if (!args.Config("??loglevel", logopts.tracelevel, 3)) return false;
- if (args.NOptMiss() == 0) Obj().SetLogOpts(logopts);
- }
- }
-
- if (!args.AllDone()) return kERR;
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclRlinkConnect::M_default(RtclArgs& args)
-{
- if (!args.AllDone()) return kERR;
- ostringstream sos;
- const RlinkConnect::LogOpts& logopts = Obj().GetLogOpts();
-
- sos << "print base: " << "addr " << RosPrintf(logopts.baseaddr, "d", 2)
- << " data " << RosPrintf(logopts.basedata, "d", 2)
- << " stat " << RosPrintf(logopts.basestat, "d", 2) << endl;
- sos << "logfile: " << fLogFileName
- << " printlevel " << logopts.printlevel
- << " dumplevel " << logopts.dumplevel;
-
- args.AppendResultLines(sos);
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclRlinkConnect::GetAddr(RtclArgs& args, RlinkConnect& conn,
- uint16_t& addr)
-{
- Tcl_Obj* pobj=0;
- if (!args.GetArg("addr", pobj)) return kERR;
-
- int tstint;
- // if a number is given..
- if (Tcl_GetIntFromObj(NULL, pobj, &tstint) == kOK) {
- if (tstint >= 0 && tstint <= 0x00ff) {
- addr = (uint16_t)tstint;
- } else {
- args.AppendResult("-E: value \"", Tcl_GetString(pobj),
- "\" for \"addr\" out of range 0...0x00ff", NULL);
- return false;
- }
- // if a name is given
- } else {
- string name(Tcl_GetString(pobj));
- uint16_t tstaddr;
- if (Obj().AddrMap().Find(name, tstaddr)) {
- addr = tstaddr;
- } else {
- args.AppendResult("-E: no address mapping known for \"",
- Tcl_GetString(pobj), "\"", NULL);
- return false;
- }
- }
-
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclRlinkConnect::GetVarName(RtclArgs& args, const char* argname,
- size_t nind,
- std::vector& varname)
-{
- while (varname.size() < nind+1) varname.push_back(string());
- string name;
- if (!args.GetArg(argname, name)) return false;
- if (name.length()) { // if variable defined
- char c = name[0];
- if (isdigit(c) || c=='+' || c=='-' ) { // check for mistaken number
- args.AppendResult("-E: invalid variable name \"", name.c_str(),
- "\": looks like a number", NULL);
- return false;
- }
- }
-
- varname[nind] = name;
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclRlinkConnect::ConfigBase(RtclArgs& args, size_t& base)
-{
- size_t tmp = base;
- if (!args.Config("??base", tmp, 16, 2)) return false;
- if (tmp != base && tmp != 2 && tmp !=8 && tmp != 16) {
- args.AppendResult("-E: base must be 2, 8, or 16, found \"",
- args.PeekArgString(-1), "\"", NULL);
- }
- base = tmp;
- return true;
-}
-
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclRlinkConnect::ClistNonEmpty(RtclArgs& args,
- const RlinkCommandList& clist)
-{
- if (clist.Size() == 0) {
- args.AppendResult("-E: -volatile not allowed on empty command list", NULL);
- return false;
- }
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RtclRlinkConnect_NoInline))
-#define inline
-//#include "RtclRlinkConnect.ipp"
-#undef inline
-#endif
Index: tools/src/librlinktpp/RtclRlinkConnect.hpp
===================================================================
--- tools/src/librlinktpp/RtclRlinkConnect.hpp (revision 10)
+++ tools/src/librlinktpp/RtclRlinkConnect.hpp (nonexistent)
@@ -1,78 +0,0 @@
-// $Id: RtclRlinkConnect.hpp 375 2011-04-02 07:56:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-27 374 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclRlinkConnect.hpp 375 2011-04-02 07:56:47Z mueller $
- \brief Declaration of class RtclRlinkConnect.
-*/
-
-#ifndef included_Retro_RtclRlinkConnect
-#define included_Retro_RtclRlinkConnect 1
-
-#include
-#include
-
-#include "librtcltools/RtclOPtr.hpp"
-#include "librtcltools/RtclProxyOwned.hpp"
-
-#include "librlink/RlinkConnect.hpp"
-
-namespace Retro {
-
- class RtclRlinkConnect : public RtclProxyOwned {
- public:
- RtclRlinkConnect(Tcl_Interp* interp, const char* name);
- ~RtclRlinkConnect();
-
- protected:
- int M_open(RtclArgs& args);
- int M_close(RtclArgs& args);
- int M_exec(RtclArgs& args);
- int M_amap(RtclArgs& args);
- int M_errcnt(RtclArgs& args);
- int M_wtlam(RtclArgs& args);
- int M_oob(RtclArgs& args);
- int M_stats(RtclArgs& args);
- int M_log(RtclArgs& args);
- int M_print(RtclArgs& args);
- int M_dump(RtclArgs& args);
- int M_config(RtclArgs& args);
- int M_default(RtclArgs& args);
-
- bool GetAddr(RtclArgs& args, RlinkConnect& conn, uint16_t& addr);
- bool GetVarName(RtclArgs& args, const char* argname,
- size_t nind, std::vector& varname);
- bool ConfigBase(RtclArgs& args, size_t& base);
- bool ClistNonEmpty(RtclArgs& args,
- const RlinkCommandList& clist);
-
- protected:
- RtclOPtr fCmdnameObj[8];
- size_t fErrCnt;
- std::string fLogFileName;
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RtclRlinkConnect_NoInline))
-//#include "RtclRlinkConnect.ipp"
-#endif
-
-#endif
Index: tools/src/librlinktpp
===================================================================
--- tools/src/librlinktpp (revision 10)
+++ tools/src/librlinktpp (nonexistent)
tools/src/librlinktpp
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-*.dep
Index: tools/src/librutiltpp/RtclBvi.hpp
===================================================================
--- tools/src/librutiltpp/RtclBvi.hpp (revision 10)
+++ tools/src/librutiltpp/RtclBvi.hpp (nonexistent)
@@ -1,56 +0,0 @@
-// $Id: RtclBvi.hpp 375 2011-04-02 07:56:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-27 374 1.0 Initial version
-// 2011-02-18 362 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclBvi.hpp 375 2011-04-02 07:56:47Z mueller $
- \brief Declaration of class RtclBvi.
-*/
-
-#ifndef included_Retro_RtclBvi
-#define included_Retro_RtclBvi 1
-
-#include "tcl.h"
-
-namespace Retro {
-
- class RtclBvi {
- public:
- static void CreateCmds(Tcl_Interp* interp);
-
- protected:
- enum ConvMode {kStr2Int = 0,
- kInt2Str};
-
- static int DoCmd(ClientData cdata, Tcl_Interp* interp,
- int objc, Tcl_Obj* const objv[]);
- static Tcl_Obj* DoConv(Tcl_Interp* interp, ConvMode mode, Tcl_Obj* val,
- char form, int nbit);
- static bool CheckFormat(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[], bool& list,
- char& form, int& nbit);
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RtclBvi_NoInline))
-//#include "RtclBvi.ipp"
-#endif
-
-#endif
Index: tools/src/librutiltpp/.cvsignore
===================================================================
--- tools/src/librutiltpp/.cvsignore (revision 10)
+++ tools/src/librutiltpp/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-*.dep
Index: tools/src/librutiltpp/Makefile
===================================================================
--- tools/src/librutiltpp/Makefile (revision 10)
+++ tools/src/librutiltpp/Makefile (nonexistent)
@@ -1,54 +0,0 @@
-# $Id: Makefile 372 2011-03-20 22:48:11Z mueller $
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-20 372 1.0.1 renamed ..tcl -> ..tpp
-# 2011-03-19 371 1.0 Initial version
-#---
-#
-# Name of the sharable library
-#
-SONAME = rutiltpp
-SOMAJV = 1
-SOMINV = 0
-#
-# Compile and Link search paths
-#
-INCLFLAGS = -I/usr/include/tcl8.4 -I${RETROBASE}/tools/src
-LDLIBS = -L${RETROBASE}/tools/lib -lrtcltools
-#
-# Object files to be included
-#
-OBJ_all = Rutiltpp_Init.o RtclBvi.o
-#
-DEP_all = $(OBJ_all:.o=.dep)
-#
-#- generic part ----------------------------------------------------------------
-#
-SOFILE = lib$(SONAME).so
-SOFILEV = lib$(SONAME).so.$(SOMAJV)
-SOFILEVV = lib$(SONAME).so.$(SOMAJV).$(SOMINV)
-#
-include $(RETROBASE)/tools/make/generic_cpp.mk
-include $(RETROBASE)/tools/make/generic_dep.mk
-include $(RETROBASE)/tools/make/generic_so.mk
-#
-# The magic autodependcy include
-#
-include $(DEP_all)
-#
-# cleanup phonies:
-#
-.PHONY : clean cleandep realclean
-clean :
- @ rm -f $(OBJ_all)
- @ echo "Object files removed"
-#
-cleandep :
- @ rm -f $(DEP_all)
- @ echo "Dependency files removed"
-#
-realclean : clean cleandep
- @ rm -f $(SOPATH)/lib$(SONAME).a $(SOPATH)/lib$(SONAME).so*
- @ echo "Libraries removed"
-#
Index: tools/src/librutiltpp/RtclBvi.cpp
===================================================================
--- tools/src/librutiltpp/RtclBvi.cpp (revision 10)
+++ tools/src/librutiltpp/RtclBvi.cpp (nonexistent)
@@ -1,261 +0,0 @@
-// $Id: RtclBvi.cpp 375 2011-04-02 07:56:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-27 374 1.0 Initial version
-// 2011-02-13 361 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclBvi.cpp 375 2011-04-02 07:56:47Z mueller $
- \brief Implemenation of RtclBvi.
-*/
-
-#include
-#include
-#include
-
-#include
-
-#include "RtclBvi.hpp"
-#include "librtcltools/RtclOPtr.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RtclBvi
- \brief FIXME_text
-*/
-
-static const int kOK = TCL_OK;
-static const int kERR = TCL_ERROR;
-
-//------------------------------------------+-----------------------------------
-//! FIXME_text
-
-void RtclBvi::CreateCmds(Tcl_Interp* interp)
-{
- Tcl_CreateObjCommand(interp, "bvi", DoCmd, (ClientData) kStr2Int, NULL);
- Tcl_CreateObjCommand(interp, "pbvi", DoCmd, (ClientData) kInt2Str, NULL);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_text
-
-int RtclBvi::DoCmd(ClientData cdata, Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[])
-{
- bool list = false;
- char form = 0;
- int nbit = 0;
- if (!CheckFormat(interp, objc, objv, list, form, nbit)) return kERR;
-
- ConvMode mode = (ConvMode)((int) cdata);
-
- if (list) {
- int lobjc = 0;
- Tcl_Obj** lobjv = 0;
- if (Tcl_ListObjGetElements(interp, objv[2], &lobjc, &lobjv) != kOK) {
- return kERR;
- }
-
- RtclOPtr rlist(Tcl_NewListObj(0, NULL));
-
- for (int i=0; i0 && isblank(pval[lval-1])) {
- lval--;
- }
-
- // check for c"ddd" format
- if (lval>3 && pval[1]=='"' && pval[lval-1]=='"') {
- if (strchr("bBoOdDxX", pval[0]) == 0) {
- Tcl_AppendResult(interp, "-E: bad prefix in c\"dddd\" format string",
- NULL);
- return 0;
- }
- form = pval[0];
- pval += 2;
- lval -= 3;
- // check for 0xddd format
- } else if (lval>2 && pval[0]=='0' && (pval[1]=='x' || pval[1]=='X')) {
- form = 'x';
- pval += 2;
- lval -= 2;
- }
-
- int base = 0;
- switch (form) {
- case 'b': case 'B': base = 2; break;
- case 'o': case 'O': base = 8; break;
- case 'd': case 'D': base = 10; break;
- case 'x': case 'X': base = 16; break;
- }
-
- unsigned long lres=0;
- char* eptr=0;
-
- if (base==10 && pval[0]=='-') {
- lres = (unsigned long) strtol(pval, &eptr, base);
- if (nbit<32) lres &= (1ul< (1ul<=0; i--) {
- unsigned int nibble = ((val_uint)>>(i*nwidth)) & nmask;
- nibble += (nibble <= 9) ? '0' : ('a'-10);
- *pbuf++ = (char) nibble;
- }
-
- if (form=='B' || form=='O' || form=='X') {
- *pbuf++ = '"';
- }
-
- return Tcl_NewStringObj(buf, pbuf-buf);
-
- } else {
- Tcl_AppendResult(interp, "-E: BUG! bad cdata in RtclBvi::DoConv() call",
- NULL);
- }
- return 0;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_text
-
-bool RtclBvi::CheckFormat(Tcl_Interp* interp, int objc, Tcl_Obj* const objv[],
- bool& list, char& form, int& nbit)
-{
- list = false;
- form = 'b';
- nbit = 0;
-
- if (objc != 3) {
- Tcl_WrongNumArgs(interp, 1, objv, "form arg");
- return false;
- }
-
- const char* opt = Tcl_GetString(objv[1]);
-
- while(*opt != 0) {
- switch (*opt) {
- case 'b':
- case 'B':
- case 'o':
- case 'O':
- case 'x':
- case 'X':
- form = *opt;
- break;
-
- case 'l':
- list = true;
- break;
-
- default:
- if (*opt>='0' && *opt<='9') {
- nbit = 10*nbit + ((*opt) - '0');
- if (nbit > 32) {
- Tcl_AppendResult(interp, "-E: invalid bvi format \"", opt, "\"",
- " bit count > 32", NULL);
- return false;
- }
- } else {
- Tcl_AppendResult(interp, "-E: invalid bvi format \"", opt, "\"",
- " allowed: [bBoOxXl][0-9]*", NULL);
- return false;
- }
- break;
- }
- opt++;
- }
-
- if (nbit==0) nbit=8;
-
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RtclBvi_NoInline))
-#define inline
-//#include "RtclBvi.ipp"
-#undef inline
-#endif
Index: tools/src/librutiltpp/Rutiltpp_Init.cpp
===================================================================
--- tools/src/librutiltpp/Rutiltpp_Init.cpp (revision 10)
+++ tools/src/librutiltpp/Rutiltpp_Init.cpp (nonexistent)
@@ -1,59 +0,0 @@
-// $Id: Rutiltpp_Init.cpp 374 2011-03-27 17:02:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-20 372 1.0.2 renamed ..tcl -> ..tpp
-// 2011-03-19 371 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: Rutiltpp_Init.cpp 374 2011-03-27 17:02:47Z mueller $
- \brief Implemenation of Rutiltpp_Init .
-*/
-
-#include "tcl.h"
-
-#include
-
-#include "RtclBvi.hpp"
-
-using namespace std;
-using namespace Retro;
-
-//------------------------------------------+-----------------------------------
-extern "C" int Rutiltpp_Init(Tcl_Interp* interp)
-{
- int irc;
-
- // use stubs
- const char* vers = Tcl_InitStubs(interp, TCL_VERSION, 0);
- if (vers == NULL) return TCL_ERROR;
-
- // declare package name and version
- irc = Tcl_PkgProvide(interp, "rutiltpp", "1.0.0");
- if (irc != TCL_OK) return irc;
-
- try {
- // register general commands
- RtclBvi::CreateCmds(interp);
- return TCL_OK;
-
- } catch (exception& e) {
- Tcl_AppendResult(interp, "-E: exception caught in Rutiltpp_Init: \"",
- e.what(), "\"", NULL);
- }
- return TCL_ERROR;
-}
-
Index: tools/src/librutiltpp
===================================================================
--- tools/src/librutiltpp (revision 10)
+++ tools/src/librutiltpp (nonexistent)
tools/src/librutiltpp
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-*.dep
Index: tools/src/librtcltools/RtclClassBase.hpp
===================================================================
--- tools/src/librtcltools/RtclClassBase.hpp (revision 10)
+++ tools/src/librtcltools/RtclClassBase.hpp (nonexistent)
@@ -1,82 +0,0 @@
-// $Id: RtclClassBase.hpp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclClassBase.hpp 365 2011-02-28 07:28:26Z mueller $
- \brief Declaration of class RtclClassBase.
-*/
-
-#ifndef included_Retro_RtclClassBase
-#define included_Retro_RtclClassBase 1
-
-#include "tcl.h"
-
-namespace Retro {
-
- class RtclClassBase {
- public:
- static const int kOK = TCL_OK;
- static const int kERR = TCL_ERROR;
-
- explicit RtclClassBase(const std::string& type = std::string());
- virtual ~RtclClassBase();
-
- const std::string& Type() const;
- Tcl_Command Token() const;
-
- protected:
- void SetType(const std::string& type);
-
- void CreateClassCmd(Tcl_Interp* interp, const char* name);
-
- virtual int TclClassCmd(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[]);
-
- virtual int ClassCmdList(Tcl_Interp* interp);
- virtual int ClassCmdDelete(Tcl_Interp* interp, const char* name);
- virtual int ClassCmdCreate(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[]) = 0;
-
- static int ThunkTclClassCmd(ClientData cdata, Tcl_Interp* interp,
- int objc, Tcl_Obj* const objv[]);
-
- static void ThunkTclCmdDeleteProc(ClientData cdata);
- static void ThunkTclExitProc(ClientData cdata);
-
- protected:
- std::string fType; //!< classed type name
- Tcl_Interp* fInterp; //!< tcl interpreter
- Tcl_Command fCmdToken; //!< cmd token for class command
-
- // RtclClassBase is not copy or assignable
- private:
- RtclClassBase(const RtclClassBase& rhs);
- RtclClassBase& operator=(const RtclClassBase& rhs);
-
-
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RtclClassBase_NoInline))
-#include "RtclClassBase.ipp"
-#endif
-
-#endif
Index: tools/src/librtcltools/RtclClassBase.ipp
===================================================================
--- tools/src/librtcltools/RtclClassBase.ipp (revision 10)
+++ tools/src/librtcltools/RtclClassBase.ipp (nonexistent)
@@ -1,54 +0,0 @@
-// $Id: RtclClassBase.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// 2011-02-18 362 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclClassBase.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of RtclClassBase.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline const std::string& RtclClassBase::Type() const
-{
- return fType;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline Tcl_Command RtclClassBase::Token() const
-{
- return fCmdToken;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclClassBase::SetType(const std::string& type)
-{
- fType = type;
- return;
-}
-
-} // end namespace Retro
Index: tools/src/librtcltools/.cvsignore
===================================================================
--- tools/src/librtcltools/.cvsignore (revision 10)
+++ tools/src/librtcltools/.cvsignore (nonexistent)
@@ -1 +0,0 @@
-*.dep
Index: tools/src/librtcltools/RtclClassOwned.hpp
===================================================================
--- tools/src/librtcltools/RtclClassOwned.hpp (revision 10)
+++ tools/src/librtcltools/RtclClassOwned.hpp (nonexistent)
@@ -1,56 +0,0 @@
-// $Id: RtclClassOwned.hpp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclClassOwned.hpp 365 2011-02-28 07:28:26Z mueller $
- \brief Declaration of class RtclClassOwned.
-*/
-
-#ifndef included_Retro_RtclClassOwned
-#define included_Retro_RtclClassOwned 1
-
-#include "tcl.h"
-
-#include
-
-#include "RtclClassBase.hpp"
-
-namespace Retro {
-
- template
- class RtclClassOwned : public RtclClassBase {
- public:
-
- explicit RtclClassOwned(const std::string& type = std::string());
- ~RtclClassOwned();
-
- int ClassCmdCreate(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[]);
-
- static void CreateClass(Tcl_Interp* interp, const char* name,
- const std::string& type);
- };
-
-} // end namespace Retro
-
-// implementation all inline
-#include "RtclClassOwned.ipp"
-
-#endif
Index: tools/src/librtcltools/Makefile
===================================================================
--- tools/src/librtcltools/Makefile (revision 10)
+++ tools/src/librtcltools/Makefile (nonexistent)
@@ -1,54 +0,0 @@
-# $Id: Makefile 370 2011-03-14 18:33:43Z mueller $
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-02-11 360 1.0 Initial version
-#---
-#
-# Name of the sharable library
-#
-SONAME = rtcltools
-SOMAJV = 1
-SOMINV = 0
-#
-# Compile and Link search paths
-#
-INCLFLAGS = -I/usr/include/tcl8.4 -I${RETROBASE}/tools/src
-LDLIBS = -L${RETROBASE}/tools/lib -lrtools
-#
-# Object files to be included
-#
-OBJ_all = Rtcl.o RtclArgs.o RtclClassBase.o RtclContext.o \
- RtclNameSet.o RtclProxyBase.o RtclStats.o
-#
-DEP_all = $(OBJ_all:.o=.dep)
-#
-#- generic part ----------------------------------------------------------------
-#
-SOFILE = lib$(SONAME).so
-SOFILEV = lib$(SONAME).so.$(SOMAJV)
-SOFILEVV = lib$(SONAME).so.$(SOMAJV).$(SOMINV)
-#
-include $(RETROBASE)/tools/make/generic_cpp.mk
-include $(RETROBASE)/tools/make/generic_dep.mk
-include $(RETROBASE)/tools/make/generic_so.mk
-#
-# The magic autodependcy include
-#
-include $(DEP_all)
-#
-# cleanup phonies:
-#
-.PHONY : clean cleandep realclean
-clean :
- @ rm -f $(OBJ_all)
- @ echo "Object files removed"
-#
-cleandep :
- @ rm -f $(DEP_all)
- @ echo "Dependency files removed"
-#
-realclean : clean cleandep
- @ rm -f $(SOPATH)/lib$(SONAME).a $(SOPATH)/lib$(SONAME).so*
- @ echo "Libraries removed"
-#
Index: tools/src/librtcltools/RtclClassOwned.ipp
===================================================================
--- tools/src/librtcltools/RtclClassOwned.ipp (revision 10)
+++ tools/src/librtcltools/RtclClassOwned.ipp (nonexistent)
@@ -1,81 +0,0 @@
-// $Id: RtclClassOwned.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclClassOwned.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of class RtclClassOwned.
-*/
-
-#include
-
-#include "RtclProxyBase.hpp"
-
-/*!
- \class Retro::RtclClassOwned
- \brief FIXME_docs
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-template
-RtclClassOwned::RtclClassOwned(const std::string& type)
- : RtclClassBase(type)
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-template
-RtclClassOwned::~RtclClassOwned()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-template
-inline int RtclClassOwned::ClassCmdCreate(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[])
-{
- TP* pobj = new TP(interp, Tcl_GetString(objv[1]));
- if (pobj->ClassCmdConfig(interp, objc, objv) != kOK) {
- delete pobj;
- return kERR;
- }
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-template
-inline void RtclClassOwned::CreateClass(Tcl_Interp* interp,
- const char* name,
- const std::string& type)
-{
- RtclClassOwned* p = new RtclClassOwned(type);
- p->CreateClassCmd(interp, name);
- return;
-}
-
-} // end namespace Retro
Index: tools/src/librtcltools/RtclProxyBase.cpp
===================================================================
--- tools/src/librtcltools/RtclProxyBase.cpp (revision 10)
+++ tools/src/librtcltools/RtclProxyBase.cpp (nonexistent)
@@ -1,206 +0,0 @@
-// $Id: RtclProxyBase.cpp 374 2011-03-27 17:02:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-05 366 1.0.1 use AppendResultNewLines() in exception catcher
-// 2011-02-20 363 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclProxyBase.cpp 374 2011-03-27 17:02:47Z mueller $
- \brief Implemenation of RtclProxyBase.
-*/
-
-#include
-
-#include "RtclProxyBase.hpp"
-#include "RtclContext.hpp"
-#include "Rtcl.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RtclProxyBase
- \brief FIXME_docs
-*/
-
-typedef std::pair mmap_ins_t;
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RtclProxyBase::RtclProxyBase(const std::string& type)
- : fType(type),
- fMapMeth(),
- fInterp(0)
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RtclProxyBase::~RtclProxyBase()
-{
- if (fInterp) RtclContext::Find(fInterp).UnRegisterProxy(this);
- for (mmap_it_t it=fMapMeth.begin(); it!=fMapMeth.end(); it++) {
- delete it->second;
- }
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclProxyBase::ClassCmdConfig(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[])
-{
- if (objc > 2) {
- Tcl_AppendResult(interp, "-E: no configuration args supported", NULL);
- return TCL_ERROR;
- }
- return TCL_OK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclProxyBase::AddMeth(const std::string& name,
- RmethDscBase* pmeth)
-{
- mmap_ins_t ret = fMapMeth.insert(mmap_val_t(name, pmeth));
- if (ret.second == false) // or use !(ret.second)
- throw logic_error(string("RtclProxyBase::AddMeth: duplicate name: ") +
- name);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclProxyBase::CreateObjectCmd(Tcl_Interp* interp, const char* name)
-{
- fInterp = interp;
- fCmdToken =
- Tcl_CreateObjCommand(interp, name, ThunkTclObjectCmd, (ClientData) this,
- (Tcl_CmdDeleteProc *) ThunkTclCmdDeleteProc);
- RtclContext::Find(interp).RegisterProxy(this);
- Tcl_CreateExitHandler((Tcl_ExitProc*) ThunkTclExitProc, (ClientData) this);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclProxyBase::TclObjectCmd(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[])
-{
- mdsc_t* pmdsc = 0;
-
- if (objc == 1) { // no args
- mmap_cit_t it = fMapMeth.find("$default"); // default method registered ?
- if (it == fMapMeth.end()) { // if not, complain
- Tcl_WrongNumArgs(interp, 1, objv, "option ?args?");
- return TCL_ERROR;
- }
- pmdsc = it->second;
-
- } else { // at least method name given
- string name(Tcl_GetString(objv[1]));
- mmap_cit_t it = fMapMeth.lower_bound(name);
-
- // no leading substring match
- if (it==fMapMeth.end() || name!=it->first.substr(0,name.length())) {
- Tcl_AppendResult(interp, "-E: bad option \"", Tcl_GetString(objv[1]),
- "\": must be ", NULL);
- const char* delim = "";
- for (mmap_cit_t it1=fMapMeth.begin(); it1!=fMapMeth.end(); it1++) {
- if (it1->first.c_str()[0] != '$') {
- Tcl_AppendResult(interp, delim, it1->first.c_str(), NULL);
- delim = ",";
- }
- }
- return TCL_ERROR;
- }
-
- pmdsc = it->second;
-
- // check for ambiguous substring match
- if (name != it->first) {
- mmap_cit_t it1 = it;
- it1++;
- if (it1!=fMapMeth.end() && name==it1->first.substr(0,name.length())) {
- Tcl_AppendResult(interp, "-E: ambiguous option \"",
- Tcl_GetString(objv[1]), "\": must be ", NULL);
- const char* delim = "";
- for (it1=it; it1!=fMapMeth.end() &&
- name==it1->first.substr(0,name.length()); it1++) {
- Tcl_AppendResult(interp, delim, it1->first.c_str(), NULL);
- delim = ",";
- }
- return TCL_ERROR;
- }
- }
- }
-
- RtclArgs args(interp, objc, objv, 2);
- return (*pmdsc)(args);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclProxyBase::ThunkTclObjectCmd(ClientData cdata, Tcl_Interp* interp,
- int objc, Tcl_Obj* const objv[])
-{
- if (!cdata) {
- Tcl_AppendResult(interp, "-E: BUG! ThunkTclObjectCmd called with cdata==0",
- NULL);
- return TCL_ERROR;
- }
-
- try {
- return ((RtclProxyBase*) cdata)->TclObjectCmd(interp, objc, objv);
- } catch (exception& e) {
- Rtcl::AppendResultNewLines(interp);
- Tcl_AppendResult(interp, "-E: exception caught \"", e.what(), "\"", NULL);
- }
- return TCL_ERROR;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclProxyBase::ThunkTclCmdDeleteProc(ClientData cdata)
-{
- Tcl_DeleteExitHandler((Tcl_ExitProc*) ThunkTclExitProc, cdata);
- delete ((RtclProxyBase*) cdata);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclProxyBase::ThunkTclExitProc(ClientData cdata)
-{
- delete ((RtclProxyBase*) cdata);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RtclProxyBase_NoInline))
-#define inline
-#include "RtclProxyBase.ipp"
-#undef inline
-#endif
Index: tools/src/librtcltools/Rtcl.cpp
===================================================================
--- tools/src/librtcltools/Rtcl.cpp (revision 10)
+++ tools/src/librtcltools/Rtcl.cpp (nonexistent)
@@ -1,152 +0,0 @@
-// $Id: Rtcl.cpp 369 2011-03-13 22:39:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-13 369 1.0.2 add NewListIntObj(vector)
-// 2011-03-05 366 1.0.1 add AppendResultNewLines()
-// 2011-02-26 364 1.0 Initial version
-// 2011-02-13 361 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: Rtcl.cpp 369 2011-03-13 22:39:26Z mueller $
- \brief Implemenation of Rtcl.
-*/
-
-#include "Rtcl.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::Rtcl
- \brief FIXME_docs
-*/
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-Tcl_Obj* Rtcl::NewLinesObj(const std::string& str)
-{
- const char* data = str.data();
- int size = str.length();
- if (size>0 && data[size-1]=='\n') size -= 1;
- return Tcl_NewStringObj(data, size);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-Tcl_Obj* Rtcl::NewListIntObj(const std::vector& vec)
-{
- if (vec.size() == 0) return Tcl_NewListObj(0, NULL);
-
- vector vobj;
- vobj.reserve(vec.size());
-
- for (size_t i=0; i& vec)
-{
- if (vec.size() == 0) return Tcl_NewListObj(0, NULL);
-
- vector vobj;
- vobj.reserve(vec.size());
-
- for (size_t i=0; i
-//
-// 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
-// 2011-02-20 363 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclProxyBase.hpp 365 2011-02-28 07:28:26Z mueller $
- \brief Declaration of class RtclProxyBase.
-*/
-
-#ifndef included_Retro_RtclProxyBase
-#define included_Retro_RtclProxyBase 1
-
-#include "tcl.h"
-
-#include
-#include
-
-#include "RtclArgs.hpp"
-#include "librtools/RmethDscBase.hpp"
-
-namespace Retro {
-
- class RtclProxyBase {
- public:
- static const int kOK = TCL_OK;
- static const int kERR = TCL_ERROR;
-
- typedef std::map*> mmap_t;
- typedef mmap_t::iterator mmap_it_t;
- typedef mmap_t::const_iterator mmap_cit_t;
- typedef mmap_t::value_type mmap_val_t;
-
- typedef RmethDscBase mdsc_t;
-
- explicit RtclProxyBase(const std::string& type = std::string());
- virtual ~RtclProxyBase();
-
- virtual int ClassCmdConfig(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[]);
-
- const std::string& Type() const;
- Tcl_Command Token() const;
-
- protected:
- void SetType(const std::string& type);
-
- void AddMeth(const std::string& name,
- RmethDscBase* pmeth);
-
- void CreateObjectCmd(Tcl_Interp* interp, const char* name);
-
- int TclObjectCmd(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[]);
-
- static int ThunkTclObjectCmd(ClientData cdata, Tcl_Interp* interp,
- int objc, Tcl_Obj* const objv[]);
- static void ThunkTclCmdDeleteProc(ClientData cdata);
- static void ThunkTclExitProc(ClientData cdata);
-
- protected:
- std::string fType; //!< proxied type name
- mmap_t fMapMeth; //!< map for named methods
- Tcl_Interp* fInterp; //!< tcl interpreter
- Tcl_Command fCmdToken; //!< cmd token for object command
-
- // RtclProxyBase is not copy or assignable
- private:
- RtclProxyBase(const RtclProxyBase& rhs);
- RtclProxyBase& operator=(const RtclProxyBase& rhs);
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RtclProxyBase_NoInline))
-#include "RtclProxyBase.ipp"
-#endif
-
-#endif
Index: tools/src/librtcltools/RtclProxyBase.ipp
===================================================================
--- tools/src/librtcltools/RtclProxyBase.ipp (revision 10)
+++ tools/src/librtcltools/RtclProxyBase.ipp (nonexistent)
@@ -1,54 +0,0 @@
-// $Id: RtclProxyBase.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// 2011-02-13 361 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclProxyBase.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of RtclProxyBase.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline const std::string& RtclProxyBase::Type() const
-{
- return fType;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline Tcl_Command RtclProxyBase::Token() const
-{
- return fCmdToken;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclProxyBase::SetType(const std::string& type)
-{
- fType = type;
- return;
-}
-
-} // end namespace Retro
Index: tools/src/librtcltools/RtclProxyOwned.hpp
===================================================================
--- tools/src/librtcltools/RtclProxyOwned.hpp (revision 10)
+++ tools/src/librtcltools/RtclProxyOwned.hpp (nonexistent)
@@ -1,58 +0,0 @@
-// $Id: RtclProxyOwned.hpp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-13 361 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclProxyOwned.hpp 365 2011-02-28 07:28:26Z mueller $
- \brief Declaration of class RtclProxyOwned.
-*/
-
-#ifndef included_Retro_RtclProxyOwned
-#define included_Retro_RtclProxyOwned 1
-
-#include "RtclProxyBase.hpp"
-
-namespace Retro {
-
- template
- class RtclProxyOwned : public RtclProxyBase {
- public:
- RtclProxyOwned();
- RtclProxyOwned(const std::string& type);
- RtclProxyOwned(const std::string& type, Tcl_Interp* interp,
- const char* name, TO* pobj=0);
- ~RtclProxyOwned();
-
- TO& Obj();
-
- protected:
- void SetObj(TO* pobj);
-
- protected:
- TO* fpObj; //!< ptr to managed object
-
-
- };
-
-} // end namespace Retro
-
-// implementation is all inline
-#include "RtclProxyOwned.ipp"
-
-#endif
Index: tools/src/librtcltools/RtclProxyOwned.ipp
===================================================================
--- tools/src/librtcltools/RtclProxyOwned.ipp (revision 10)
+++ tools/src/librtcltools/RtclProxyOwned.ipp (nonexistent)
@@ -1,78 +0,0 @@
-// $Id: RtclProxyOwned.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-13 361 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id:
- \brief Implemenation (inline) of class RtclProxyOwned.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-template
-inline RtclProxyOwned::RtclProxyOwned()
- : RtclProxyBase(),
- fpObj(0)
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-template
-inline RtclProxyOwned::RtclProxyOwned(const std::string& type)
- : RtclProxyBase(type),
- fpObj(0)
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-template
-inline RtclProxyOwned::RtclProxyOwned(const std::string& type,
- Tcl_Interp* interp, const char* name,
- TO* pobj)
- : RtclProxyBase(type),
- fpObj(pobj)
-{
- CreateObjectCmd(interp, name);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-template
-inline RtclProxyOwned::~RtclProxyOwned()
-{
- delete fpObj;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-template
-inline TO& RtclProxyOwned::Obj()
-{
- return *fpObj;
-}
-
-} // end namespace Retro
Index: tools/src/librtcltools/Rtcl.hpp
===================================================================
--- tools/src/librtcltools/Rtcl.hpp (revision 10)
+++ tools/src/librtcltools/Rtcl.hpp (nonexistent)
@@ -1,65 +0,0 @@
-// $Id: Rtcl.hpp 369 2011-03-13 22:39:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-13 369 1.0.3 add NewListIntObj(vector)
-// 2011-03-12 368 1.0.2 use namespace Rtcl
-// 2011-03-05 366 1.0.1 add AppendResultNewLines()
-// 2011-02-26 364 1.0 Initial version
-// 2011-02-18 362 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: Rtcl.hpp 369 2011-03-13 22:39:26Z mueller $
- \brief Declaration of class Rtcl.
-*/
-
-#ifndef included_Retro_Rtcl
-#define included_Retro_Rtcl 1
-
-#include "tcl.h"
-
-#include
-#include
-#include
-#include
-
-namespace Retro {
-
- namespace Rtcl {
- Tcl_Obj* NewLinesObj(const std::string& str);
- Tcl_Obj* NewLinesObj(std::ostringstream& sos);
-
- Tcl_Obj* NewListIntObj(const std::vector& vec);
- Tcl_Obj* NewListIntObj(const std::vector& vec);
-
- bool SetVar(Tcl_Interp* interp,
- const std::string& varname, Tcl_Obj* pobj);
- bool SetVarOrResult(Tcl_Interp* interp,
- const std::string& varname, Tcl_Obj* pobj);
-
- void AppendResultNewLines(Tcl_Interp* interp);
-
- void SetResult(Tcl_Interp* interp, const std::string& str);
- void SetResult(Tcl_Interp* interp, std::ostringstream& sos);
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_Rtcl_NoInline))
-#include "Rtcl.ipp"
-#endif
-
-#endif
Index: tools/src/librtcltools/RtclContext.cpp
===================================================================
--- tools/src/librtcltools/RtclContext.cpp (revision 10)
+++ tools/src/librtcltools/RtclContext.cpp (nonexistent)
@@ -1,177 +0,0 @@
-// $Id: RtclContext.cpp 368 2011-03-12 09:58:53Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-12 368 1.0.1 drop fExitSeen, get exit handling right
-// 2011-02-18 362 1.0 Initial version
-// 2011-02-13 361 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclContext.cpp 368 2011-03-12 09:58:53Z mueller $
- \brief Implemenation of RtclContext.
-*/
-
-#include
-#include
-
-#include "RtclContext.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RtclContext
- \brief FIXME_docs
-*/
-
-typedef std::pair cset_ins_t;
-typedef std::pair pset_ins_t;
-
-RtclContext::xmap_t RtclContext::fMapContext;
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-RtclContext::RtclContext(Tcl_Interp* interp)
- : fInterp(interp),
- fSetClass(),
- fSetProxy()
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RtclContext::~RtclContext()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclContext::RegisterClass(RtclClassBase* pobj)
-{
- cset_ins_t ret = fSetClass.insert(pobj);
- if (ret.second == false) // or use !(ret.second)
- throw logic_error("RtclContext::RegisterClass: duplicate pointer");
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclContext::UnRegisterClass(RtclClassBase* pobj)
-{
- fSetClass.erase(pobj);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclContext::RegisterProxy(RtclProxyBase* pobj)
-{
- pset_ins_t ret = fSetProxy.insert(pobj);
- if (ret.second == false) // or use !(ret.second)
- throw logic_error("RtclContext::RegisterProxy: duplicate pointer");
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclContext::UnRegisterProxy(RtclProxyBase* pobj)
-{
- fSetProxy.erase(pobj);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclContext::CheckProxy(RtclProxyBase* pobj)
-{
- pset_it_t it = fSetProxy.find(pobj);
- return it != fSetProxy.end();
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclContext::CheckProxy(RtclProxyBase* pobj, const string& type)
-{
- pset_it_t it = fSetProxy.find(pobj);
- if (it == fSetProxy.end()) return false;
- return (*it)->Type() == type;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-
-void RtclContext::ListProxy(std::vector& list,
- const std::string& type)
-{
- list.clear();
- for (pset_it_t it = fSetProxy.begin(); it != fSetProxy.end(); it++) {
- if (type.length() == 0 || (*it)->Type()==type) {
- list.push_back(*it);
- }
- }
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RtclContext& RtclContext::Find(Tcl_Interp* interp)
-{
- RtclContext* pcntx = 0;
- xmap_it_t it = fMapContext.find(interp);
- if (it != fMapContext.end()) {
- pcntx = it->second;
- } else {
- pcntx = new RtclContext(interp);
- fMapContext.insert(xmap_val_t(interp, pcntx));
- Tcl_CreateExitHandler((Tcl_ExitProc*) ThunkTclExitProc, (ClientData) pcntx);
-
- }
- return *pcntx;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-// Note: tcl exit handlers are executed in inverse order of creation.
-// If Find() is called before any Class or Proxy cleanup handlers
-// are created the exit handler created in Find() will be called
-// last, when all map entries have been erased.
-
-void RtclContext::ThunkTclExitProc(ClientData cdata)
-{
- RtclContext* pcntx = (RtclContext*) cdata;
- if (pcntx->fSetClass.empty() && pcntx->fSetProxy.empty()) {
- delete pcntx;
- } else {
- cerr << "RtclContext::ThunkTclExitProc called when maps non-empty" << endl;
- }
- return;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RtclContext_NoInline))
-#define inline
-#include "RtclContext.ipp"
-#undef inline
-#endif
Index: tools/src/librtcltools/Rtcl.ipp
===================================================================
--- tools/src/librtcltools/Rtcl.ipp (revision 10)
+++ tools/src/librtcltools/Rtcl.ipp (nonexistent)
@@ -1,47 +0,0 @@
-// $Id: Rtcl.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-26 364 1.0 Initial version
-// 2011-02-18 362 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: Rtcl.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of Rtcl.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline Tcl_Obj* Rtcl::NewLinesObj(std::ostringstream& sos)
-{
- return NewLinesObj(sos.str());
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void Rtcl::SetResult(Tcl_Interp* interp, std::ostringstream& sos)
-{
- SetResult(interp, sos.str());
- return;
-}
-
-
-} // end namespace Retro
Index: tools/src/librtcltools/RtclOPtr.hpp
===================================================================
--- tools/src/librtcltools/RtclOPtr.hpp (revision 10)
+++ tools/src/librtcltools/RtclOPtr.hpp (nonexistent)
@@ -1,54 +0,0 @@
-// $Id: RtclOPtr.hpp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-
-/*!
- \file
- \version $Id: RtclOPtr.hpp 365 2011-02-28 07:28:26Z mueller $
- \brief Declaration of class RtclOPtr.
-*/
-
-#ifndef included_Retro_RtclOPtr
-#define included_Retro_RtclOPtr 1
-
-#include "tcl.h"
-
-namespace Retro {
-
- class RtclOPtr {
- public:
- RtclOPtr();
- RtclOPtr(Tcl_Obj* pobj);
- RtclOPtr(const RtclOPtr& rhs);
- ~RtclOPtr();
-
- operator Tcl_Obj*() const;
- bool operator !() const;
- RtclOPtr& operator=(const RtclOPtr& rhs);
- RtclOPtr& operator=(Tcl_Obj* pobj);
-
- protected:
- Tcl_Obj* fpObj; //!< pointer to tcl object
- };
-
-} // end namespace Retro
-
-// implementation all inline
-#include "RtclOPtr.ipp"
-
-#endif
Index: tools/src/librtcltools/RtclContext.hpp
===================================================================
--- tools/src/librtcltools/RtclContext.hpp (revision 10)
+++ tools/src/librtcltools/RtclContext.hpp (nonexistent)
@@ -1,90 +0,0 @@
-// $Id: RtclContext.hpp 368 2011-03-12 09:58:53Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-12 368 1.0.1 drop fExitSeen, get exit handling right
-// 2011-02-18 362 1.0 Initial version
-// 2011-02-18 362 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclContext.hpp 368 2011-03-12 09:58:53Z mueller $
- \brief Declaration of class RtclContext.
-*/
-
-#ifndef included_Retro_RtclContext
-#define included_Retro_RtclContext 1
-
-#include "tcl.h"
-
-#include
-#include
-#include
-
-#include "RtclClassBase.hpp"
-#include "RtclProxyBase.hpp"
-
-namespace Retro {
-
- class RtclContext {
- public:
- typedef std::set cset_t;
- typedef cset_t::iterator cset_it_t;
- typedef std::set pset_t;
- typedef pset_t::iterator pset_it_t;
- typedef std::map xmap_t;
- typedef xmap_t::iterator xmap_it_t;
- typedef xmap_t::value_type xmap_val_t;
-
- explicit RtclContext(Tcl_Interp* interp);
- virtual ~RtclContext();
-
- void RegisterClass(RtclClassBase* pobj);
- void UnRegisterClass(RtclClassBase* pobj);
-
- void RegisterProxy(RtclProxyBase* pobj);
- void UnRegisterProxy(RtclProxyBase* pobj);
- bool CheckProxy(RtclProxyBase* pobj);
- bool CheckProxy(RtclProxyBase* pobj, const std::string& type);
-
- void ListProxy(std::vector& list,
- const std::string& type);
-
- static RtclContext& Find(Tcl_Interp* interp);
-
- static void ThunkTclExitProc(ClientData cdata);
-
- protected:
-
- Tcl_Interp* fInterp; //!< associated tcl interpreter
- cset_t fSetClass; //!< set for Class objects
- pset_t fSetProxy; //!< set for Proxy objects
-
- static xmap_t fMapContext; //!< map of contexts
-
- // RtclContext is not copy or assignable nor default constructable
- private:
- RtclContext();
- RtclContext(const RtclContext& rhs);
- RtclContext& operator=(const RtclContext& rhs);
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RtclContext_NoInline))
-#include "RtclContext.ipp"
-#endif
-
-#endif
Index: tools/src/librtcltools/RtclOPtr.ipp
===================================================================
--- tools/src/librtcltools/RtclOPtr.ipp (revision 10)
+++ tools/src/librtcltools/RtclOPtr.ipp (nonexistent)
@@ -1,102 +0,0 @@
-// $Id: RtclOPtr.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclOPtr.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of RtclOPtr.
-*/
-
-/*!
- \class Retro::RtclOPtr
- \brief FIXME_docs
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-inline RtclOPtr::RtclOPtr()
- : fpObj(0)
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline RtclOPtr::RtclOPtr(Tcl_Obj* pobj)
- : fpObj(pobj)
-{
- if (fpObj) Tcl_IncrRefCount(fpObj);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline RtclOPtr::RtclOPtr(const RtclOPtr& rhs)
- : fpObj(rhs.fpObj)
-{
- if (fpObj) Tcl_IncrRefCount(fpObj);
-}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-inline RtclOPtr::~RtclOPtr()
-{
- if (fpObj) Tcl_DecrRefCount(fpObj);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline RtclOPtr::operator Tcl_Obj*() const
-{
- return fpObj;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline bool RtclOPtr::operator !() const
-{
- return fpObj==0;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline RtclOPtr& RtclOPtr::operator=(const RtclOPtr& rhs)
-{
- if (&rhs == this) return *this;
- return operator=(rhs.fpObj);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline RtclOPtr& RtclOPtr::operator=(Tcl_Obj* pobj)
-{
- if (fpObj) Tcl_DecrRefCount(fpObj);
- fpObj = pobj;
- if (fpObj) Tcl_IncrRefCount(fpObj);
- return *this;
-}
-
-} // end namespace Retro
Index: tools/src/librtcltools/RtclContext.ipp
===================================================================
--- tools/src/librtcltools/RtclContext.ipp (revision 10)
+++ tools/src/librtcltools/RtclContext.ipp (nonexistent)
@@ -1,36 +0,0 @@
-// $Id: RtclContext.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-18 362 1.0 Initial version
-// 2011-02-18 362 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclContext.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of RtclContext.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-//inline RtclContext::pset_cit_t RtclContext::Begin() const
-//{}
-
-
-} // end namespace Retro
Index: tools/src/librtcltools/RtclNameSet.cpp
===================================================================
--- tools/src/librtcltools/RtclNameSet.cpp (revision 10)
+++ tools/src/librtcltools/RtclNameSet.cpp (nonexistent)
@@ -1,123 +0,0 @@
-// $Id: RtclNameSet.cpp 374 2011-03-27 17:02:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclNameSet.cpp 374 2011-03-27 17:02:47Z mueller $
- \brief Implemenation of RtclNameSet.
-*/
-
-// debug
-#include
-
-#include
-
-#include "RtclNameSet.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RtclNameSet
- \brief FIXME_docs
-*/
-
-typedef std::pair nset_ins_t;
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-RtclNameSet::RtclNameSet()
- : fSet()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RtclNameSet::RtclNameSet(const std::string& nset)
- : fSet()
-{
- size_t ibeg=0;
- while (true) {
- size_t iend = nset.find_first_of('|', ibeg);
- if (iend-ibeg > 0) {
- string name(nset, ibeg, iend-ibeg);
- nset_ins_t ret = fSet.insert(name);
- if (ret.second == false) // or use !(ret.second)
- throw logic_error(string("RtclNameSet:: duplicate name '") +
- name + string("' in set '") + nset + string("'"));
- }
- if (iend == string::npos) break;
- ibeg = iend+1;
- }
-}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RtclNameSet::~RtclNameSet()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclNameSet:: Check(Tcl_Interp* interp, std::string& rval,
- const std::string& tval) const
-{
- rval.clear();
- nset_cit_t it = fSet.lower_bound(tval);
-
- // no leading substring match
- if (it==fSet.end() || tval!=it->substr(0,tval.length())) {
- Tcl_AppendResult(interp, "-E: bad option \"", tval.c_str(),
- "\": must be ", NULL);
- const char* delim = "";
- for (nset_cit_t it1=fSet.begin(); it1!=fSet.end(); it1++) {
- Tcl_AppendResult(interp, delim, it1->c_str(), NULL);
- delim = ",";
- }
- return false;
- }
-
- // check for ambiguous substring match
- if (tval != *it) {
- nset_cit_t it1 = it;
- it1++;
- if (it1!=fSet.end() && tval==it1->substr(0,tval.length())) {
- Tcl_AppendResult(interp, "-E: ambiguous option \"", tval.c_str(),
- "\": must be ", NULL);
- const char* delim = "";
- for (it1=it; it1!=fSet.end() &&
- tval==it1->substr(0,tval.length()); it1++) {
- Tcl_AppendResult(interp, delim, it1->c_str(), NULL);
- delim = ",";
- }
- return false;
- }
- }
-
- rval = *it;
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RtclNameSet_NoInline))
-#define inline
-#include "RtclNameSet.ipp"
-#undef inline
-#endif
Index: tools/src/librtcltools/RtclArgs.cpp
===================================================================
--- tools/src/librtcltools/RtclArgs.cpp (revision 10)
+++ tools/src/librtcltools/RtclArgs.cpp (nonexistent)
@@ -1,547 +0,0 @@
-// $Id: RtclArgs.cpp 374 2011-03-27 17:02:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-26 373 1.0.4 add GetArg(float/double)
-// 2011-03-13 369 1.0.3 add GetArg(vector); NextOpt clear NOptMiss
-// 2011-03-06 367 1.0.2 add Config() methods;
-// 2011-03-05 366 1.0.1 fObjc,fNDone now size_t; add NDone(), SetResult();
-// add GetArg(Tcl_Obj), PeekArgString();
-// 2011-02-26 364 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclArgs.cpp 374 2011-03-27 17:02:47Z mueller $
- \brief Implemenation of RtclArgs.
-*/
-
-//debug
-#include
-
-#include
-#include
-
-#include
-
-#include "RtclArgs.hpp"
-#include "Rtcl.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RtclArgs
- \brief FIXME_docs
-*/
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-RtclArgs::RtclArgs()
- : fpInterp(0),
- fObjc(0),
- fObjv(0),
- fNDone(0),
- fNOptMiss(0),
- fNConfigRead(0),
- fOptErr(false),
- fArgErr(false)
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RtclArgs::RtclArgs(Tcl_Interp* interp, int objc, Tcl_Obj* const objv[],
- size_t nskip)
- : fpInterp(interp),
- fObjc((size_t)objc),
- fObjv(objv),
- fNDone((nskip<=(size_t)objc) ? nskip : (size_t)objc),
- fNOptMiss(0),
- fNConfigRead(0),
- fOptErr(false),
- fArgErr(false)
-{
- if (objc < 0)
- throw invalid_argument("RtclArgs::ctor: objc must be >= 0");
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-RtclArgs::RtclArgs(const RtclArgs& rhs)
- : fpInterp(rhs.fpInterp),
- fObjc(rhs.fObjc),
- fObjv(rhs.fObjv),
- fNDone(rhs.fNDone),
- fNOptMiss(rhs.fNOptMiss),
- fOptErr(rhs.fOptErr),
- fArgErr(rhs.fArgErr)
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RtclArgs::~RtclArgs()
-{}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-Tcl_Obj* RtclArgs::Objv(size_t ind) const
-{
- if (ind >= (size_t)fObjc)
- throw out_of_range("RtclArgs::Objv: index out-of-range");
- return fObjv[ind];
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, Tcl_Obj*& pval)
-{
- Tcl_Obj* pobj;
- if (!NextArg(name, pobj)) return false;
- if (pobj==0) return true;
- pval = pobj;
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, const char*& val)
-{
- Tcl_Obj* pobj;
- if (!NextArg(name, pobj)) return false;
- if (pobj==0) return true;
- val = Tcl_GetString(pobj);
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, std::string& val)
-{
- Tcl_Obj* pobj;
- if (!NextArg(name, pobj)) return false;
- if (pobj==0) return true;
- val = Tcl_GetString(pobj);
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, int8_t& val, int8_t min, int8_t max)
-{
- int32_t val32 = (int32_t)val;
- bool ret = GetArg(name, val32, (int32_t)min, (int32_t)max);
- val = (int8_t) val32;
- return ret;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, uint8_t& val, uint8_t max, uint8_t min)
-{
- uint32_t val32 = (uint32_t)val;
- bool ret = GetArg(name, val32, (uint32_t)max, (uint32_t)min);
- val = (uint8_t) val32;
- return ret;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, int16_t& val, int16_t min, int16_t max)
-{
- int32_t val32 = (int32_t)val;
- bool ret = GetArg(name, val32, (int32_t)min, (int32_t)max);
- val = (int16_t) val32;
- return ret;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, uint16_t& val, uint16_t max,
- uint16_t min)
-{
- uint32_t val32 = (uint32_t)val;
- bool ret = GetArg(name, val32, (uint32_t)max, (uint32_t)min);
- val = (uint16_t) val32;
- return ret;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, int32_t& val, int32_t min, int32_t max)
-{
- Tcl_Obj* pobj;
- if (!NextArg(name, pobj)) return false;
- if (pobj==0) return true;
- int objval;
- if (Tcl_GetIntFromObj(fpInterp, pobj, &objval) != TCL_OK) return false;
- if (objval < min || objval > max) {
- ostringstream sos;
- sos << "-E: value '" << objval << "' for '" << name << "' out of range "
- << min << "..." << max;
- AppendResult(sos);
- return false;
- }
- val = (int32_t) objval;
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, uint32_t& val, uint32_t max,
- uint32_t min)
-{
- Tcl_Obj* pobj;
- if (!NextArg(name, pobj)) return false;
- if (pobj==0) return true;
- int objval;
- if (Tcl_GetIntFromObj(fpInterp, pobj, &objval) != TCL_OK) return false;
- unsigned int objuval = objval;
- if (objuval < min || objuval > max) {
- ostringstream sos;
- sos << "-E: value '" << objuval << "' for '" << name << "' out of range "
- << min << "..." << max;
- AppendResult(sos);
- return false;
- }
- val = (uint32_t) objval;
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, float& val, float min, float max)
-{
- double vald = (double)val;
- bool ret = GetArg(name, vald, (double)max, (double)min);
- val = (float) vald;
- return ret;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, double& val, double min, double max)
-{
- Tcl_Obj* pobj;
- if (!NextArg(name, pobj)) return false;
- if (pobj==0) return true;
- double objval;
- if (Tcl_GetDoubleFromObj(fpInterp, pobj, &objval) != TCL_OK) return false;
- if (objval < min || objval > max) {
- ostringstream sos;
- sos << "-E: value '" << objval << "' for '" << name << "' out of range "
- << min << "..." << max;
- AppendResult(sos);
- return false;
- }
- val = objval;
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, std::vector& val,
- size_t lmin, size_t lmax)
-{
- int objc = 0;
- Tcl_Obj** objv = 0;
- if (!NextArgList(name, objc, objv, lmin, lmax)) return false;
- if (objv==0) return true;
-
- val.clear();
- val.reserve(objc);
-
- for (int i=0; i>8;
- if (ivalmsb != 0 && ivalmsb != -1) {
- ostringstream sos;
- sos << "-E: list element '" << Tcl_GetString(objv[i])
- << "' for '" << name
- << "' out of range " << "0...0xff";
- AppendResult(sos);
- return false;
- }
- val.push_back((uint8_t)ival);
- }
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::GetArg(const char* name, std::vector& val,
- size_t lmin, size_t lmax)
-{
- int objc = 0;
- Tcl_Obj** objv = 0;
- if (!NextArgList(name, objc, objv, lmin, lmax)) return false;
- if (objv==0) return true;
-
- val.clear();
- val.reserve(objc);
-
- for (int i=0; i>16;
- if (ivalmsb != 0 && ivalmsb != -1) {
- ostringstream sos;
- sos << "-E: list element '" << Tcl_GetString(objv[i])
- << "' for '" << name
- << "' out of range " << "0...0xffff";
- AppendResult(sos);
- return false;
- }
- val.push_back((uint16_t)ival);
- }
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::Config(const char* name, std::string& val)
-{
- ConfigNameCheck(name);
- string tmp = val;
- if (!GetArg(name, tmp)) return false;
- if (fNOptMiss == 0) { // config write
- val = tmp;
- } else { // config read
- if (!ConfigReadCheck()) return false;
- SetResult(Tcl_NewStringObj(val.data(), val.length()));
- }
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::Config(const char* name, uint32_t& val, uint32_t max,
- uint32_t min)
-{
- ConfigNameCheck(name);
- uint32_t tmp = val;
- if (!GetArg(name, tmp, max, min)) return false;
- if (fNOptMiss == 0) { // config write
- val = tmp;
- } else { // config read
- if (!ConfigReadCheck()) return false;
- SetResult(Tcl_NewIntObj((int)val));
- }
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::NextOpt(std::string& val)
-{
- fNOptMiss = 0;
- val.clear();
- fOptErr = false;
-
- if (fNDone == fObjc) return false;
-
- const char* str = PeekArgString(0);
-
- if (str[0]=='-' && str[1] && !isdigit(str[1])) {
- fNDone += 1;
- // '--' seen (eat it, and say no Opt's found)
- if (str[1]=='-' && str[2]==0) {
- return false;
- }
- val = str;
- return true;
- }
- return false;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::NextOpt(std::string& val, RtclNameSet& optset)
-{
- val.clear();
- string opt;
- if (!NextOpt(opt) || opt.empty()) return false;
-
- fOptErr = !optset.Check(fpInterp, val, opt);
- return !fOptErr;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::AllDone()
-{
- if (fArgErr || fOptErr) return false;
- if (fNDone < fObjc) {
- AppendResult("-E: superfluous arguments, first one \"",
- Tcl_GetString(fObjv[fNDone]), "\"", NULL);
- return false;
- }
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-const char* RtclArgs::PeekArgString(int rind) const
-{
- int ind = fNDone + rind;
- if (ind < 0 || ind >= (int)fObjc) return "";
- return Tcl_GetString(fObjv[ind]);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclArgs::AppendResult(const char* str, ...)
-{
- Tcl_AppendResult(fpInterp, str, NULL);
- va_list ap;
- va_start (ap, str);
- Tcl_AppendResultVA(fpInterp, ap);
- va_end (ap);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclArgs::AppendResultLines(const std::string& str)
-{
- Rtcl::AppendResultNewLines(fpInterp);
-
- if (str.length()>0 && str[str.length()-1]=='\n') {
- Tcl_AppendResult(fpInterp, str.substr(0,str.length()-1).c_str(), NULL);
- } else {
- Tcl_AppendResult(fpInterp, str.c_str(), NULL);
- }
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::NextArg(const char* name, Tcl_Obj*& pobj)
-{
- pobj = 0;
-
- bool isopt = name[0] == '?';
- bool isoptopt = isopt && (name[1] == '?');
-
- if (!isopt) fNOptMiss = 0;
-
- if (fNDone == fObjc) {
- if (!isopt) {
- AppendResult("-E: required argument \"", name, "\" missing", NULL);
- fArgErr = true;
- return false;
- }
- fNOptMiss += 1;
- return true;
- }
-
- // if %% arg peek in next arg and check that it's not an option
- if (isoptopt) {
- const char* nval = Tcl_GetString(fObjv[fNDone]);
- if (nval[0]=='-' && nval[1] && isalpha(nval[1])) {
- fNOptMiss += 1;
- return true;
- }
- }
-
- pobj = fObjv[fNDone++];
-
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::NextArgList(const char* name, int& objc, Tcl_Obj**& objv,
- size_t lmin, size_t lmax)
-{
- objc = 0;
- objv = 0;
- Tcl_Obj* pobj = 0;
- if (!NextArg(name, pobj)) return false;
- if (pobj==0) return true;
-
- if (Tcl_ListObjGetElements(fpInterp, pobj, &objc, &objv) != TCL_OK) {
- return false;
- }
-
- if ((size_t)objc < lmin || (size_t)objc > lmax) {
- ostringstream sos;
- sos << "-E: list length '" << objc << "' for '" << name << "' out of range "
- << lmin << "..." << lmax;
- AppendResult(sos);
- return false;
- }
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclArgs::ConfigNameCheck(const char* name)
-{
- if (name==0 || name[0]!='?' || name[1]!='?')
- throw invalid_argument("RtclArgs::Config(): name must start with ??");
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclArgs::ConfigReadCheck()
-{
- if (fNConfigRead != 0) {
- SetResult(Tcl_NewObj());
- AppendResult("-E: only one config read allowed per command, \"",
- PeekArgString(-1), "\" is second", NULL);
- return false;
- }
- fNConfigRead += 1;
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RtclArgs_NoInline))
-#define inline
-#include "RtclArgs.ipp"
-#undef inline
-#endif
Index: tools/src/librtcltools/RtclStats.cpp
===================================================================
--- tools/src/librtcltools/RtclStats.cpp (revision 10)
+++ tools/src/librtcltools/RtclStats.cpp (nonexistent)
@@ -1,151 +0,0 @@
-// $Id: RtclStats.cpp 374 2011-03-27 17:02:47Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-26 364 1.0 Initial version
-// 2011-02-20 363 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclStats.cpp 374 2011-03-27 17:02:47Z mueller $
- \brief Implemenation of RtclStats.
-*/
-
-#include
-
-#include "RtclStats.hpp"
-#include "RtclNameSet.hpp"
-#include "RtclOPtr.hpp"
-
-using namespace std;
-using namespace Retro;
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclStats::GetArgs(RtclArgs& args, Context& cntx)
-{
- static RtclNameSet optset("-lname|-ltext|-lvalue|-lpair|-lall|"
- "-atext|-avalue|-print");
-
- string opt;
- string varname;
- string format;
- int width=0;
- int prec=0;
-
- if (args.NextOpt(opt, optset)) {
- if (opt == "-atext" || opt == "-avalue") {
- if (!args.GetArg("varName", varname)) return false;
- } else if (opt == "-print") {
- if (!args.GetArg("?format", format)) return false;
- if (!args.GetArg("?width", width, 0, 32)) return false;
- if (!args.GetArg("?prec", prec, 0, 32)) return false;
- }
-
- } else {
- opt = "-print";
- width = 12;
- }
- if (!args.AllDone()) return false;
-
- cntx.opt = opt;
- cntx.varname = varname;
- cntx.format = format;
- cntx.width = width;
- cntx.prec = prec;
-
- return true;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-bool RtclStats::Exec(RtclArgs& args, Context& cntx, const Rstats& stats)
-{
- Tcl_Interp* interp = args.Interp();
- Tcl_Obj* plist = Tcl_GetObjResult(interp);
-
- if (cntx.opt == "-lname") { // -lname -------------------------
- for (size_t i=0; i
-//
-// 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
-// 2011-03-05 366 1.0.1 use AppendResultNewLines() in exception catcher
-// 2011-02-20 363 1.0 Initial version
-// 2011-02-11 360 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclClassBase.cpp 374 2011-03-27 17:02:47Z mueller $
- \brief Implemenation of RtclClassBase.
-*/
-
-#include
-
-#include
-
-#include "RtclClassBase.hpp"
-#include "RtclContext.hpp"
-#include "RtclOPtr.hpp"
-#include "Rtcl.hpp"
-
-using namespace std;
-using namespace Retro;
-
-/*!
- \class Retro::RtclClassBase
- \brief FIXME_docs
-*/
-
-//------------------------------------------+-----------------------------------
-//! Default constructor
-
-RtclClassBase::RtclClassBase(const std::string& type)
- : fType(type),
- fInterp(0)
-{}
-
-//------------------------------------------+-----------------------------------
-//! Destructor
-
-RtclClassBase::~RtclClassBase()
-{
- if (fInterp) RtclContext::Find(fInterp).UnRegisterClass(this);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclClassBase::CreateClassCmd(Tcl_Interp* interp, const char* name)
-{
- fInterp = interp;
- fCmdToken =
- Tcl_CreateObjCommand(interp, name, ThunkTclClassCmd, (ClientData) this,
- (Tcl_CmdDeleteProc *) ThunkTclCmdDeleteProc);
- RtclContext::Find(interp).RegisterClass(this);
- Tcl_CreateExitHandler((Tcl_ExitProc*) ThunkTclExitProc, (ClientData) this);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline int RtclClassBase::TclClassCmd(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[])
-{
- if (objc == 1) {
- return ClassCmdList(interp);
- }
-
- const char* name = Tcl_GetString(objv[1]);
- if (objc == 3 && strcmp(Tcl_GetString(objv[2]), "-delete")==0) {
- return ClassCmdDelete(interp, name);
- }
-
- return ClassCmdCreate(interp, objc, objv);
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline int RtclClassBase::ClassCmdList(Tcl_Interp* interp)
-{
- std::vector list;
- RtclContext::Find(interp).ListProxy(list, Type());
- RtclOPtr rlist(Tcl_NewListObj(0, NULL));
-
- for (size_t i=0; iToken());
- RtclOPtr rval(Tcl_NewStringObj(cmdname, -1));
- if (Tcl_ListObjAppendElement(interp, rlist, rval) != kOK) return kERR;
- }
-
- Tcl_SetObjResult(interp, rlist);
-
- return kOK;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline int RtclClassBase::ClassCmdDelete(Tcl_Interp* interp, const char* name)
-{
- Tcl_CmdInfo cinfo;
- if (Tcl_GetCommandInfo(interp, name, &cinfo) == 0) {
- Tcl_AppendResult(interp, "-E: unknown command name \"", name, "\"", NULL);
- return kERR;
- }
-
- RtclContext& cntx = RtclContext::Find(interp);
- if (!cntx.CheckProxy((RtclProxyBase*) cinfo.objClientData)) {
- Tcl_AppendResult(interp, "-E: command \"", name, "\" is not a RtclProxy",
- NULL);
- return kERR;
- }
- if (!cntx.CheckProxy((RtclProxyBase*) cinfo.objClientData, Type())) {
- Tcl_AppendResult(interp, "-E: command \"", name,
- "\" is not a RtclProxy of type \"",
- Type().c_str(), "\"", NULL);
- return kERR;
- }
-
- int irc = Tcl_DeleteCommand(interp, name);
- if (irc != kOK) Tcl_AppendResult(interp, "-E: failed to delete \"", name,
- "\"", NULL);
- return irc;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-int RtclClassBase::ThunkTclClassCmd(ClientData cdata, Tcl_Interp* interp,
- int objc, Tcl_Obj* const objv[])
-{
- if (!cdata) {
- Tcl_AppendResult(interp, "-E: BUG! ThunkTclClassCmd called with cdata == 0",
- NULL);
- return kERR;
- }
-
- try {
- return ((RtclClassBase*) cdata)->TclClassCmd(interp, objc, objv);
- } catch (exception& e) {
- Rtcl::AppendResultNewLines(interp);
- Tcl_AppendResult(interp, "-E: exception caught in ThunkTclClassCmd: \"",
- e.what(), "\"", NULL);
- }
- return kERR;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclClassBase::ThunkTclCmdDeleteProc(ClientData cdata)
-{
- Tcl_DeleteExitHandler((Tcl_ExitProc*) ThunkTclExitProc, cdata);
- delete ((RtclClassBase*) cdata);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-void RtclClassBase::ThunkTclExitProc(ClientData cdata)
-{
- delete ((RtclClassBase*) cdata);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-#if (defined(Retro_NoInline) || defined(Retro_RtclClassBase_NoInline))
-#define inline
-#include "RtclClassBase.ipp"
-#undef inline
-#endif
Index: tools/src/librtcltools/RtclNameSet.hpp
===================================================================
--- tools/src/librtcltools/RtclNameSet.hpp (revision 10)
+++ tools/src/librtcltools/RtclNameSet.hpp (nonexistent)
@@ -1,61 +0,0 @@
-// $Id: RtclNameSet.hpp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-
-/*!
- \file
- \version $Id: RtclNameSet.hpp 365 2011-02-28 07:28:26Z mueller $
- \brief Declaration of class RtclNameSet.
-*/
-
-#ifndef included_Retro_RtclNameSet
-#define included_Retro_RtclNameSet 1
-
-#include "tcl.h"
-
-#include
-#include
-
-#include "RtclNameSet.hpp"
-
-namespace Retro {
-
- class RtclNameSet {
- public:
- typedef std::set nset_t;
- typedef nset_t::iterator nset_it_t;
- typedef nset_t::const_iterator nset_cit_t;
-
- RtclNameSet();
- RtclNameSet(const std::string& nset);
- ~RtclNameSet();
-
- bool Check(Tcl_Interp* interp, std::string& rval,
- const std::string& tval) const;
-
- protected:
- nset_t fSet;
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RtclNameSet_NoInline))
-#include "RtclNameSet.ipp"
-#endif
-
-#endif
Index: tools/src/librtcltools/RtclArgs.hpp
===================================================================
--- tools/src/librtcltools/RtclArgs.hpp (revision 10)
+++ tools/src/librtcltools/RtclArgs.hpp (nonexistent)
@@ -1,151 +0,0 @@
-// $Id: RtclArgs.hpp 373 2011-03-26 08:54:27Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-26 373 1.0.4 add GetArg(flt/dbl), SetResult(str,sos,int,dbl)
-// 2011-03-13 369 1.0.3 add GetArg(vector)
-// 2011-03-06 367 1.0.2 add min to GetArg(unsigned); add Config() methods;
-// 2011-03-05 366 1.0.1 fObjc,fNDone now size_t; add NDone(), NOptMiss();
-// add SetResult(), GetArg(Tcl_Obj), PeekArgString();
-// 2011-02-26 364 1.0 Initial version
-// 2011-02-06 359 0.1 First draft
-// ---------------------------------------------------------------------------
-
-
-/*!
- \file
- \version $Id: RtclArgs.hpp 373 2011-03-26 08:54:27Z mueller $
- \brief Declaration of class RtclArgs.
-*/
-
-#ifndef included_Retro_RtclArgs
-#define included_Retro_RtclArgs 1
-
-#include "tcl.h"
-
-#include
-#include
-#include
-#include
-
-#include "RtclNameSet.hpp"
-
-namespace Retro {
-
- class RtclArgs {
- public:
-
- const static int8_t int8_min = 0xff;
- const static int8_t int8_max = 0x7f;
- const static uint8_t uint8_max = 0xff;
- const static int16_t int16_min = 0xffff;
- const static int16_t int16_max = 0x7fff;
- const static uint16_t uint16_max = 0xffff;
- const static int32_t int32_min = 0xffffffff;
- const static int32_t int32_max = 0x7fffffff;
- const static uint32_t uint32_max = 0xffffffff;
-
- RtclArgs();
- RtclArgs(Tcl_Interp* interp, int objc,
- Tcl_Obj* const objv[], size_t nskip=1);
- RtclArgs(const RtclArgs& rhs);
- ~RtclArgs();
-
- Tcl_Interp* Interp() const;
- int Objc() const;
- Tcl_Obj* Objv(size_t ind) const;
-
- bool GetArg(const char* name, Tcl_Obj*& pval);
-
- bool GetArg(const char* name, const char*& val);
- bool GetArg(const char* name, std::string& val);
-
- bool GetArg(const char* name, int8_t& val,
- int8_t min=int8_min, int8_t max=int8_max);
- bool GetArg(const char* name, uint8_t& val,
- uint8_t max=uint8_max, uint8_t min=0);
- bool GetArg(const char* name, int16_t& val,
- int16_t min=int16_min, int16_t max=int16_max);
- bool GetArg(const char* name, uint16_t& val,
- uint16_t max=uint16_max, uint16_t min=0);
- bool GetArg(const char* name, int32_t& val,
- int32_t min=int32_min, int32_t max=int32_max);
- bool GetArg(const char* name, uint32_t& val,
- uint32_t max=uint32_max, uint32_t min=0);
-
- bool GetArg(const char* name, float& val,
- float min=-1.e30, float max=+1.e30);
- bool GetArg(const char* name, double& val,
- double min=-1.e30, double max=+1.e30);
-
- bool GetArg(const char* name, std::vector& val,
- size_t lmin=0, size_t lmax=uint32_max);
- bool GetArg(const char* name, std::vector& val,
- size_t lmin=0, size_t lmax=uint32_max);
-
- bool Config(const char* name, std::string& val);
- bool Config(const char* name, uint32_t& val,
- uint32_t max=uint32_max, uint32_t min=0);
-
- bool NextOpt(std::string& val);
- bool NextOpt(std::string& val, RtclNameSet& optset);
- bool OptValid() const;
-
- bool AllDone();
- size_t NDone() const;
- size_t NOptMiss() const;
-
- const char* PeekArgString(int rind) const;
-
- void SetResult(const std::string& str);
- void SetResult(std::ostringstream& sos);
- void SetResult(int val);
- void SetResult(double val);
- void SetResult(Tcl_Obj* pobj);
-
- void AppendResult(const char* str, ...);
- void AppendResult(const std::string& str);
- void AppendResult(std::ostringstream& sos);
- void AppendResultLines(const std::string& str);
- void AppendResultLines(std::ostringstream& sos);
-
- Tcl_Obj* operator[](size_t ind) const;
-
- protected:
- bool NextArg(const char* name, Tcl_Obj*& pobj);
- bool NextArgList(const char* name, int& objc,
- Tcl_Obj**& objv, size_t lmin=0,
- size_t lmax=uint32_max);
- void ConfigNameCheck(const char* name);
- bool ConfigReadCheck();
-
- protected:
- Tcl_Interp* fpInterp; //!< pointer to tcl interpreter
- size_t fObjc; //!< original args count
- Tcl_Obj* const * fObjv; //!< original args vector
- size_t fNDone; //!< number of processed args
- size_t fNOptMiss; //!< number of missed optional args
- size_t fNConfigRead; //!< number of read mode config's
- bool fOptErr; //!< option processing error flag
- bool fArgErr; //!< argument processing error flag
-
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RtclArgs_NoInline))
-#include "RtclArgs.ipp"
-#endif
-
-#endif
Index: tools/src/librtcltools/RtclArgs.ipp
===================================================================
--- tools/src/librtcltools/RtclArgs.ipp (revision 10)
+++ tools/src/librtcltools/RtclArgs.ipp (nonexistent)
@@ -1,153 +0,0 @@
-// $Id: RtclArgs.ipp 373 2011-03-26 08:54:27Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-03-26 373 1.0.2 add SetResult(string)
-// 2011-03-05 366 1.0.1 add NDone(), NOptMiss(), SetResult();
-// 2011-02-26 364 1.0 Initial version
-// 2011-02-18 362 0.1 First draft
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclArgs.ipp 373 2011-03-26 08:54:27Z mueller $
- \brief Implemenation (inline) of RtclArgs.
-*/
-
-#include "Rtcl.hpp"
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline Tcl_Interp* RtclArgs::Interp() const
-{
- return fpInterp;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline int RtclArgs::Objc() const
-{
- return fObjc;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline bool RtclArgs::OptValid() const
-{
- return !fOptErr;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline size_t RtclArgs::NDone() const
-{
- return fNDone;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline size_t RtclArgs::NOptMiss() const
-{
- return fNOptMiss;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclArgs::SetResult(const std::string& str)
-{
- Rtcl::SetResult(fpInterp, str);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclArgs::SetResult(std::ostringstream& sos)
-{
- Rtcl::SetResult(fpInterp, sos);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclArgs::SetResult(int val)
-{
- Tcl_SetObjResult(fpInterp, Tcl_NewIntObj(val));
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclArgs::SetResult(double val)
-{
- Tcl_SetObjResult(fpInterp, Tcl_NewDoubleObj(val));
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclArgs::SetResult(Tcl_Obj* pobj)
-{
- Tcl_SetObjResult(fpInterp, pobj);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclArgs::AppendResult(const std::string& str)
-{
- Tcl_AppendResult(fpInterp, str.c_str(), NULL);
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclArgs::AppendResult(std::ostringstream& sos)
-{
- AppendResult(sos.str());
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline void RtclArgs::AppendResultLines(std::ostringstream& sos)
-{
- AppendResultLines(sos.str());
- return;
-}
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-inline Tcl_Obj* RtclArgs::operator[](size_t ind) const
-{
- return fObjv[ind];
-}
-
-} // end namespace Retro
Index: tools/src/librtcltools/RtclNameSet.ipp
===================================================================
--- tools/src/librtcltools/RtclNameSet.ipp (revision 10)
+++ tools/src/librtcltools/RtclNameSet.ipp (nonexistent)
@@ -1,36 +0,0 @@
-// $Id: RtclNameSet.ipp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-20 363 1.0 Initial version
-// ---------------------------------------------------------------------------
-
-/*!
- \file
- \version $Id: RtclNameSet.ipp 365 2011-02-28 07:28:26Z mueller $
- \brief Implemenation (inline) of RtclNameSet.
-*/
-
-// all method definitions in namespace Retro (avoid using in includes...)
-namespace Retro {
-
-//------------------------------------------+-----------------------------------
-//! FIXME_docs
-
-//inline Tcl_Interp* RtclNameSet::Interp() const
-//{
-// return fpInterp;
-//}
-
-} // end namespace Retro
Index: tools/src/librtcltools/RtclStats.hpp
===================================================================
--- tools/src/librtcltools/RtclStats.hpp (revision 10)
+++ tools/src/librtcltools/RtclStats.hpp (nonexistent)
@@ -1,61 +0,0 @@
-// $Id: RtclStats.hpp 365 2011-02-28 07:28:26Z mueller $
-//
-// Copyright 2011- 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.
-//
-// Revision History:
-// Date Rev Version Comment
-// 2011-02-26 364 1.0 Initial version
-// 2011-02-20 363 0.1 fFirst draft
-// ---------------------------------------------------------------------------
-
-
-/*!
- \file
- \version $Id: RtclStats.hpp 365 2011-02-28 07:28:26Z mueller $
- \brief Declaration of class RtclStats.
-*/
-
-#ifndef included_Retro_RtclStats
-#define included_Retro_RtclStats 1
-
-#include
-
-#include "RtclArgs.hpp"
-#include "librtools/Rstats.hpp"
-
-namespace Retro {
-
- class RtclStats {
- public:
- struct Context {
- std::string opt;
- std::string varname;
- std::string format;
- int width;
- int prec;
-
- Context()
- : opt(), varname(), format(), width(0), prec(0)
- {}
- };
-
- static bool GetArgs(RtclArgs& args, Context& cntx);
- static bool Exec(RtclArgs& args, Context& cntx, const Rstats& stats);
- };
-
-} // end namespace Retro
-
-#if !(defined(Retro_NoInline) || defined(Retro_RtclStats_NoInline))
-//#include "RtclStats.ipp"
-#endif
-
-#endif
Index: tools/src/librtcltools
===================================================================
--- tools/src/librtcltools (revision 10)
+++ tools/src/librtcltools (nonexistent)
tools/src/librtcltools
Property changes :
Deleted: svn:ignore
## -1,33 +0,0 ##
-*.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
-*.dep
Index: tools/src/Makefile
===================================================================
--- tools/src/Makefile (revision 10)
+++ tools/src/Makefile (nonexistent)
@@ -1,51 +0,0 @@
-# $Id: Makefile 372 2011-03-20 22:48:11Z mueller $
-#
-# Top level makefile, using the recipe found in
-# http://www.lackof.org/taggart/hacking/make-example/
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-03-20 372 1.1.1 renamed ..tcl -> ..tpp
-# 2011-03-14 370 1.1.0 rename librtoolstcl -> librtcltools
-# 2011-02-13 361 1.1 add realclean rule; add dirs and dependencies
-# 2011-01-30 357 1.0 Initial version
-#
-DIRS = librtools
-DIRS += librlink
-DIRS += librtcltools
-DIRS += librutiltpp
-DIRS += librlinktpp
-#
-BUILDDIRS = $(DIRS:%=build-%)
-CLEANDIRS = $(DIRS:%=clean-%)
-REALCDIRS = $(DIRS:%=realc-%)
-#
-.PHONY: all clean realclean
-.PHONY: $(DIRS)
-.PHONY: $(BUILDDIRS)
-.PHONY: $(CLEANDIRS)
-.PHONY: $(REALCDIRS)
-#
-# build 'all' rule
-#
-all: $(BUILDDIRS)
-#
-build-librlink : build-librtools
-build-librtcltools : build-librtools
-build-librutiltpp : build-librtcltools
-build-librlinktpp : build-librlink build-librtcltools
-#
-$(BUILDDIRS):
- $(MAKE) -C $(@:build-%=%)
-#
-# clean rule
-#
-clean: $(CLEANDIRS)
-$(CLEANDIRS):
- $(MAKE) -C $(@:clean-%=%) clean
-#
-# realclean rule
-#
-realclean: $(REALCDIRS)
-$(REALCDIRS):
- $(MAKE) -C $(@:realc-%=%) realclean
Index: tools/src
===================================================================
--- tools/src (revision 10)
+++ tools/src (nonexistent)
tools/src
Property changes :
Deleted: svn:ignore
## -1,32 +0,0 ##
-*.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: tools/dox/w11.Doxyfile
===================================================================
--- tools/dox/w11.Doxyfile (revision 10)
+++ tools/dox/w11.Doxyfile (nonexistent)
@@ -1,283 +0,0 @@
-# $Id: $
-# Revision History:
-# Date Rev Version Comment
-# 2011-01-09 354 1.0 Initial version
-#---------------------------------------------------------------------------
-#
-# Doxyfile 1.7.3
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-DOXYFILE_ENCODING = UTF-8
-PROJECT_NAME = w11
-PROJECT_NUMBER = 0.53
-PROJECT_BRIEF = "Backend server for Rlink and w11"
-PROJECT_LOGO =
-OUTPUT_DIRECTORY = $(HOME)/tmp/w11
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = $(RETROBASE)/tools/src
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-QT_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-INHERIT_DOCS = YES
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-OPTIMIZE_FOR_FORTRAN = NO
-OPTIMIZE_OUTPUT_VHDL = NO
-EXTENSION_MAPPING = ipp=C++
-BUILTIN_STL_SUPPORT = YES
-CPP_CLI_SUPPORT = NO
-SIP_SUPPORT = NO
-IDL_PROPERTY_SUPPORT = YES
-DISTRIBUTE_GROUP_DOC = NO
-SUBGROUPING = YES
-TYPEDEF_HIDES_STRUCT = NO
-SYMBOL_CACHE_SIZE = 0
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-EXTRACT_LOCAL_METHODS = NO
-EXTRACT_ANON_NSPACES = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-FORCE_LOCAL_INCLUDES = NO
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = NO
-SORT_BRIEF_DOCS = NO
-SORT_MEMBERS_CTORS_1ST = NO
-SORT_GROUP_NAMES = NO
-SORT_BY_SCOPE_NAME = NO
-STRICT_PROTO_MATCHING = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = NO
-SHOW_FILES = YES
-SHOW_NAMESPACES = YES
-FILE_VERSION_FILTER =
-LAYOUT_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = $(RETROBASE)/tools/src
-INPUT_ENCODING = UTF-8
-FILE_PATTERNS = *.cpp *.hpp *.ipp *.dox
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS = */.svn* */tests/*
-EXCLUDE_SYMBOLS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-FILTER_SOURCE_PATTERNS =
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-REFERENCES_LINK_SOURCE = YES
-USE_HTAGS = NO
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_COLORSTYLE_HUE = 220
-HTML_COLORSTYLE_SAT = 100
-HTML_COLORSTYLE_GAMMA = 80
-HTML_TIMESTAMP = YES
-HTML_ALIGN_MEMBERS = YES
-HTML_DYNAMIC_SECTIONS = NO
-GENERATE_DOCSET = NO
-DOCSET_FEEDNAME = "Doxygen generated docs"
-DOCSET_BUNDLE_ID = org.doxygen.Project
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-DOCSET_PUBLISHER_NAME = Publisher
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-CHM_INDEX_ENCODING =
-BINARY_TOC = NO
-TOC_EXPAND = NO
-GENERATE_QHP = NO
-QCH_FILE =
-QHP_NAMESPACE = org.doxygen.Project
-QHP_VIRTUAL_FOLDER = doc
-QHP_CUST_FILTER_NAME =
-QHP_CUST_FILTER_ATTRS =
-QHP_SECT_FILTER_ATTRS =
-QHG_LOCATION =
-GENERATE_ECLIPSEHELP = NO
-ECLIPSE_DOC_ID = org.doxygen.Project
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = YES
-USE_INLINE_TREES = YES
-TREEVIEW_WIDTH = 250
-EXT_LINKS_IN_WINDOW = NO
-FORMULA_FONTSIZE = 10
-FORMULA_TRANSPARENT = YES
-USE_MATHJAX = NO
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-SEARCHENGINE = YES
-SERVER_BASED_SEARCH = NO
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = YES
-USE_PDFLATEX = YES
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-LATEX_SOURCE_CODE = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-MSCGEN_PATH =
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = YES
-DOT_NUM_THREADS = 0
-DOT_FONTNAME = Helvetica
-DOT_FONTSIZE = 10
-DOT_FONTPATH =
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = NO
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-CALLER_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MSCFILE_DIRS =
-DOT_GRAPH_MAX_NODES = 50
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
Index: tools/dox
===================================================================
--- tools/dox (revision 10)
+++ tools/dox (nonexistent)
tools/dox
Property changes :
Deleted: svn:ignore
## -1,32 +0,0 ##
-*.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: tools/bin/ti_rri
===================================================================
--- tools/bin/ti_rri (revision 10)
+++ tools/bin/ti_rri (nonexistent)
@@ -1,204 +0,0 @@
-#! /usr/bin/env tclsh
-# -*- tcl -*-
-# $Id: ti_rri 375 2011-04-02 07:56:47Z mueller $
-#
-# Copyright 2011- 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.
-#
-# Revision History:
-# Date Rev Version Comment
-# 2011-04-02 376 1.0 Initial version
-# 2011-03-19 371 0.1 First draft
-#
-#
-# --fifo[=name,keep]
-# --term[=???] ; not yet implemented...
-# --run=command
-# --log=filename ; default "-"
-# --logl=n ; default 2
-# --dmpl=n ; default 0
-# --tiol=n ; default 0
-# --int
-# --help
-# --
-# tcl cmds
-# @...tcl
-#
-
-array set opts {
- fifo 0
- fifo_ ""
- term 0
- term_ ""
- run_ ""
- log_ "-"
- logl_ 2
- dmpl_ 0
- tiol_ 0
- int 0
- help 0
-}
-
-set clist {}
-set optsendseen 0
-
-foreach arg $argv {
- if { $optsendseen } {
- lappend clist $arg
- continue
- }
- switch -regexp -- $arg {
- ^--?fifo=?.*$ { set opts(fifo) 1; regexp -- {=(.*)} $arg dummy opts(fifo_) }
- ^--?term=?.*$ { set opts(term) 1; regexp -- {=(.*)} $arg dummy opts(term_) }
- ^--?run=.+$ { regexp -- {=(.*)} $arg dummy opts(run_) }
- ^--?log=.+$ { regexp -- {=(.*)} $arg dummy opts(log_) }
- ^--?logl=.+$ { regexp -- {=(.*)} $arg dummy opts(logl_) }
- ^--?dmpl=.+$ { regexp -- {=(.*)} $arg dummy opts(dmpl_) }
- ^--?tiol=.+$ { regexp -- {=(.*)} $arg dummy opts(tiol_) }
- ^--?int$ { set opts(int) 1 }
- ^--?help$ { set opts(help) 1 }
- ^--$ { set optsendseen 1 }
- ^--.+$ { puts "-E: bad option $arg, see --help for proper usage"
- return 1
- }
- default { lappend clist $arg }
- }
-}
-
-if { $opts(help) } {
- puts "usage: ti_rri"
- return 0
-}
-
-if { $opts(fifo) && $opts(term) } {
- puts "-E: both --fifo and --term given, only one allowed"
- return 1
-}
-
-lappend auto_path [file join $env(RETROBASE) tools tcl]
-lappend auto_path [file join $env(RETROBASE) tools lib]
-
-package require rlink
-package require rutiltpp
-package require rlinktpp
-
-rlinkconnect rlc
-
-# setup logging
-if { $opts(log_) ne "-" } {
- rlc config -logfile $opts(log_)
-}
-rlc config -logprintlevel $opts(logl_)
-rlc config -logdumplevel $opts(dmpl_)
-rlc config -logtracelevel $opts(tiol_)
-
-# first start, if specified with -run, the test bench
-set runpid {}
-if { $opts(run_) ne "" } {
- if { [catch {eval "exec $opts(run_) &" } runpid] } {
- puts "-E: failed to execute \"$opts(run_)\" with error message\n $runpid"
- puts "aborting..."
- return 1
- }
-}
-
-# than open the rlink connection
-# handle --fifo
-if { $opts(fifo) } {
- set nlist [split $opts(fifo_) ","]
- set path [lindex $nlist 0]
- set keep [lindex $nlist 1]
- if {$path eq ""} {set path "rlink_cext_fifo"}
- set url "fifo:$path"
- if {$keep ne ""} {append url "?keep"}
- rlc open $url
-}
-
-# handle --term
-if { $opts(term) } {
- set nlist [split $opts(term_) ","]
- set dev [lindex $nlist 0]
- set baud [lindex $nlist 1]
- set brk [lindex $nlist 2]
- if {$dev eq ""} {set dev "/dev/ttyS0"}
- if {$baud eq ""} {set baud "115k"}
- set url "term:$dev?baud=$baud"
- if {$brk ne ""} {append url ";break"}
- rlc open $url
-}
-
-# setup simulation mode default
-set rlink::sim_mode [rlink::isfifo]
-
-foreach cmd $clist {
- # handle @filename commands
- if { [regexp {^@(.+)} $cmd dummy filename] } {
- # handle @file.tcl --> source tcl file
- if { [regexp {\.tcl$} $filename] } {
- if { [catch {source $filename} errmsg] } {
- puts "-E: failed to source file \"$filename\" with error message:"
- if {[info exists errorInfo]} {puts $errorInfo} else {puts $errmsg}
- puts "aborting..."
- break
- }
- # handle @file.dat ect --> not yet supported
- } else {
- puts "-E: only tcl supported but $filename found"
- puts "aborting..."
- break
- }
-
- # handle normal tcl commands --> eval them
- } else {
- if { [catch {eval $cmd} errmsg] } {
- puts "-E: eval of \"$cmd\" failed with error message:"
- if {[info exists errorInfo]} {puts $errorInfo} else {puts $errmsg}
- puts "aborting..."
- break
- }
- }
-}
-
-# if tclsh runs a script given on the command line or is invoked
-# like here via a shebang the tcl_interactive is always set to 0
-# so we have to check whether stdin/stdout is a terminal and set
-# tcl_interactive accordingly
-
-# FIXME_code: fstat not available (grr...), currently just assume istty
-set tcl_interactive 1
-
-if { $opts(int) || [llength $clist] == 0 } {
- if {$tcl_interactive} {
- package require tclreadline
- namespace eval tclreadline {
- proc prompt1 {} {
- set version [info tclversion]
- return "ti_rri > "
- }
- }
- ::tclreadline::Loop
- }
-}
-
-#
-# now close rlink connection
-#
-if { $opts(fifo) || $opts(term) } {
- rlc close
-}
-
-# FIXME_code: should sync here with -run process run-down
-# but no wait available in tcl (grr...)
-if { $runpid } {
- after 100; # currently just wait 100ms
-}
-
-return 0
tools/bin/ti_rri
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: tools/bin/pi_rri
===================================================================
--- tools/bin/pi_rri (revision 10)
+++ tools/bin/pi_rri (revision 9)
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id: pi_rri 374 2011-03-27 17:02:47Z mueller $
+# $Id: pi_rri 351 2010-12-30 21:50:54Z mueller $
#
# Copyright 2007-2010 by Walter F.J. Mueller
#
@@ -6455,7 +6455,7 @@
my $newtios = new POSIX::Termios;
$newtios->getattr($fd) || die "getattr failed: $!"; ## hack for cygwin !!
- my $c_iflag = &POSIX::BRKINT; # ignore parity errors (??? WRONG??)
+ my $c_iflag = &POSIX::BRKINT; # ignore parity errors
my $c_oflag = 0;
my $c_cflag = &POSIX::CS8 | # 8 bit chars
&POSIX::CSTOPB | # 2 stop bits
@@ -6532,30 +6532,30 @@
printf "iflag = %8.8x:", $iflag;
print " BRKINT" if $iflag & &POSIX::BRKINT;
- print " ICRNL " if $iflag & &POSIX::ICRNL;
+ print " ICRNL " if $iflag & &POSIX::ICRNL;
print " IGNBRK" if $iflag & &POSIX::IGNBRK;
- print " IGNCR " if $iflag & &POSIX::IGNCR;
+ print " IGNCR " if $iflag & &POSIX::IGNCR;
print " IGNPAR" if $iflag & &POSIX::IGNPAR;
- print " INLCR " if $iflag & &POSIX::INLCR;
- print " INPCK " if $iflag & &POSIX::INPCK;
+ print " INLCR " if $iflag & &POSIX::INLCR;
+ print " INPCK " if $iflag & &POSIX::INPCK;
print " ISTRIP" if $iflag & &POSIX::ISTRIP;
- print " IXOFF " if $iflag & &POSIX::IXOFF;
- print " IXON " if $iflag & &POSIX::IXON;
+ print " IXOFF " if $iflag & &POSIX::IXOFF;
+ print " IXON " if $iflag & &POSIX::IXON;
print " PARMRK" if $iflag & &POSIX::PARMRK;
print "\n";
printf "oflag = %8.8x:", $oflag;
- print " OPOST " if $oflag & &POSIX::OPOST;
+ print " OPOST " if $oflag & &POSIX::OPOST;
print "\n";
printf "cflag = %8.8x:", $cflag;
print " CLOCAL" if $cflag & &POSIX::CLOCAL;
- print " CREAD " if $cflag & &POSIX::CREAD;
+ print " CREAD " if $cflag & &POSIX::CREAD;
print " CS5 " if ($cflag & &POSIX::CSIZE) == &POSIX::CS5;
print " CS6 " if ($cflag & &POSIX::CSIZE) == &POSIX::CS6;
print " CS7 " if ($cflag & &POSIX::CSIZE) == &POSIX::CS7;
print " CS8 " if ($cflag & &POSIX::CSIZE) == &POSIX::CS8;
print " CSTOPB" if $cflag & &POSIX::CSTOPB;
- print " HUPCL " if $cflag & &POSIX::HUPCL;
+ print " HUPCL " if $cflag & &POSIX::HUPCL;
print " PARENB" if $cflag & &POSIX::PARENB;
print " PARODD" if $cflag & &POSIX::PARODD;
@@ -6563,7 +6563,7 @@
&POSIX::B150 | &POSIX::B200 | &POSIX::B300 | &POSIX::B600 |
&POSIX::B1200 | &POSIX::B1800 | &POSIX::B2400 | &POSIX::B4800 |
&POSIX::B9600 | &POSIX::B19200 | &POSIX::B38400;
- print " B0 " if ($cflag & $sbits) == &POSIX::B0;
+ print " B0 " if ($cflag & $sbits) == &POSIX::B0;
print " B50 " if ($cflag & $sbits) == &POSIX::B50;
print " B75 " if ($cflag & $sbits) == &POSIX::B75;
print " B110 " if ($cflag & $sbits) == &POSIX::B110;
@@ -6582,13 +6582,13 @@
print "\n";
printf "lflag = %8.8x:", $lflag;
- print " ECHO " if $lflag & &POSIX::ECHO;
- print " ECHOE " if $lflag & &POSIX::ECHOE;
- print " ECHOK " if $lflag & &POSIX::ECHOK;
+ print " ECHO " if $lflag & &POSIX::ECHO;
+ print " ECHOE " if $lflag & &POSIX::ECHOE;
+ print " ECHOK " if $lflag & &POSIX::ECHOK;
print " ECHONL" if $lflag & &POSIX::ECHONL;
print " ICANON" if $lflag & &POSIX::ICANON;
print " IEXTEN" if $lflag & &POSIX::IEXTEN;
- print " ISIG " if $lflag & &POSIX::ISIG;
+ print " ISIG " if $lflag & &POSIX::ISIG;
print " NOFLSH" if $lflag & &POSIX::NOFLSH;
print " TOSTOP" if $lflag & &POSIX::TOSTOP;
print "\n";
/tools/bin/rm_dep
1,13 → 1,12
#!/bin/sh |
# $Id: rm_dep 354 2011-01-09 22:38:53Z mueller $ |
# $Id: rm_dep 284 2010-04-26 20:55:13Z mueller $ |
# |
# Revision History: |
# Date Rev Version Comment |
# 2011-01-09 354 1.1.1 add *.dep for cpp depends |
# 2010-04-26 284 1.1 add xargs -r to prevent rm errors on empty lists |
# 2010-04-24 282 1.0 Initial version |
# |
for ftype in dep dep_ghdl dep_isim dep_xst dep_ucf_cpp |
for ftype in dep_ghdl dep_isim dep_xst dep_ucf_cpp |
do |
echo "---------- remove *.$ftype ----------------------------------------" |
find -name "*.$ftype" | xargs --no-run-if-empty rm -v |
/rtl/sys_gen/tst_rlink/nexys2/.cvsignore
File deleted
/rtl/sys_gen/tst_rlink/nexys2/Makefile
File deleted
/rtl/sys_gen/tst_rlink/nexys2/sys_conf.vhd
File deleted
/rtl/sys_gen/tst_rlink/nexys2/tb/sys_conf_sim.vhd
File deleted
/rtl/sys_gen/tst_rlink/nexys2/tb/.cvsignore
File deleted
/rtl/sys_gen/tst_rlink/nexys2/tb/tb_tst_rlink_n2.vhd
File deleted
/rtl/sys_gen/tst_rlink/nexys2/tb/Makefile
File deleted
/rtl/sys_gen/tst_rlink/nexys2/tb/tbw.dat
File deleted
/rtl/sys_gen/tst_rlink/nexys2/tb/sys_tst_rlink_n2.ucf_cpp
File deleted
\ No newline at end of file
rtl/sys_gen/tst_rlink/nexys2/tb/sys_tst_rlink_n2.ucf_cpp
Property changes :
Deleted: svn:special
## -1 +0,0 ##
-*
\ No newline at end of property
Index: rtl/sys_gen/tst_rlink/nexys2/tb
===================================================================
--- rtl/sys_gen/tst_rlink/nexys2/tb (revision 10)
+++ rtl/sys_gen/tst_rlink/nexys2/tb (nonexistent)
rtl/sys_gen/tst_rlink/nexys2/tb
Property changes :
Deleted: svn:ignore
## -1,39 +0,0 ##
-*.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_n2
-tb_tst_rlink_n2_[sft]sim
-rlink_cext_fifo_rx
-rlink_cext_fifo_tx
-rlink_cext_conf
-sys_tst_rlink_n2.ucf
-*.dep_ucf_cpp
Index: rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vhd
===================================================================
--- rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vhd (revision 10)
+++ rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vhd (nonexistent)
@@ -1,181 +0,0 @@
--- $Id: sys_tst_rlink_n2.vhd 375 2011-04-02 07:56:47Z mueller $
---
--- Copyright 2010-2011 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: sys_tst_rlink_n2 - syn
--- Description: rlink tester design for nexys2
---
--- Dependencies: vlib/xlib/dcm_sp_sfs
--- vlib/genlib/clkdivce
--- bplib/s3board/s3_rs232_iob_int_ext
--- vlib/nexys2/n2_cram_dummy
---
--- Test bench: tb/tb_tst_rlink_n2
---
--- Target Devices: generic
--- Tool versions: xst 12.1; ghdl 0.29
---
--- Synthesized (xst):
--- Date Rev ise Target flop lutl lutm slic t peri
--- 2011-04-02 375 12.1 M53d xc3s1200e-4 688 1572 68 994 t 13.8
--- 2010-12-29 351 12.1 M53d xc3s1200e-4 604 1298 68 851 t 14.7
---
--- Revision History:
--- Date Rev Version Comment
--- 2010-12-29 351 1.0 Initial version
-------------------------------------------------------------------------------
---
-
-library ieee;
-use ieee.std_logic_1164.all;
-use ieee.std_logic_arith.all;
-
-use work.slvtypes.all;
-use work.xlib.all;
-use work.genlib.all;
-use work.s3boardlib.all;
-use work.nexys2lib.all;
-use work.sys_conf.all;
-
--- ----------------------------------------------------------------------------
-
-entity sys_tst_rlink_n2 is -- top level
- -- implements nexys2_fusp_aif
- port (
- I_CLK50 : in slbit; -- 50 MHz clock
- O_CLKSYS : out slbit; -- DCM derived system clock
- I_RXD : in slbit; -- receive data (board view)
- O_TXD : out slbit; -- transmit data (board view)
- I_SWI : in slv8; -- s3 switches
- I_BTN : in slv4; -- s3 buttons
- O_LED : out slv8; -- s3 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_FLA_CE_N : out slbit; -- flash ce.. (act.low)
- O_MEM_ADDR : out slv23; -- cram: address lines
- IO_MEM_DATA : inout slv16; -- cram: data lines
- O_FUSP_RTS_N : out slbit; -- fusp: rs232 rts_n
- I_FUSP_CTS_N : in slbit; -- fusp: rs232 cts_n
- I_FUSP_RXD : in slbit; -- fusp: rs232 rx
- O_FUSP_TXD : out slbit -- fusp: rs232 tx
- );
-end sys_tst_rlink_n2;
-
-architecture syn of sys_tst_rlink_n2 is
-
- signal CLK : slbit := '0';
-
- signal RXD : slbit := '1';
- signal TXD : slbit := '0';
- signal RTS_N : slbit := '0';
- signal CTS_N : slbit := '0';
-
- signal SWI : slv8 := (others=>'0');
- signal BTN : slv4 := (others=>'0');
-
- signal RESET : slbit := '0';
- signal CE_USEC : slbit := '0';
- signal CE_MSEC : slbit := '0';
-
-begin
-
- assert (sys_conf_clksys mod 1000000) = 0
- report "assert sys_conf_clksys on MHz grid"
- severity failure;
-
- DCM : dcm_sp_sfs
- generic map (
- CLKFX_DIVIDE => sys_conf_clkfx_divide,
- CLKFX_MULTIPLY => sys_conf_clkfx_multiply,
- CLKIN_PERIOD => 20.0)
- port map (
- CLKIN => I_CLK50,
- CLKFX => CLK,
- LOCKED => open
- );
-
- O_CLKSYS <= CLK;
-
- CLKDIV : clkdivce
- generic map (
- CDUWIDTH => 7,
- USECDIV => sys_conf_clksys_mhz,
- MSECDIV => 1000)
- port map (
- CLK => CLK,
- CE_USEC => CE_USEC,
- CE_MSEC => CE_MSEC
- );
-
- IOB_RS232 : s3_rs232_iob_int_ext
- port map (
- CLK => CLK,
- SEL => SWI(0),
- RXD => RXD,
- TXD => TXD,
- CTS_N => CTS_N,
- RTS_N => RTS_N,
- I_RXD0 => I_RXD,
- O_TXD0 => O_TXD,
- I_RXD1 => I_FUSP_RXD,
- O_TXD1 => O_FUSP_TXD,
- I_CTS1_N => I_FUSP_CTS_N,
- O_RTS1_N => O_FUSP_RTS_N
- );
-
- RLTEST : entity work.tst_rlink
- generic map (
- DEBOUNCE => sys_conf_hio_debounce,
- CDINIT => sys_conf_ser2rri_cdinit)
- port map (
- CLK => CLK,
- RESET => RESET,
- CE_USEC => CE_USEC,
- CE_MSEC => CE_MSEC,
- RXD => RXD,
- TXD => TXD,
- CTS_N => CTS_N,
- RTS_N => RTS_N,
- SWI => SWI,
- BTN => BTN,
- I_SWI => I_SWI,
- I_BTN => I_BTN,
- O_LED => O_LED,
- O_ANO_N => O_ANO_N,
- O_SEG_N => O_SEG_N
- );
-
- SRAM_PROT : n2_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_FLA_CE_N => O_FLA_CE_N,
- O_MEM_ADDR => O_MEM_ADDR,
- IO_MEM_DATA => IO_MEM_DATA
- );
-
-end syn;
Index: rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vbom
===================================================================
--- rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vbom (revision 10)
+++ rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vbom (nonexistent)
@@ -1,17 +0,0 @@
-# libs
-../../../vlib/slvtypes.vhd
-../../../vlib/xlib/xlib.vhd
-../../../vlib/genlib/genlib.vhd
-../../../bplib/s3board/s3boardlib.vbom
-../../../bplib/nexys2/nexys2lib.vhd
-sys_conf : sys_conf.vhd
-# components
-[xst,isim]../../../vlib/xlib/dcm_sp_sfs_unisim.vbom
-[ghdl]../../../vlib/xlib/dcm_sp_sfs_gsim.vbom
-../../../vlib/genlib/clkdivce.vbom
-../../../bplib/s3board/s3_rs232_iob_int_ext.vbom
-../tst_rlink.vbom
-../../../bplib/nexys2/n2_cram_dummy.vbom
-# design
-sys_tst_rlink_n2.vhd
-@ucf_cpp: sys_tst_rlink_n2.ucf
Index: rtl/sys_gen/tst_rlink/nexys2
===================================================================
--- rtl/sys_gen/tst_rlink/nexys2 (revision 10)
+++ rtl/sys_gen/tst_rlink/nexys2 (nonexistent)
rtl/sys_gen/tst_rlink/nexys2
Property changes :
Deleted: svn:ignore
## -1,35 +0,0 ##
-*.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_rlink_n2.ucf
-*.dep_ucf_cpp
Index: rtl/sys_gen/tst_rlink/tst_rlink.vhd
===================================================================
--- rtl/sys_gen/tst_rlink/tst_rlink.vhd (revision 10)
+++ rtl/sys_gen/tst_rlink/tst_rlink.vhd (nonexistent)
@@ -1,293 +0,0 @@
--- $Id: tst_rlink.vhd 375 2011-04-02 07:56:47Z mueller $
---
--- Copyright 2010- 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: tst_rlink - syn
--- Description: tester for rlink
---
--- Dependencies: rlink/rlink_base_serport
--- rbus/rbd_tester
--- rbus/rbd_bram
--- rbus/rbd_rbmon
--- rbus/rbd_eyemon
--- rbus/rbd_timer
--- s3board/s3_humanio_rbus
--- rbus/rb_sres_or_4
---
--- Test bench: nexys2/tb/tb_tst_rlink_n2
---
--- Target Devices: generic
--- Tool versions: xst 12.1; ghdl 0.29
---
--- Revision History:
--- Date Rev Version Comment
--- 2011-04-02 375 1.0.1 add rbd_eyemon and two timer
--- 2010-12-29 351 1.0 Initial version (inspired by sys_tst_rri)
-------------------------------------------------------------------------------
--- Usage of Nexys 2 Switches, Buttons, LEDs:
---
--- SWI(0): 0 -> main board RS232 port - implemented in sys_tst_rlink_*
--- 1 -> Pmod B/top RS232 port /
--- (1:7): no function (only connected to s3_humanio_rbus)
---
--- LED(0): timer 0 busy
--- LED(1): timer 1 busy
--- LED(2:7): no function (only connected to s3_humanio_rbus)
---
--- DSP: RL_SER_MONI.clkdiv (from auto bauder)
--- DP(0): RXSD (inverted to signal activity)
--- DP(1): RTS_N (shows rx back preasure)
--- DP(2): TXSD (inverted to signal activity)
--- DP(3): CTS_N (shows tx back preasure)
-
-library ieee;
-use ieee.std_logic_1164.all;
-use ieee.std_logic_arith.all;
-
-use work.slvtypes.all;
-use work.rblib.all;
-use work.rbdlib.all;
-use work.rlinklib.all;
-use work.s3boardlib.all;
-
--- ----------------------------------------------------------------------------
-
-entity tst_rlink is -- tester for rlink
- generic (
- DEBOUNCE : boolean := true;
- CDINIT : natural := 15);
- port (
- CLK : in slbit; -- clock
- RESET : in slbit; -- reset
- CE_USEC : in slbit; -- usec pulse
- CE_MSEC : in slbit; -- msec pulse
- RXD : in slbit; -- receive data (board view)
- TXD : out slbit; -- transmit data (board view)
- CTS_N : in slbit; -- rs232 cts_n
- RTS_N : out slbit; -- rs232 rts_n
- SWI : out slv8; -- switches (for top cntl)
- BTN : out slv4; -- buttons (for top cntl)
- I_SWI : in slv8; -- s3 switches
- I_BTN : in slv4; -- s3 buttons
- O_LED : out slv8; -- s3 leds
- O_ANO_N : out slv4; -- 7 segment disp: anodes (act.low)
- O_SEG_N : out slv8 -- 7 segment disp: segments (act.low)
- );
-end tst_rlink;
-
-architecture syn of tst_rlink is
-
- signal RTS_N_L : slbit := '0';
- signal DSP_DAT : slv16 := (others=>'0');
- signal DSP_DP : slv4 := (others=>'0');
-
- signal SWI_L : slv8 := (others=>'0');
- signal BTN_L : slv4 := (others=>'0');
- signal LED : slv8 := (others=>'0');
-
- signal RB_MREQ : rb_mreq_type := rb_mreq_init;
- signal RB_SRES : rb_sres_type := rb_sres_init;
- signal RB_SRES_TEST : rb_sres_type := rb_sres_init;
- signal RB_SRES_BRAM : rb_sres_type := rb_sres_init;
- signal RB_SRES_MON : rb_sres_type := rb_sres_init;
- signal RB_SRES_EMON : rb_sres_type := rb_sres_init;
- signal RB_SRES_TIM0 : rb_sres_type := rb_sres_init;
- signal RB_SRES_TIM1 : rb_sres_type := rb_sres_init;
- signal RB_SRES_HIO : rb_sres_type := rb_sres_init;
- signal RB_SRES_SUM1 : rb_sres_type := rb_sres_init;
-
- signal RB_LAM : slv16 := (others=>'0');
- signal RB_STAT : slv3 := (others=>'0');
-
- signal RB_LAM_TEST : slv16 := (others=>'0');
-
- signal TIM0_DONE : slbit := '0';
- signal TIM0_BUSY : slbit := '0';
- signal TIM1_DONE : slbit := '0';
- signal TIM1_BUSY : slbit := '0';
-
- signal RL_MONI : rl_moni_type := rl_moni_init;
- signal RL_SER_MONI : rl_ser_moni_type := rl_ser_moni_init;
-
- constant rbaddr_mon : slv8 := "11111100"; -- 111111xx
- constant rbaddr_emon : slv8 := "11111000"; -- 111110xx
- constant rbaddr_bram : slv8 := "11110100"; -- 111101xx
- constant rbaddr_test : slv8 := "11110000"; -- 111100xx
- constant rbaddr_tim1 : slv8 := "11100001"; -- 11100001
- constant rbaddr_tim0 : slv8 := "11100000"; -- 11100000
- constant rbaddr_hio : slv8 := "11000000"; -- 110000xx
-
-begin
-
- RLINK : rlink_base_serport
- generic map (
- ATOWIDTH => 6, -- 64 cycles access timeout
- ITOWIDTH => 6, -- 64 periods max idle timeout
- CPREF => c_rlink_cpref,
- IFAWIDTH => 5,
- OFAWIDTH => 0,
- ENAPIN_RLMON => sbcntl_sbf_rlmon,
- ENAPIN_RBMON => sbcntl_sbf_rbmon,
- RB_ADDR => conv_std_logic_vector(2#11111110#,8),
- CDWIDTH => 13,
- CDINIT => CDINIT)
- port map (
- CLK => CLK,
- CE_USEC => CE_USEC,
- CE_MSEC => CE_MSEC,
- CE_INT => CE_MSEC,
- RESET => RESET,
- RXSD => RXD,
- TXSD => TXD,
- CTS_N => CTS_N,
- RTS_N => RTS_N_L,
- RB_MREQ => RB_MREQ,
- RB_SRES => RB_SRES,
- RB_LAM => RB_LAM,
- RB_STAT => RB_STAT,
- RL_MONI => RL_MONI,
- RL_SER_MONI => RL_SER_MONI
- );
-
- RB_LAM(15 downto 2) <= RB_LAM_TEST(15 downto 2);
- RB_LAM(1) <= TIM1_DONE;
- RB_LAM(0) <= TIM0_DONE;
-
- TEST : rbd_tester
- generic map (
- RB_ADDR => rbaddr_test)
- port map (
- CLK => CLK,
- RESET => RESET,
- RB_MREQ => RB_MREQ,
- RB_SRES => RB_SRES_TEST,
- RB_LAM => RB_LAM_TEST,
- RB_STAT => RB_STAT
- );
-
- BRAM : rbd_bram
- generic map (
- RB_ADDR => rbaddr_bram)
- port map (
- CLK => CLK,
- RESET => RESET,
- RB_MREQ => RB_MREQ,
- RB_SRES => RB_SRES_BRAM
- );
-
- MON : rbd_rbmon
- generic map (
- RB_ADDR => rbaddr_mon,
- AWIDTH => 9)
- port map (
- CLK => CLK,
- RESET => RESET,
- RB_MREQ => RB_MREQ,
- RB_SRES => RB_SRES_MON,
- RB_SRES_SUM => RB_SRES
- );
-
- EMON : rbd_eyemon
- generic map (
- RB_ADDR => rbaddr_emon,
- RDIV => conv_std_logic_vector(0,8))
- port map (
- CLK => CLK,
- RESET => RESET,
- RB_MREQ => RB_MREQ,
- RB_SRES => RB_SRES_EMON,
- RXSD => RXD,
- RXACT => RL_SER_MONI.rxact
- );
-
- TIM0 : rbd_timer
- generic map (
- RB_ADDR => rbaddr_tim0)
- port map (
- CLK => CLK,
- CE_USEC => CE_USEC,
- RESET => RESET,
- RB_MREQ => RB_MREQ,
- RB_SRES => RB_SRES_TIM0,
- DONE => TIM0_DONE,
- BUSY => TIM0_BUSY
- );
-
- TIM1 : rbd_timer
- generic map (
- RB_ADDR => rbaddr_tim1)
- port map (
- CLK => CLK,
- CE_USEC => CE_USEC,
- RESET => RESET,
- RB_MREQ => RB_MREQ,
- RB_SRES => RB_SRES_TIM1,
- DONE => TIM1_DONE,
- BUSY => TIM1_BUSY
- );
-
- HIO : s3_humanio_rbus
- generic map (
- DEBOUNCE => DEBOUNCE,
- RB_ADDR => rbaddr_hio)
- port map (
- CLK => CLK,
- RESET => RESET,
- CE_MSEC => CE_MSEC,
- RB_MREQ => RB_MREQ,
- RB_SRES => RB_SRES_HIO,
- SWI => SWI_L,
- BTN => BTN_L,
- 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
- );
-
- RB_SRES_OR1 : rb_sres_or_4
- port map (
- RB_SRES_1 => RB_SRES_TEST,
- RB_SRES_2 => RB_SRES_BRAM,
- RB_SRES_3 => RB_SRES_MON,
- RB_SRES_4 => RB_SRES_HIO,
- RB_SRES_OR => RB_SRES_SUM1
- );
-
- RB_SRES_OR : rb_sres_or_4
- port map (
- RB_SRES_1 => RB_SRES_SUM1,
- RB_SRES_2 => RB_SRES_EMON,
- RB_SRES_3 => RB_SRES_TIM0,
- RB_SRES_4 => RB_SRES_TIM1,
- RB_SRES_OR => RB_SRES
- );
-
- DSP_DAT <= RL_SER_MONI.clkdiv;
- DSP_DP(0) <= RL_SER_MONI.rxact;
- DSP_DP(1) <= RTS_N_L;
- DSP_DP(2) <= RL_SER_MONI.txact;
- DSP_DP(3) <= CTS_N;
-
- LED(0) <= TIM0_BUSY;
- LED(1) <= TIM1_BUSY;
- LED(7) <= RL_SER_MONI.abact;
-
- RTS_N <= RTS_N_L;
- SWI <= SWI_L;
- BTN <= BTN_L;
-
-end syn;
Index: rtl/sys_gen/tst_rlink/tst_rlink.vbom
===================================================================
--- rtl/sys_gen/tst_rlink/tst_rlink.vbom (revision 10)
+++ rtl/sys_gen/tst_rlink/tst_rlink.vbom (nonexistent)
@@ -1,17 +0,0 @@
-# libs
-../../vlib/slvtypes.vhd
-../../vlib/rbus/rblib.vhd
-../../vlib/rbus/rbdlib.vhd
-../../vlib/rlink/rlinklib.vbom
-../../bplib/s3board/s3boardlib.vhd
-# components
-../../vlib/rlink/rlink_base_serport.vbom
-../../vlib/rbus/rbd_tester.vbom
-../../vlib/rbus/rbd_bram.vbom
-../../vlib/rbus/rbd_rbmon.vbom
-../../vlib/rbus/rbd_eyemon.vbom
-../../vlib/rbus/rbd_timer.vbom
-../../bplib/s3board/s3_humanio_rbus.vbom
-../../vlib/rbus/rb_sres_or_4.vbom
-# design
-tst_rlink.vhd
Index: rtl/sys_gen/tst_rlink
===================================================================
--- rtl/sys_gen/tst_rlink (revision 10)
+++ rtl/sys_gen/tst_rlink (nonexistent)
rtl/sys_gen/tst_rlink
Property changes :
Deleted: svn:ignore
## -1,32 +0,0 ##
-*.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: rtl/sys_gen/w11a/tb/.cvsignore
===================================================================
--- rtl/sys_gen/w11a/tb/.cvsignore (revision 10)
+++ rtl/sys_gen/w11a/tb/.cvsignore (revision 9)
@@ -1,6 +1,6 @@
-rlink_cext_fifo_rx
-rlink_cext_fifo_tx
-rlink_cext_conf
+tb_rriext_fifo_rx
+tb_rriext_fifo_tx
+tb_rriext_conf
to_ptp
to_lda
tmu_ofile
Index: rtl/sys_gen/w11a/tb
===================================================================
--- rtl/sys_gen/w11a/tb (revision 10)
+++ rtl/sys_gen/w11a/tb (revision 9)
rtl/sys_gen/w11a/tb
Property changes :
Modified: svn:ignore
## -30,9 +30,9 ##
*_svn.log
*_sum.log
*_[dsft]sim.log
-rlink_cext_fifo_rx
-rlink_cext_fifo_tx
-rlink_cext_conf
+tb_rriext_fifo_rx
+tb_rriext_fifo_tx
+tb_rriext_conf
to_ptp
to_lda
tmu_ofile
Index: rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vbom
===================================================================
--- rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vbom (revision 10)
+++ rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vbom (nonexistent)
@@ -1,7 +0,0 @@
-# libs
-../../../vlib/slvtypes.vhd
-../nexys2lib.vhd
-# components
-../n2_cram_dummy.vbom
-# design
-nexys2_fusp_dummy.vhd
Index: rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vhd
===================================================================
--- rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vhd (revision 10)
+++ rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vhd (nonexistent)
@@ -1,90 +0,0 @@
--- $Id: nexys2_fusp_dummy.vhd 338 2010-11-13 22:19:25Z mueller $
---
--- Copyright 2010- 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: nexys2_dummy - syn
--- Description: nexys2 minimal target (base; serport loopback)
---
--- Dependencies: -
--- To test: tb_nexys2
--- Target Devices: generic
--- Tool versions: xst 11.4, 12.1; ghdl 0.26-0.29
---
--- Revision History:
--- Date Rev Version Comment
--- 2010-11-13 338 1.0.2 add O_CLKSYS (for DCM derived system clock)
--- 2010-11-06 336 1.0.1 rename input pin CLK -> I_CLK50
--- 2010-05-28 295 1.0 Initial version (derived from s3board_fusp_dummy)
-------------------------------------------------------------------------------
-
-library ieee;
-use ieee.std_logic_1164.all;
-
-use work.slvtypes.all;
-use work.nexys2lib.all;
-
-entity nexys2_fusp_dummy is -- NEXYS 2 dummy (base+fusp; loopback)
- -- implements nexys2_fusp_aif
- port (
- I_CLK50 : in slbit; -- 50 MHz board clock
- O_CLKSYS : out slbit; -- DCM derived system clock
- I_RXD : in slbit; -- receive data (board view)
- O_TXD : out slbit; -- transmit data (board view)
- I_SWI : in slv8; -- s3 switches
- I_BTN : in slv4; -- s3 buttons
- O_LED : out slv8; -- s3 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_FLA_CE_N : out slbit; -- flash ce.. (act.low)
- O_MEM_ADDR : out slv23; -- cram: address lines
- IO_MEM_DATA : inout slv16; -- cram: data lines
- O_FUSP_RTS_N : out slbit; -- fusp: rs232 rts_n
- I_FUSP_CTS_N : in slbit; -- fusp: rs232 cts_n
- I_FUSP_RXD : in slbit; -- fusp: rs232 rx
- O_FUSP_TXD : out slbit -- fusp: rs232 tx
- );
-end nexys2_fusp_dummy;
-
-architecture syn of nexys2_fusp_dummy is
-
-begin
-
- O_CLKSYS <= I_CLK50; -- use 50 MHz clock
- O_TXD <= I_RXD; -- loop back
- O_FUSP_TXD <= I_FUSP_RXD;
- O_FUSP_RTS_N <= I_FUSP_CTS_N;
-
- CRAM : n2_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_FLA_CE_N => O_FLA_CE_N,
- O_MEM_ADDR => O_MEM_ADDR,
- IO_MEM_DATA => IO_MEM_DATA
- );
-
-end syn;
Index: rtl/bplib/s3board/tb/tbw.dat
===================================================================
--- rtl/bplib/s3board/tb/tbw.dat (revision 10)
+++ rtl/bplib/s3board/tb/tbw.dat (revision 9)
@@ -1,6 +1,6 @@
-# $Id: tbw.dat 353 2011-01-02 21:02:48Z mueller $
+# $Id: tbw.dat 290 2010-05-16 08:44:36Z mueller $
#
[tb_s3board_dummy]
-rlink_cext_fifo_rx =
-rlink_cext_fifo_tx =
-rlink_cext_conf =
+tb_rriext_fifo_rx =
+tb_rriext_fifo_tx =
+tb_rriext_conf =
Index: rtl/bplib/s3board/tb/.cvsignore
===================================================================
--- rtl/bplib/s3board/tb/.cvsignore (revision 10)
+++ rtl/bplib/s3board/tb/.cvsignore (revision 9)
@@ -3,9 +3,9 @@
tb_s3board_dummy_ISim
tb_s3board_dummy_ISim_[sft]sim
tb_s3board_fusp_dummy
-rlink_cext_fifo_rx
-rlink_cext_fifo_tx
-rlink_cext_conf
+tb_rriext_fifo_rx
+tb_rriext_fifo_tx
+tb_rriext_conf
tb_s3_sram_memctl
tb_s3_sram_memctl_[sft]sim
tb_s3_sram_memctl_stim
Index: rtl/bplib/s3board/tb
===================================================================
--- rtl/bplib/s3board/tb (revision 10)
+++ rtl/bplib/s3board/tb (revision 9)
rtl/bplib/s3board/tb
Property changes :
Modified: svn:ignore
## -35,9 +35,9 ##
tb_s3board_dummy_ISim
tb_s3board_dummy_ISim_[sft]sim
tb_s3board_fusp_dummy
-rlink_cext_fifo_rx
-rlink_cext_fifo_tx
-rlink_cext_conf
+tb_rriext_fifo_rx
+tb_rriext_fifo_tx
+tb_rriext_conf
tb_s3_sram_memctl
tb_s3_sram_memctl_[sft]sim
tb_s3_sram_memctl_stim
Index: rtl/vlib/rlink/tb/rlink_cext.c
===================================================================
--- rtl/vlib/rlink/tb/rlink_cext.c (revision 10)
+++ rtl/vlib/rlink/tb/rlink_cext.c (revision 9)
@@ -1,4 +1,4 @@
-/* $Id: rlink_cext.c 366 2011-03-05 14:55:15Z mueller $
+/* $Id: rlink_cext.c 351 2010-12-30 21:50:54Z mueller $
*
* Copyright 2007-2010 by Walter F.J. Mueller
*
@@ -13,7 +13,6 @@
*
* Revision History:
* Date Rev Vers Comment
- * 2011-03-05 366 1.3.1 add RLINK_CEXT_TRACE=2 trace level
* 2010-12-29 351 1.3 rename cext_rriext -> rlink_cext; rename functions
* cext_* -> rlink_cext_* and fifo file names
* tb_cext_* -> rlink_cext_*
@@ -79,12 +78,6 @@
char buf[1];
ssize_t nbyte;
nbyte = read(fd_rx, buf, 1);
- if (io_trace > 1) {
- printf("rlink_cext-I: read rc=%d", nbyte);
- if (nbyte < 0) printf(" errno=%d %s", errno, strerror(errno));
- printf("\n");
- }
-
if (nbyte < 0) {
qr_err = errno;
} else if (nbyte == 0) {
@@ -135,15 +128,8 @@
io_trace = 0;
env_val = getenv("RLINK_CEXT_TRACE");
- if (env_val) {
- printf("rlink_cext-I: seen RLINK_CEXT_TRACE=%s\n", env_val);
- if (strcmp(env_val, "1") == 0) {
- printf("rlink_cext-I: set trace level to 1\n");
- io_trace = 1;
- } else if (strcmp(env_val, "2") == 0) {
- printf("rlink_cext-I: set trace level to 2\n");
- io_trace = 2;
- }
+ if (env_val && strcmp(env_val, "1") == 0) {
+ io_trace = 1;
}
}
@@ -222,11 +208,6 @@
buf[0] = (unsigned char) dat;
nbyte = write(fd_tx, buf, 1);
- if (io_trace > 1) {
- printf("rlink_cext-I: write rc=%d", nbyte);
- if (nbyte < 0) printf(" errno=%d %s", errno, strerror(errno));
- printf("\n");
- }
if (nbyte < 0) {
perror("rlink_cext-E: write error on rlink_cext_fifo_tx");
/rtl/vlib/rbus/rbd_bram.vbom
File deleted
/rtl/vlib/rbus/rb_sres_or_4.vhd
File deleted
/rtl/vlib/rbus/rbd_eyemon.vhd
File deleted
/rtl/vlib/rbus/rbd_rbmon.vbom
File deleted
/rtl/vlib/rbus/rb_sres_or_4.vbom
File deleted
/rtl/vlib/rbus/rbd_timer.vbom
File deleted
/rtl/vlib/rbus/rbd_bram.vhd
File deleted
/rtl/vlib/rbus/rbd_rbmon.vhd
File deleted
/rtl/vlib/rbus/rbd_eyemon.vbom
File deleted
/rtl/vlib/rbus/rbd_timer.vhd
File deleted
/rtl/vlib/rbus/rbd_tester.vhd
1,4 → 1,4
-- $Id: rbd_tester.vhd 369 2011-03-13 22:39:26Z mueller $ |
-- $Id: rbd_tester.vhd 352 2011-01-02 13:01:37Z mueller $ |
-- |
-- Copyright 2010- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
-- |
42,6 → 42,7
-- 15 nofifo r/w/- a 1 disables fifo, to test delayed aborts |
-- 14:12 stat r/w/- echo'ed on RB_STAT |
-- 11:00 nbusy r/w/- busy cycles (for data and fifo access) |
-- 00 go r/w/- enables monitor |
-- bbbbbb01 15:00 data r/w/- Data register (just w/r reg, no function) |
-- bbbbbb10 15:00 fifo r/w/- Fifo interface register |
-- bbbbbb11 attn r/w/- Attn/Length register |
/rtl/vlib/memlib/ram_1swsr_wfirst_gen.vbom
File deleted
/rtl/vlib/memlib/ram_1swsr_wfirst_gen_unisim.vbom
File deleted
/rtl/vlib/memlib/ram_1swsr_xfirst_gen_unisim.vbom
File deleted
/rtl/vlib/memlib/ram_2swsr_wfirst_gen.vbom
File deleted
/rtl/vlib/memlib/ram_2swsr_wfirst_gen_unisim.vbom
File deleted
/rtl/vlib/memlib/ram_1swsr_wfirst_gen_unisim.vhd
File deleted
/rtl/vlib/memlib/ram_1swsr_wfirst_gen.vhd
File deleted
/rtl/vlib/memlib/ram_1swsr_xfirst_gen_unisim.vhd
File deleted
/rtl/vlib/memlib/ram_2swsr_wfirst_gen_unisim.vhd
File deleted
/rtl/vlib/memlib/ram_2swsr_wfirst_gen.vhd
File deleted
/doc/README.txt
1,4 → 1,4
# $Id: README.txt 353 2011-01-02 21:02:48Z mueller $ |
# $Id: README.txt 351 2010-12-30 21:50:54Z mueller $ |
|
Release notes for w11a |
|