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

Subversion Repositories w11

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 21 wfjm
# $Id: cpucons.tcl 512 2013-04-28 07:44:02Z mueller $
2 20 wfjm
#
3
# Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
#
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
# 2013-04-26   510   1.0    Initial version
17
#
18
 
19
package provide rw11 1.0
20
 
21
package require rlink
22
package require rwxxtpp
23
 
24
namespace eval rw11 {
25
 
26
  #
27
  # cpumon: special command environment while cpu is running
28
  # 
29
 
30
  variable cpucons_done 0
31
 
32
  #
33
  # cpucons: setup special console shortcut commands
34
  # 
35
  proc cpucons {} {
36
    variable cpucons_done
37
 
38
    # quit if cpucons already done
39
    if {$cpucons_done} {
40
      return ""
41
    }
42
 
43
    namespace eval :: {
44
 
45
      #
46
      # '.' show current PC and PS
47
      # 
48
      proc "." {} {
49
        return [cpu0 show -pcps]
50
      }
51
 
52
      #
53 21 wfjm
      # '?' show current PC and PS and R0-R6
54 20 wfjm
      # 
55
      proc "?" {} {
56 21 wfjm
        return [cpu0 show -r0ps]
57 20 wfjm
      }
58
 
59
      #
60
      # '(' type some chars (no cr at end)
61
      # 
62
      proc "(" {args} {
63
        set str [join $args " "]
64
        cpu0tta0 type $str
65
        return ""
66
      }
67
 
68
      #
69
      # '<' type some chars (with cr at end)
70
      # 
71
      proc "<" {args} {
72
        set str [join $args " "]
73
        append str "\n"
74
        cpu0tta0 type $str
75
        return ""
76
      }
77
 
78
    }
79
 
80
      set cpucons_done 1
81
      return ""
82
  }
83
 
84
}

powered by: WebSVN 2.1.0

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