URL
https://opencores.org/ocsvn/w11/w11/trunk
Subversion Repositories w11
Compare Revisions
- This comparison shows the changes necessary to convert path
/w11/tags/w11a_V0.7/tools/tcl/tst_rlink
- from Rev 28 to Rev 33
- ↔ Reverse comparison
Rev 28 → Rev 33
/test_all.tcl
0,0 → 1,58
# $Id: test_all.tcl 618 2014-12-21 23:05:48Z mueller $ |
# |
# Copyright 2011-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# |
# This program is free software; you may redistribute and/or modify it under |
# the terms of the GNU General Public License as published by the Free |
# Software Foundation, either version 2, or at your option any later version. |
# |
# This program is distributed in the hope that it will be useful, but |
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY |
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
# for complete details. |
# |
# Revision History: |
# Date Rev Version Comment |
# 2014-11-09 603 2.0 use rlink v4 address layout and iface |
# 2013-01-04 469 1.0.2 move rbemon tests from test_all to test_all_emon |
# 2011-04-17 376 1.0.1 add rbemon::test_rbtest_sim (if in sum mode) |
# 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 0xf 0xfffc] |
incr errcnt [rbmoni::test_regs] |
incr errcnt [rbmoni::test_rbtest] |
|
puts "tst_rlink::test_all errcnt = $errcnt --> [rutil::errcnt2txt $errcnt]" |
|
return $errcnt |
} |
# |
# Driver for emon based tst_rlink tests |
# |
proc test_all_emon {} { |
# |
set errcnt 0 |
incr errcnt [rbemon::test_regs] |
if {[rlink::issim]} { |
incr errcnt [rbemon::test_rbtest_sim] |
} |
|
puts "tst_rlink::test_all_emon errcnt = $errcnt --> [rutil::errcnt2txt $errcnt]" |
|
return $errcnt |
} |
} |
/perf.tcl
0,0 → 1,57
# $Id: perf.tcl 622 2014-12-28 20:45:26Z mueller $ |
# |
# Copyright 2011-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# |
# This program is free software; you may redistribute and/or modify it under |
# the terms of the GNU General Public License as published by the Free |
# Software Foundation, either version 2, or at your option any later version. |
# |
# This program is distributed in the hope that it will be useful, but |
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY |
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
# for complete details. |
# |
# Revision History: |
# Date Rev Version Comment |
# 2014-11-23 606 2.0 use new rlink v4 iface |
# 2011-04-17 376 1.0 Initial version |
# |
|
package provide tst_rlink 1.0 |
|
namespace eval tst_rlink { |
# |
# perf_wtlam: determine wtlam latency using timer.0 |
# |
proc perf_wtlam {{tmax 1000}} { |
if {$tmax < 1} { error "-E: perf_wtlam: tmax argument must be >= 1" } |
|
set rval "delay latency" |
|
rlink::anena 1; # enable attn notify |
|
for {set dly 250} {$dly <= 10000} {incr dly 250} { |
rlc exec \ |
-wreg timer.0 0 \ |
-wreg timer.1 0 |
rlc exec -attn |
|
set tbeg [clock milliseconds] |
rlc exec -wreg timer.0 $dly |
for {set i 1} {1} {incr i} { |
rlc wtlam 1. |
rlc exec \ |
-attn \ |
-wreg timer.0 $dly |
set trun [expr {[clock milliseconds] - $tbeg}] |
if {$trun > $tmax} { break } |
} |
set ms [expr {double($trun) / double($i)}] |
append rval [format "\n%5d %6.2f" $dly $ms] |
} |
|
rlink::anena 0; # disable attn notify |
|
return $rval |
} |
} |
/util.tcl
0,0 → 1,88
# $Id: util.tcl 603 2014-11-09 22:50:26Z mueller $ |
# |
# Copyright 2011-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de> |
# |
# This program is free software; you may redistribute and/or modify it under |
# the terms of the GNU General Public License as published by the Free |
# Software Foundation, either version 2, or at your option any later version. |
# |
# This program is distributed in the hope that it will be useful, but |
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY |
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
# for complete details. |
# |
# Revision History: |
# Date Rev Version Comment |
# 2014-11-09 603 2.0 use rlink v4 address layout |
# 2011-04-17 376 1.0.1 add proc scan_baud |
# 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 |
rlink::setup; |
rbtest::setup 0xffe0; |
rbmoni::setup 0xffe8; |
rbemon::setup 0xffd0; |
rbbram::setup 0xfe00; |
rlc amap -insert timer.1 0xfe11; |
rlc amap -insert timer.0 0xfe10; |
rbs3hio::setup 0xfef0; |
} |
|
# |
# init: reset tst_rlink design to initial state |
# |
proc init {} { |
rlink::init; # reset rlink |
rbtest::init; |
rbmoni::init; |
rbbram::init; |
rbemon::init; |
rbs3hio::init; |
rlink::init; # re-reset rlink |
} |
|
# |
# scan_baud: scan through baud rates, show uart clkdiv value |
# |
proc scan_baud {{bmax 500000}} { |
if {! [rlink::isopen]} {error "-E: rlink port not open"} |
set rlpath [rlc open] |
regexp -- {^term:(.*)\?} $rlpath dummy rldev |
if {$rldev eq ""} {error "-E: rlink not connected to a term: device"} |
|
set rval " baud hi.dsp clkdiv sysclk" |
set blist {9600 19200 38400 57600 115200 230400 460800 |
500000 921600 1000000 2000000 3000000} |
|
foreach baud $blist { |
if {$baud > $bmax} { break } |
rlc close |
rlc open "term:$rldev?baud=${baud};break" |
rlc exec -rreg hi.dsp hidsp |
set mhz [expr {double($baud*$hidsp) / 1.e6}] |
append rval [format "\n%7d 0x%4.4x %6d %6.2f" \ |
$baud $hidsp [expr {$hidsp + 1}] $mhz] |
} |
|
rlc close |
if {! [regexp -- {;break} $rlpath]} {append rlpath ";break"} |
rlc open "${rlpath}" |
return $rval |
} |
} |
/.cvsignore
0,0 → 1,88
pkgIndex.tcl |
.
Property changes :
Added: svn:ignore
## -0,0 +1,34 ##
+*.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
+*_tsi.log
+*_pad.log
+*_bgn.log
+*_svn.log
+*_sum.log
+*_[dsft]sim.log
+pkgIndex.tcl