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

Subversion Repositories layer2

[/] [layer2/] [trunk/] [vhdl/] [intercon/] [bench/] [icon.do] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 idiolatrie
# == Synopsis
2
#        Modelsim simulation configuration file.
3
#
4
# == Usage
5
#        Loads automatically with 'icon.bat'.
6
#
7
# == Autor
8
#   Mathias Hörtnagl 
9
#
10
# == Copyright
11
#   Copyright (C) 2011  Mathias Hörtnagl
12
#
13
#   This program is free software: you can redistribute it and/or modify
14
#   it under the terms of the GNU General Public License as published by
15
#   the Free Software Foundation, either version 3 of the License, or
16
#   (at your option) any later version.
17
#
18
#   This program is distributed in the hope that it will be useful,
19
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
20
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
#   GNU General Public License for more details.
22
#
23
#   You should have received a copy of the GNU General Public License
24
#   along with this program.  If not, see .
25
 
26
# reference: http://wiki.tcl.tk/15598
27
proc binfmt1 {k {cnt 8}} {
28
    if {![string is integer $k]} {error "argument is not an integer"}
29
    #Compute minimum number of bits necessary
30
    #This is the integer ceiling of the log of the number to the base 2.
31
    if {$k == 0} {set bits 1} else {set bits [expr int(ceil((log(abs($k)))/(log(2))))]}
32
    if {$bits > $cnt} {set cnt $bits}
33
    #Now compute binary representation
34
    for {set i [expr $cnt -1]} {$i > -1} {incr i -1} {
35
        append s [expr ($k >> $i) & 1]
36
    }
37
    return $s
38
 }
39
 
40
 
41
proc vga {} {
42
   variable line ""
43
   variable elem ""
44
   variable char ""
45
 
46
   for {set y 0} {$y < 37} {incr y} {
47
      for {set x 0} {$x < 100} {incr x} {
48
         set char " "
49
         set elem [string range [binfmt1 [examine -radix unsigned -value /tb_icon/disp/video_ram/mem([expr $y*100+$x])] 16] 8 15]
50
         switch $elem {
51
                                00100000 {set char "."}
52
                                00100001 {set char "!"}
53
                                00100010 {set char "\""}
54
                                00100011 {set char "#"}
55
                                00100100 {set char "\$"}
56
                                00100101 {set char "%"}
57
                                00100110 {set char "&"}
58
                                00100111 {set char "'"}
59
                                00101000 {set char "("}
60
                                00101001 {set char ")"}
61
                                00101010 {set char "*"}
62
                                00101011 {set char "+"}
63
                                00101100 {set char ","}
64
                                00101101 {set char "-"}
65
                                00101110 {set char "."}
66
                                00101111 {set char "/"}
67
                                00110000 {set char "0"}
68
                                00110001 {set char "1"}
69
                                00110010 {set char "2"}
70
                                00110011 {set char "3"}
71
                                00110100 {set char "4"}
72
                                00110101 {set char "5"}
73
                                00110110 {set char "6"}
74
                                00110111 {set char "7"}
75
                                00111000 {set char "8"}
76
                                00111001 {set char "9"}
77
                                00111010 {set char ":"}
78
                                00111011 {set char ";"}
79
                                00111100 {set char "<"}
80
                                00111101 {set char "="}
81
                                00111110 {set char ">"}
82
                                00111111 {set char "?"}
83
                                01000000 {set char "@"}
84
                                01000001 {set char "A"}
85
                                01000010 {set char "B"}
86
                                01000011 {set char "C"}
87
                                01000100 {set char "D"}
88
                                01000101 {set char "E"}
89
                                01000110 {set char "F"}
90
                                01000111 {set char "G"}
91
                                01001000 {set char "H"}
92
                                01001001 {set char "I"}
93
                                01001010 {set char "J"}
94
                                01001011 {set char "K"}
95
                                01001100 {set char "L"}
96
                                01001101 {set char "M"}
97
                                01001110 {set char "N"}
98
                                01001111 {set char "O"}
99
                                01010000 {set char "P"}
100
                                01010001 {set char "Q"}
101
                                01010010 {set char "R"}
102
                                01010011 {set char "S"}
103
                                01010100 {set char "T"}
104
                                01010101 {set char "U"}
105
                                01010110 {set char "V"}
106
                                01010111 {set char "W"}
107
                                01011000 {set char "X"}
108
                                01011001 {set char "Y"}
109
                                01011010 {set char "Z"}
110
                                01011011 {set char "\["}
111
                                01011100 {set char "\\"}
112
                                01011101 {set char "\]"}
113
                                01011110 {set char "^"}
114
                                01011111 {set char "_"}
115
                                01100000 {set char "`"}
116
                                01100001 {set char "a"}
117
                                01100010 {set char "b"}
118
                                01100011 {set char "c"}
119
                                01100100 {set char "d"}
120
                                01100101 {set char "e"}
121
                                01100110 {set char "f"}
122
                                01100111 {set char "g"}
123
                                01101000 {set char "h"}
124
                                01101001 {set char "i"}
125
                                01101010 {set char "j"}
126
                                01101011 {set char "k"}
127
                                01101100 {set char "l"}
128
                                01101101 {set char "m"}
129
                                01101110 {set char "n"}
130
                                01101111 {set char "o"}
131
                                01110000 {set char "p"}
132
                                01110001 {set char "q"}
133
                                01110010 {set char "r"}
134
                                01110011 {set char "s"}
135
                                01110100 {set char "t"}
136
                                01110101 {set char "u"}
137
                                01110110 {set char "v"}
138
                                01110111 {set char "w"}
139
                                01111000 {set char "x"}
140
                                01111001 {set char "y"}
141
                                01111010 {set char "z"}
142
                                01111011 {set char "{"}
143
                                01111100 {set char "|"}
144
                                01111101 {set char "}"}
145
                                01111110 {set char "~"}
146
                                01111111 {set char ""}
147
            default  {set char "."}
148
         }
149
         set line [concat $line$char]
150
      }
151
      echo $line
152
      set line ""
153
   }
154
}
155
 
156
delete wave *
157
 
158
add wave -noupdate -color Gold -label CI -childformat {{/tb_icon/ci.ins -radix hexadecimal} {/tb_icon/ci.dat -radix hexadecimal}} -expand -subitemconfig {/tb_icon/ci.clk {-color #ffffd7d70000 -height 15} /tb_icon/ci.rst {-color #ffffd7d70000 -height 15} /tb_icon/ci.hld {-color #ffffd7d70000 -height 15} /tb_icon/ci.irq {-color #ffffd7d70000 -height 15} /tb_icon/ci.ins {-color #ffffd7d70000 -height 15 -radix hexadecimal} /tb_icon/ci.dat {-color #ffffd7d70000 -height 15 -radix hexadecimal}} /tb_icon/ci
159
add wave -noupdate -color Khaki -label CO -radix hexadecimal -childformat {{/tb_icon/co.iadr -radix hexadecimal} {/tb_icon/co.dadr -radix hexadecimal} {/tb_icon/co.dat -radix hexadecimal} {/tb_icon/co.cp0op -radix hexadecimal} {/tb_icon/co.cp0reg -radix hexadecimal} {/tb_icon/co.a -radix hexadecimal} {/tb_icon/co.b -radix hexadecimal}} -subitemconfig {/tb_icon/co.iadr {-color #f0f0e6e68c8c -height 15 -radix hexadecimal} /tb_icon/co.dadr {-color #f0f0e6e68c8c -height 15 -radix hexadecimal} /tb_icon/co.we {-color #f0f0e6e68c8c -height 15} /tb_icon/co.sel {-color #f0f0e6e68c8c -height 15} /tb_icon/co.dat {-color #f0f0e6e68c8c -height 15 -radix hexadecimal} /tb_icon/co.op {-color #f0f0e6e68c8c -height 15} /tb_icon/co.alu {-color #f0f0e6e68c8c -height 15} /tb_icon/co.rimm {-color #f0f0e6e68c8c -height 15} /tb_icon/co.cp0op {-color #f0f0e6e68c8c -height 15 -radix hexadecimal} /tb_icon/co.cp0reg {-color #f0f0e6e68c8c -height 15 -radix hexadecimal} /tb_icon/co.a {-color #f0f0e6e68c8c -height 15 -radix hexadecimal} /tb_icon/co.b {-color #f0f0e6e68c8c -height 15 -radix hexadecimal}} /tb_icon/co
160
add wave -noupdate -divider -height 30 
161
add wave -noupdate -radix hexadecimal /tb_icon/cpu0/fe/v
162
add wave -noupdate -radix hexadecimal -childformat {{/tb_icon/cpu0/de/v.ec -radix hexadecimal} {/tb_icon/cpu0/de/v.mc -radix hexadecimal} {/tb_icon/cpu0/de/v.wc -radix hexadecimal} {/tb_icon/cpu0/de/v.i -radix hexadecimal}} -subitemconfig {/tb_icon/cpu0/de/v.ec {-height 15 -radix hexadecimal} /tb_icon/cpu0/de/v.mc {-height 15 -radix hexadecimal} /tb_icon/cpu0/de/v.wc {-height 15 -radix hexadecimal} /tb_icon/cpu0/de/v.i {-height 15 -radix hexadecimal}} /tb_icon/cpu0/de/v
163
add wave -noupdate -radix hexadecimal -childformat {{/tb_icon/cpu0/ex/v.cor -radix hexadecimal} {/tb_icon/cpu0/ex/v.mc -radix hexadecimal} {/tb_icon/cpu0/ex/v.wc -radix hexadecimal} {/tb_icon/cpu0/ex/v.rd -radix unsigned} {/tb_icon/cpu0/ex/v.f -radix hexadecimal} {/tb_icon/cpu0/ex/v.str -radix hexadecimal} {/tb_icon/cpu0/ex/v.res -radix hexadecimal}} -subitemconfig {/tb_icon/cpu0/ex/v.cor {-height 15 -radix hexadecimal} /tb_icon/cpu0/ex/v.mc {-height 15 -radix hexadecimal} /tb_icon/cpu0/ex/v.wc {-height 15 -radix hexadecimal} /tb_icon/cpu0/ex/v.rd {-height 15 -radix unsigned} /tb_icon/cpu0/ex/v.f {-height 15 -radix hexadecimal} /tb_icon/cpu0/ex/v.str {-height 15 -radix hexadecimal} /tb_icon/cpu0/ex/v.res {-height 15 -radix hexadecimal}} /tb_icon/cpu0/ex/v
164
add wave -noupdate -radix hexadecimal -childformat {{/tb_icon/cpu0/me/v.wc -radix hexadecimal} {/tb_icon/cpu0/me/v.rd -radix hexadecimal} {/tb_icon/cpu0/me/v.res -radix hexadecimal}} -subitemconfig {/tb_icon/cpu0/me/v.wc {-height 15 -radix hexadecimal} /tb_icon/cpu0/me/v.rd {-height 15 -radix hexadecimal} /tb_icon/cpu0/me/v.res {-height 15 -radix hexadecimal}} /tb_icon/cpu0/me/v
165
add wave -noupdate -childformat {{/tb_icon/cpu0/cp.epc -radix hexadecimal}} -expand -subitemconfig {/tb_icon/cpu0/cp.sr -expand /tb_icon/cpu0/cp.epc {-height 15 -radix hexadecimal}} /tb_icon/cpu0/cp
166
#add wave -noupdate /tb_icon/cpu0/ccp
167
add wave -noupdate -divider -height 30 {CPU MASTER}
168
add wave -noupdate -radix hexadecimal -childformat {{/tb_icon/uut1/r.s -radix hexadecimal} {/tb_icon/uut1/r.i -radix hexadecimal} {/tb_icon/uut1/r.d -radix hexadecimal}} -subitemconfig {/tb_icon/uut1/r.s {-height 15 -radix hexadecimal} /tb_icon/uut1/r.i {-height 15 -radix hexadecimal} /tb_icon/uut1/r.d {-height 15 -radix hexadecimal}} /tb_icon/uut1/r
169
add wave -noupdate -color {Steel Blue} -label MI -childformat {{/tb_icon/mi.dat -radix hexadecimal}} -subitemconfig {/tb_icon/mi.clk {-color #46468282b4b4 -height 15} /tb_icon/mi.rst {-color #46468282b4b4 -height 15} /tb_icon/mi.dat {-color #46468282b4b4 -height 15 -radix hexadecimal} /tb_icon/mi.ack {-color #46468282b4b4 -height 15}} /tb_icon/mi
170
add wave -noupdate -color {Light Steel Blue} -label MO -radix hexadecimal -childformat {{/tb_icon/mo.dat -radix hexadecimal} {/tb_icon/mo.adr -radix hexadecimal}} -subitemconfig {/tb_icon/mo.dat {-color #b0b0c4c4dede -height 15 -radix hexadecimal} /tb_icon/mo.sel {-color #b0b0c4c4dede -height 15} /tb_icon/mo.adr {-color #b0b0c4c4dede -height 15 -radix hexadecimal} /tb_icon/mo.cyc {-color #b0b0c4c4dede -height 15} /tb_icon/mo.stb {-color #b0b0c4c4dede -height 15} /tb_icon/mo.we {-color #b0b0c4c4dede -height 15}} /tb_icon/mo
171
add wave -noupdate -divider -height 30 {MEMORY SLAVE}
172
add wave -noupdate -color {Lime Green} -label SI -radix hexadecimal -childformat {{/tb_icon/brami.dat -radix hexadecimal} {/tb_icon/brami.adr -radix hexadecimal -childformat {{/tb_icon/brami.adr(31) -radix hexadecimal} {/tb_icon/brami.adr(30) -radix hexadecimal} {/tb_icon/brami.adr(29) -radix hexadecimal} {/tb_icon/brami.adr(28) -radix hexadecimal} {/tb_icon/brami.adr(27) -radix hexadecimal} {/tb_icon/brami.adr(26) -radix hexadecimal} {/tb_icon/brami.adr(25) -radix hexadecimal} {/tb_icon/brami.adr(24) -radix hexadecimal} {/tb_icon/brami.adr(23) -radix hexadecimal} {/tb_icon/brami.adr(22) -radix hexadecimal} {/tb_icon/brami.adr(21) -radix hexadecimal} {/tb_icon/brami.adr(20) -radix hexadecimal} {/tb_icon/brami.adr(19) -radix hexadecimal} {/tb_icon/brami.adr(18) -radix hexadecimal} {/tb_icon/brami.adr(17) -radix hexadecimal} {/tb_icon/brami.adr(16) -radix hexadecimal} {/tb_icon/brami.adr(15) -radix hexadecimal} {/tb_icon/brami.adr(14) -radix hexadecimal} {/tb_icon/brami.adr(13) -radix hexadecimal} {/tb_icon/brami.adr(12) -radix hexadecimal} {/tb_icon/brami.adr(11) -radix hexadecimal} {/tb_icon/brami.adr(10) -radix hexadecimal} {/tb_icon/brami.adr(9) -radix hexadecimal} {/tb_icon/brami.adr(8) -radix hexadecimal} {/tb_icon/brami.adr(7) -radix hexadecimal} {/tb_icon/brami.adr(6) -radix hexadecimal} {/tb_icon/brami.adr(5) -radix hexadecimal} {/tb_icon/brami.adr(4) -radix hexadecimal} {/tb_icon/brami.adr(3) -radix hexadecimal} {/tb_icon/brami.adr(2) -radix hexadecimal} {/tb_icon/brami.adr(1) -radix hexadecimal} {/tb_icon/brami.adr(0) -radix hexadecimal}}}} -subitemconfig {/tb_icon/brami.clk {-color #3232cdcd3232 -height 15} /tb_icon/brami.rst {-color #3232cdcd3232 -height 15} /tb_icon/brami.dat {-color #3232cdcd3232 -height 15 -radix hexadecimal} /tb_icon/brami.sel {-color #3232cdcd3232 -height 15} /tb_icon/brami.sel(3) {-color #3232cdcd3232} /tb_icon/brami.sel(2) {-color #3232cdcd3232} /tb_icon/brami.sel(1) {-color #3232cdcd3232} /tb_icon/brami.sel(0) {-color #3232cdcd3232} /tb_icon/brami.adr {-color #3232cdcd3232 -height 15 -radix hexadecimal -childformat {{/tb_icon/brami.adr(31) -radix hexadecimal} {/tb_icon/brami.adr(30) -radix hexadecimal} {/tb_icon/brami.adr(29) -radix hexadecimal} {/tb_icon/brami.adr(28) -radix hexadecimal} {/tb_icon/brami.adr(27) -radix hexadecimal} {/tb_icon/brami.adr(26) -radix hexadecimal} {/tb_icon/brami.adr(25) -radix hexadecimal} {/tb_icon/brami.adr(24) -radix hexadecimal} {/tb_icon/brami.adr(23) -radix hexadecimal} {/tb_icon/brami.adr(22) -radix hexadecimal} {/tb_icon/brami.adr(21) -radix hexadecimal} {/tb_icon/brami.adr(20) -radix hexadecimal} {/tb_icon/brami.adr(19) -radix hexadecimal} {/tb_icon/brami.adr(18) -radix hexadecimal} {/tb_icon/brami.adr(17) -radix hexadecimal} {/tb_icon/brami.adr(16) -radix hexadecimal} {/tb_icon/brami.adr(15) -radix hexadecimal} {/tb_icon/brami.adr(14) -radix hexadecimal} {/tb_icon/brami.adr(13) -radix hexadecimal} {/tb_icon/brami.adr(12) -radix hexadecimal} {/tb_icon/brami.adr(11) -radix hexadecimal} {/tb_icon/brami.adr(10) -radix hexadecimal} {/tb_icon/brami.adr(9) -radix hexadecimal} {/tb_icon/brami.adr(8) -radix hexadecimal} {/tb_icon/brami.adr(7) -radix hexadecimal} {/tb_icon/brami.adr(6) -radix hexadecimal} {/tb_icon/brami.adr(5) -radix hexadecimal} {/tb_icon/brami.adr(4) -radix hexadecimal} {/tb_icon/brami.adr(3) -radix hexadecimal} {/tb_icon/brami.adr(2) -radix hexadecimal} {/tb_icon/brami.adr(1) -radix hexadecimal} {/tb_icon/brami.adr(0) -radix hexadecimal}}} /tb_icon/brami.adr(31) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(30) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(29) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(28) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(27) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(26) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(25) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(24) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(23) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(22) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(21) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(20) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(19) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(18) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(17) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(16) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(15) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(14) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(13) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(12) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(11) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(10) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(9) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(8) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(7) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(6) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(5) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(4) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(3) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(2) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(1) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.adr(0) {-color #3232cdcd3232 -radix hexadecimal} /tb_icon/brami.cyc {-color #3232cdcd3232 -height 15} /tb_icon/brami.stb {-color #3232cdcd3232 -height 15} /tb_icon/brami.we {-color #3232cdcd3232 -height 15}} /tb_icon/brami
173
add wave -noupdate -color {Green Yellow} -label SO -radix hexadecimal -childformat {{/tb_icon/bramo.dat -radix hexadecimal}} -subitemconfig {/tb_icon/bramo.dat {-color #adadffff2f2f -height 15 -radix hexadecimal} /tb_icon/bramo.ack {-color #adadffff2f2f -height 15}} /tb_icon/bramo
174
add wave -noupdate -divider -height 30 PIT
175
add wave -noupdate /tb_icon/pit0/s
176
add wave -noupdate -radix unsigned /tb_icon/pit0/n
177
 
178
TreeUpdate [SetDefaultTree]
179
WaveRestoreCursors {{Cursor 1} {55 ns} 0}
180
configure wave -namecolwidth 150
181
configure wave -valuecolwidth 100
182
configure wave -justifyvalue left
183
configure wave -signalnamewidth 0
184
configure wave -snapdistance 10
185
configure wave -datasetprefix 0
186
configure wave -rowmargin 4
187
configure wave -childrowmargin 2
188
configure wave -gridoffset 0
189
configure wave -gridperiod 1
190
configure wave -griddelta 40
191
configure wave -timeline 1
192
configure wave -timelineunits ns
193
update
194
WaveRestoreZoom {26 ns} {166 ns}
195
 
196
# Add memory tabs to the UI
197
#add mem /tb_icon/cpu0/gp/gpr -a decimal -d hexadecimal -wo 1
198
#add mem /tb_icon/mem0/mem(3) -a hexadecimal -d hexadecimal -wo 1
199
#add mem /tb_icon/mem0/mem(2) -a hexadecimal -d hexadecimal -wo 1
200
#add mem /tb_icon/mem0/mem(1) -a hexadecimal -d hexadecimal -wo 1
201
#add mem /tb_icon/mem0/mem(0) -a hexadecimal -d hexadecimal -wo 1

powered by: WebSVN 2.1.0

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