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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [tcl/] [rw11/] [cpucons.tcl] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 wfjm
# $Id: cpucons.tcl 626 2015-01-03 14:41:37Z mueller $
2 20 wfjm
#
3 28 wfjm
# Copyright 2013-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 20 wfjm
#
5
# This program is free software; you may redistribute and/or modify it under
6
# the terms of the GNU General Public License as published by the Free
7
# Software Foundation, either version 2, or at your option any later version.
8
#
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
# for complete details.
13
#
14
#  Revision History:
15
# Date         Rev Version  Comment
16 28 wfjm
# 2015-01-02   626   1.0.1  BUGFIX: proc "<": use \r to signal <ENTER>
17 20 wfjm
# 2013-04-26   510   1.0    Initial version
18
#
19
 
20
package provide rw11 1.0
21
 
22
package require rlink
23
package require rwxxtpp
24
 
25
namespace eval rw11 {
26
 
27
  #
28
  # cpumon: special command environment while cpu is running
29
  # 
30
 
31
  variable cpucons_done 0
32
 
33
  #
34
  # cpucons: setup special console shortcut commands
35
  # 
36
  proc cpucons {} {
37
    variable cpucons_done
38
 
39
    # quit if cpucons already done
40
    if {$cpucons_done} {
41
      return ""
42
    }
43
 
44
    namespace eval :: {
45
 
46
      #
47
      # '.' show current PC and PS
48
      # 
49
      proc "." {} {
50
        return [cpu0 show -pcps]
51
      }
52
 
53
      #
54 21 wfjm
      # '?' show current PC and PS and R0-R6
55 20 wfjm
      # 
56
      proc "?" {} {
57 21 wfjm
        return [cpu0 show -r0ps]
58 20 wfjm
      }
59
 
60
      #
61
      # '(' type some chars (no cr at end)
62
      # 
63
      proc "(" {args} {
64
        set str [join $args " "]
65
        cpu0tta0 type $str
66
        return ""
67
      }
68
 
69
      #
70
      # '<' type some chars (with cr at end)
71
      # 
72
      proc "<" {args} {
73
        set str [join $args " "]
74 28 wfjm
        append str "\r"
75 20 wfjm
        cpu0tta0 type $str
76
        return ""
77
      }
78
 
79
    }
80
 
81
      set cpucons_done 1
82
      return ""
83
  }
84
 
85
}

powered by: WebSVN 2.1.0

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