OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [bin/] [ti_rri] - Diff between revs 12 and 15

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 12 Rev 15
Line 1... Line 1...
#! /usr/bin/env tclsh
#! /usr/bin/env tclsh
# -*- tcl -*-
# -*- tcl -*-
# $Id: ti_rri 386 2011-07-01 17:31:03Z mueller $
# $Id: ti_rri 435 2011-12-04 20:15:25Z mueller $
#
#
# Copyright 2011- by Walter F.J. Mueller 
# Copyright 2011- by Walter F.J. Mueller 
#
#
# This program is free software; you may redistribute and/or modify it under
# 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
# the terms of the GNU General Public License as published by the Free
Line 13... Line 13...
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for complete details.
# for complete details.
#
#
#  Revision History:
#  Revision History:
# Date         Rev Version  Comment
# Date         Rev Version  Comment
 
# 2011-12-04   435   1.0.2  add flow attribute to --term
# 2011-04-22   379   1.0.1  check for RETROBASE; proper exit handling; help text
# 2011-04-22   379   1.0.1  check for RETROBASE; proper exit handling; help text
# 2011-04-17   376   1.0    Initial version
# 2011-04-17   376   1.0    Initial version
# 2011-03-19   371   0.1    First draft
# 2011-03-19   371   0.1    First draft
#
#
#
#
# --fifo[=name,keep]
# --fifo[=name,keep]
# --term[=name,baud,break]
# --term[=name,baud,break,flow]
# --run=command
# --run=command
# --log=filename      ; default "-"
# --log=filename      ; default "-"
# --logl=n            ; default 2
# --logl=n            ; default 2
# --dmpl=n            ; default 0
# --dmpl=n            ; default 0
# --tiol=n            ; default 0
# --tiol=n            ; default 0
Line 107... Line 108...
  puts {  --fifo[=ARGS]  open fifo type rlink port. Optional arguments are:}
  puts {  --fifo[=ARGS]  open fifo type rlink port. Optional arguments are:}
  puts {                   --fifo=[NAME[,KEEP]]}
  puts {                   --fifo=[NAME[,KEEP]]}
  puts {                     NAME  fifo name prefix, default 'rlink_cext_fifo'}
  puts {                     NAME  fifo name prefix, default 'rlink_cext_fifo'}
  puts {                     KEEP  if non-empty the fifo is kept open on exit}
  puts {                     KEEP  if non-empty the fifo is kept open on exit}
  puts {  --term[=ARGS]  open term type rlink port. Optional arguments are:}
  puts {  --term[=ARGS]  open term type rlink port. Optional arguments are:}
  puts {                   --term=[NAME,[BAUD,[BREAK]]]}
  puts {                   --term=[NAME[,BAUD[,BREAK[,FLOW]]]]}
  puts {                     NAME  tty device name, default 'USB0'}
  puts {                     NAME  tty device name, default 'USB0'}
  puts {                           if not starting with '/' the name is}
  puts {                           if not starting with '/' the name is}
  puts {                           prefixed with '/dev/tty'}
  puts {                           prefixed with '/dev/tty'}
  puts {                     BAUD  serial port baud rate, default '115k'}
  puts {                     BAUD  serial port baud rate, default '115k'}
  puts {                           allowed baud rate settings are:}
  puts {                           allowed baud rate settings are:}
  puts {                             9600, 19200, 19k, 38400, 38k, 57600, 57k}
  puts {                             9600, 19200, 19k, 38400, 38k, 57600, 57k}
  puts {                             115200, 115k, 230400, 230k, 460800, 460k}
  puts {                             115200, 115k, 230400, 230k, 460800, 460k}
  puts {                             500000, 500k, 921600, 921k, 1000000, 1M}
  puts {                             500000, 500k, 921600, 921k, 1000000, 1M}
  puts {                             2000000, 2M, 3000000, 3M}
  puts {                             2000000, 2M, 3000000, 3M}
 
  puts {                     BREAK controls whether a break will be send:}
 
  puts {                             0 no break (default)}
 
  puts {                             1 send break, do autobaud}
 
  puts {                     FLOW  controls flow control regime:}
 
  puts {                             0 no flow control (default)}
 
  puts {                             1 cts/rts hardware flow control}
  puts {  --log=FILE     set log file name. Default is to write to stdout.}
  puts {  --log=FILE     set log file name. Default is to write to stdout.}
  puts {  --logl=LVL     set log level, default is '2' allowed values:}
  puts {  --logl=LVL     set log level, default is '2' allowed values:}
  puts {                   0 no logging}
  puts {                   0 no logging}
  puts {                   1 log rlink commands with communication errors}
  puts {                   1 log rlink commands with communication errors}
  puts {                   2 log rlink commands with failed checks}
  puts {                   2 log rlink commands with failed checks}
Line 195... Line 202...
if { $opts(term) } {
if { $opts(term) } {
  set nlist [split $opts(term_) ","]
  set nlist [split $opts(term_) ","]
  set dev  [lindex $nlist 0]
  set dev  [lindex $nlist 0]
  set baud [lindex $nlist 1]
  set baud [lindex $nlist 1]
  set brk  [lindex $nlist 2]
  set brk  [lindex $nlist 2]
 
  set flow [lindex $nlist 3]
  if {$dev  eq ""} {set dev  "USB0"}
  if {$dev  eq ""} {set dev  "USB0"}
  if {$baud eq ""} {set baud "115k"}
  if {$baud eq ""} {set baud "115k"}
 
  if {$brk  eq ""} {set brk  0}
 
  if {$flow eq ""} {set flow 0}
  if {! [regexp -- {^/} $dev]} {
  if {! [regexp -- {^/} $dev]} {
    set dev "/dev/tty$dev"
    set dev "/dev/tty$dev"
  }
  }
  set url "term:$dev?baud=$baud"
  set url "term:$dev?baud=$baud"
  if {$brk ne ""} {append url ";break"}
  if {$brk  eq 1} {append url ";break"}
 
  if {$flow eq 1} {append url ";cts"}
 
  # puts "-I: $url"
  rlc open $url
  rlc open $url
}
}
 
 
# setup simulation mode default
# setup simulation mode default
set rlink::sim_mode [rlink::isfifo]
set rlink::sim_mode [rlink::isfifo]

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.