1 |
2 |
jcastillo |
#//////////////////////////////////////////////////////////////////////
|
2 |
|
|
#//// ////
|
3 |
|
|
#//// OR1200 graphic configuration tool ////
|
4 |
|
|
#//// ////
|
5 |
|
|
#//// Description ////
|
6 |
|
|
#//// Graphic configuration tool for OR1200 core ////
|
7 |
|
|
#//// ////
|
8 |
|
|
#//// To Do: ////
|
9 |
|
|
#//// - find bugs ////
|
10 |
|
|
#//// ////
|
11 |
|
|
#//// Author(s): ////
|
12 |
|
|
#//// - Javier Castillo, jcastillo@opencores.org ////
|
13 |
|
|
#//// ////
|
14 |
|
|
#//////////////////////////////////////////////////////////////////////
|
15 |
|
|
#//// ////
|
16 |
|
|
#//// Copyright (C) 2000 Authors and OPENCORES.ORG ////
|
17 |
|
|
#//// ////
|
18 |
|
|
#//// This source file may be used and distributed without ////
|
19 |
|
|
#//// restriction provided that this copyright statement is not ////
|
20 |
|
|
#//// removed from the file and that any derivative work contains ////
|
21 |
|
|
#//// the original copyright notice and the associated disclaimer. ////
|
22 |
|
|
#//// ////
|
23 |
|
|
#//// This source file is free software; you can redistribute it ////
|
24 |
|
|
#//// and/or modify it under the terms of the GNU Lesser General ////
|
25 |
|
|
#//// Public License as published by the Free Software Foundation; ////
|
26 |
|
|
#//// either version 2.1 of the License, or (at your option) any ////
|
27 |
|
|
#//// later version. ////
|
28 |
|
|
#//// ////
|
29 |
|
|
#//// This source is distributed in the hope that it will be ////
|
30 |
|
|
#//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
31 |
|
|
#//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
32 |
|
|
#//// PURPOSE. See the GNU Lesser General Public License for more ////
|
33 |
|
|
#//// details. ////
|
34 |
|
|
#//// ////
|
35 |
|
|
#//// You should have received a copy of the GNU Lesser General ////
|
36 |
|
|
#//// Public License along with this source; if not, download it ////
|
37 |
|
|
#//// from http://www.opencores.org/lgpl.shtml ////
|
38 |
|
|
#//// ////
|
39 |
|
|
#//////////////////////////////////////////////////////////////////////
|
40 |
|
|
#//
|
41 |
|
|
#// CVS Revision History
|
42 |
|
|
#//
|
43 |
|
|
#// $Log: not supported by cvs2svn $
|
44 |
8 |
jcastillo |
#// Revision 1.5 2004/10/19 08:34:23 jcastillo
|
45 |
|
|
#// About window works in Windows
|
46 |
|
|
#// Version 0.1.2
|
47 |
|
|
#//
|
48 |
7 |
jcastillo |
#// Revision 1.4 2004/10/19 08:23:37 jcastillo
|
49 |
|
|
#// Flash prefix generation corrected
|
50 |
|
|
#//
|
51 |
4 |
jcastillo |
#// Revision 1.1.1.1 2004/09/23 10:03:08 jcastillo
|
52 |
|
|
#// First import
|
53 |
|
|
#//
|
54 |
2 |
jcastillo |
|
55 |
|
|
|
56 |
|
|
#Defines variables for parameters and its default values
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
proc defaultvals { } {
|
60 |
|
|
global ASIC
|
61 |
|
|
global VCD_DUMP
|
62 |
|
|
global VERBOSE
|
63 |
|
|
global targetFPGA
|
64 |
|
|
global targetASIC
|
65 |
|
|
global ASIC_MULTP2_32X32
|
66 |
|
|
global BIST
|
67 |
|
|
global RF_RAM
|
68 |
|
|
|
69 |
|
|
#Wishbone defines
|
70 |
|
|
global REGISTERED_OUTPUTS
|
71 |
|
|
global REGISTERED_INPUTS
|
72 |
|
|
global NO_BURSTS
|
73 |
|
|
global WB_RETRY
|
74 |
|
|
global WB_CAB
|
75 |
|
|
global WB_B3
|
76 |
|
|
global CLKDIV2_SUPPORT
|
77 |
|
|
global CLKDIV4_SUPPORT
|
78 |
|
|
|
79 |
|
|
#Misc
|
80 |
|
|
global ADDITIONAL_SYNOPSYS_DIRECTIVES
|
81 |
|
|
global CASE_DEFAULT
|
82 |
|
|
global IMPL_MEM2REG
|
83 |
|
|
|
84 |
|
|
#IU defines
|
85 |
|
|
global SR_EPH_DEF
|
86 |
|
|
global IMPL_ADDC
|
87 |
|
|
global IMPL_CY
|
88 |
|
|
global ADDITIONAL_FLAG_MODIFIERS
|
89 |
|
|
global IMPL_DIV
|
90 |
|
|
global IMPL_ALU_ROTATE
|
91 |
|
|
global MULT_IMPLEMENTED
|
92 |
|
|
global LWPWR_MULT
|
93 |
|
|
global ALU_COMP
|
94 |
|
|
|
95 |
|
|
#PM defines
|
96 |
|
|
global PM_IMPLEMENTED
|
97 |
|
|
global PM_READREGS
|
98 |
|
|
global PM_UNUSED_ZERO
|
99 |
|
|
global PM_PARTIAL_DECODING
|
100 |
|
|
|
101 |
|
|
#DU defines
|
102 |
|
|
global DU_IMPLEMENTED
|
103 |
|
|
global DU_HWBKPTS
|
104 |
|
|
global DU_TB_IMPLEMENTED
|
105 |
|
|
global DU_READREGS
|
106 |
|
|
global DU_UNUSED_ZERO
|
107 |
|
|
global DU_STATUS_UNIMPLEMENTED
|
108 |
|
|
|
109 |
|
|
#PIC defines
|
110 |
|
|
global PIC_IMPLEMENTED
|
111 |
|
|
global PIC_READREGS
|
112 |
|
|
global PIC_UNUSED_ZERO
|
113 |
|
|
global PIC_PICMR
|
114 |
|
|
global PIC_PICSR
|
115 |
|
|
global PIC_INTS
|
116 |
|
|
|
117 |
|
|
#TT defines
|
118 |
|
|
global TT_IMPLEMENTED
|
119 |
|
|
global TT_TTMR
|
120 |
|
|
global TT_TTSR
|
121 |
|
|
global TT_READREGS
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
#IC CACHES
|
125 |
|
|
global NO_IC
|
126 |
|
|
global IC_WAYS
|
127 |
|
|
global IC_SIZE
|
128 |
|
|
global ICLS
|
129 |
|
|
|
130 |
|
|
#DC defines
|
131 |
|
|
global NO_DC
|
132 |
|
|
global DC_WAYS
|
133 |
|
|
global DC_SIZE
|
134 |
|
|
global DCLS
|
135 |
|
|
global SB_IMPLEMENTED
|
136 |
|
|
global SB_ENTRIES
|
137 |
|
|
global SB_LOG
|
138 |
|
|
|
139 |
|
|
#MMU defines
|
140 |
|
|
global NO_IMMU
|
141 |
|
|
global NO_DMMU
|
142 |
|
|
|
143 |
|
|
#QMEM defines
|
144 |
|
|
global QMEM_IMPLEMENTED
|
145 |
|
|
global QMEM_BSEL
|
146 |
|
|
global QMEM_ACK
|
147 |
|
|
|
148 |
|
|
#MISC defines
|
149 |
|
|
global MAC_IMPLEMENTED
|
150 |
|
|
global MAC_SPR_WE
|
151 |
|
|
global CFGR_IMPLEMENTED
|
152 |
|
|
global SYS_FULL_DECODE
|
153 |
|
|
|
154 |
|
|
#Target defines
|
155 |
|
|
set ASIC 0
|
156 |
|
|
set VCD_DUMP 0
|
157 |
|
|
set VERBOSE 0
|
158 |
|
|
set targetFPGA XILINX_RAMB4
|
159 |
|
|
set targetASIC VIRTUALSILICON_SSP
|
160 |
|
|
set ASIC_MULTP2_32X32 0
|
161 |
|
|
set BIST 0
|
162 |
|
|
set RF_RAM 2
|
163 |
|
|
|
164 |
|
|
#Wishbone defines
|
165 |
|
|
set REGISTERED_OUTPUTS 1
|
166 |
|
|
set REGISTERED_INPUTS 0
|
167 |
|
|
set NO_BURSTS 0
|
168 |
|
|
set WB_RETRY 0
|
169 |
|
|
set WB_CAB 1
|
170 |
|
|
set WB_B3 0
|
171 |
|
|
set CLKDIV2_SUPPORT 1
|
172 |
|
|
set CLKDIV4_SUPPORT 0
|
173 |
|
|
|
174 |
|
|
#Misc
|
175 |
|
|
set ADDITIONAL_SYNOPSYS_DIRECTIVES 0
|
176 |
|
|
set CASE_DEFAULT 1
|
177 |
|
|
set IMPL_MEM2REG 1
|
178 |
|
|
|
179 |
|
|
#IU defines
|
180 |
|
|
set SR_EPH_DEF 0
|
181 |
|
|
set IMPL_ADDC 1
|
182 |
|
|
set IMPL_CY 1
|
183 |
|
|
set ADDITIONAL_FLAG_MODIFIERS 0
|
184 |
|
|
set IMPL_DIV 0
|
185 |
|
|
set IMPL_ALU_ROTATE 0
|
186 |
|
|
set MULT_IMPLEMENTED 1
|
187 |
|
|
set LWPWR_MULT 0
|
188 |
|
|
set ALU_COMP 2
|
189 |
|
|
|
190 |
|
|
#PM defines
|
191 |
|
|
set PM_IMPLEMENTED 1
|
192 |
|
|
set PM_READREGS 1
|
193 |
|
|
set PM_UNUSED_ZERO 1
|
194 |
|
|
set PM_PARTIAL_DECODING 1
|
195 |
|
|
|
196 |
|
|
#DU defines
|
197 |
|
|
set DU_IMPLEMENTED 1
|
198 |
|
|
set DU_HWBKPTS 0
|
199 |
|
|
if { $ASIC==0 && ( $targetFPGA=="XILINX_RAMB4" || $targetFPGA=="XILINX_RAM32x1D" ) } {
|
200 |
|
|
set DU_TB_IMPLEMENTED 1
|
201 |
|
|
} else {
|
202 |
|
|
set DU_TB_IMPLEMENTED 0
|
203 |
|
|
}
|
204 |
|
|
set DU_READREGS 1
|
205 |
|
|
set DU_UNUSED_ZERO 1
|
206 |
|
|
set DU_STATUS_UNIMPLEMENTED 1
|
207 |
|
|
|
208 |
|
|
#PIC defines
|
209 |
|
|
set PIC_IMPLEMENTED 1
|
210 |
|
|
set PIC_READREGS 1
|
211 |
|
|
set PIC_UNUSED_ZERO 1
|
212 |
|
|
set PIC_PICMR 1
|
213 |
|
|
set PIC_PICSR 1
|
214 |
|
|
set PIC_INTS 20
|
215 |
|
|
|
216 |
|
|
#TT defines
|
217 |
|
|
set TT_IMPLEMENTED 1
|
218 |
|
|
set TT_TTMR 1
|
219 |
|
|
set TT_TTSR 1
|
220 |
|
|
set TT_READREGS 1
|
221 |
|
|
|
222 |
|
|
#IC defines
|
223 |
|
|
set NO_IC 0
|
224 |
|
|
set IC_WAYS 1
|
225 |
|
|
set IC_SIZE 8KB
|
226 |
|
|
set ICLS 16
|
227 |
|
|
|
228 |
|
|
#DC defines
|
229 |
|
|
set NO_DC 0
|
230 |
|
|
set DC_WAYS 1
|
231 |
|
|
set DC_SIZE 8KB
|
232 |
|
|
set DCLS 16
|
233 |
|
|
set SB_IMPLEMENTED 0
|
234 |
|
|
set SB_ENTRIES 4
|
235 |
|
|
set SB_LOG 2
|
236 |
|
|
|
237 |
|
|
#MMU defines
|
238 |
|
|
set NO_IMMU 0
|
239 |
|
|
set NO_DMMU 0
|
240 |
|
|
|
241 |
|
|
#QMEM defines
|
242 |
|
|
set QMEM_IMPLEMENTED 0
|
243 |
|
|
set QMEM_BSEL 0
|
244 |
|
|
set QMEM_ACK 0
|
245 |
|
|
|
246 |
|
|
#MISC defines
|
247 |
|
|
set MAC_IMPLEMENTED 1
|
248 |
|
|
set MAC_SPR_WE 1
|
249 |
|
|
set CFGR_IMPLEMENTED 1
|
250 |
|
|
set SYS_FULL_DECODE 1
|
251 |
|
|
|
252 |
|
|
}
|
253 |
|
|
|
254 |
|
|
|
255 |
|
|
#Target memories
|
256 |
|
|
lappend memFPGA "GENERIC" "ALTERA_LPM" "XILINX_RAMB4" "XILINX_RAM32x1D" "USE_RAM16x1D_FOR_RAM32X1D"
|
257 |
|
|
lappend memASIC "GENERIC" "ARTISAN_SSP" "ARTISAN_SDP" "ARTISAN_STP" "VIRTUALSILICON_SSP" "VIRTUALSILICON_STP_T1" "VIRTUALSILICON_STP_T2"
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
proc confFPGA { } {
|
263 |
|
|
|
264 |
|
|
global memFPGA
|
265 |
|
|
global ASIC_MULTP2_32X32
|
266 |
|
|
global targetFPGA
|
267 |
|
|
global RF_RAM
|
268 |
|
|
|
269 |
|
|
destroy .screen.memframe
|
270 |
|
|
destroy .screen.multframe
|
271 |
|
|
destroy .screen.bistframe
|
272 |
|
|
destroy .screen.rfframe
|
273 |
|
|
|
274 |
|
|
#Create a frame for the memory type selection
|
275 |
|
|
frame .screen.memframe -bd 2 -relief groove
|
276 |
|
|
pack .screen.memframe -side left -padx 2m -pady 2m
|
277 |
|
|
label .screen.memframe.meml -text "Target FPGA memories"
|
278 |
|
|
pack .screen.memframe.meml -side top
|
279 |
|
|
|
280 |
|
|
#Create the list for memories
|
281 |
|
|
set i 1
|
282 |
|
|
|
283 |
|
|
foreach mem $memFPGA {
|
284 |
|
|
radiobutton .screen.memframe.b$i -text $mem -variable targetFPGA -value $mem
|
285 |
|
|
pack .screen.memframe.b$i -side top -anchor w
|
286 |
|
|
incr i 1
|
287 |
|
|
}
|
288 |
|
|
|
289 |
|
|
#Create a frame for Register File memory type
|
290 |
|
|
frame .screen.rfframe -bd 2 -relief groove
|
291 |
|
|
pack .screen.rfframe -side top -padx 2m -pady 2m
|
292 |
|
|
label .screen.rfframe.rflab1 -text "Type of Register File RAM"
|
293 |
|
|
pack .screen.rfframe.rflab1 -side top
|
294 |
|
|
radiobutton .screen.rfframe.rf1 -text "Generic (flip-flop based) " -variable RF_RAM -value 0
|
295 |
|
|
radiobutton .screen.rfframe.rf2 -text "Two port RAM" -variable RF_RAM -value 1
|
296 |
|
|
radiobutton .screen.rfframe.rf3 -text "Dual port RAM" -variable RF_RAM -value 2
|
297 |
|
|
pack .screen.rfframe.rf1 .screen.rfframe.rf2 .screen.rfframe.rf3 -side top -anchor w
|
298 |
|
|
|
299 |
|
|
|
300 |
|
|
#Create a frame for the multiplier type selection
|
301 |
|
|
set ASIC_MULTP2_32X32 0
|
302 |
|
|
frame .screen.multframe -bd 2 -relief groove
|
303 |
|
|
pack .screen.multframe -side left -padx 2m -pady 2m
|
304 |
|
|
label .screen.multframe.multl -text "Multiplier"
|
305 |
|
|
pack .screen.multframe.multl -side top
|
306 |
|
|
radiobutton .screen.multframe.rmul1 -text "GENERIC 32x32 MULTIPLIER" -variable ASIC_MULTP2_32X32 -value 0
|
307 |
|
|
pack .screen.multframe.rmul1 -side top -anchor w
|
308 |
|
|
|
309 |
|
|
|
310 |
|
|
|
311 |
|
|
}
|
312 |
|
|
|
313 |
|
|
|
314 |
|
|
proc confASIC { } {
|
315 |
|
|
#Global var with all the posible target memories for ASIC
|
316 |
|
|
global memASIC
|
317 |
|
|
global targetASIC
|
318 |
|
|
global ASIC_MULTP2_32X32
|
319 |
|
|
global RF_RAM
|
320 |
|
|
|
321 |
|
|
destroy .screen.memframe
|
322 |
|
|
destroy .screen.multframe
|
323 |
|
|
destroy .screen.bistframe
|
324 |
|
|
destroy .screen.rfframe
|
325 |
|
|
|
326 |
|
|
#Create a frame for the memory type selection
|
327 |
|
|
frame .screen.memframe -bd 2 -relief groove
|
328 |
|
|
pack .screen.memframe -side left -padx 2m -pady 2m
|
329 |
|
|
label .screen.memframe.meml -text "Target ASIC memories"
|
330 |
|
|
pack .screen.memframe.meml -side top
|
331 |
|
|
|
332 |
|
|
#Create the list for memories
|
333 |
|
|
set i 1
|
334 |
|
|
|
335 |
|
|
foreach mem $memASIC {
|
336 |
|
|
radiobutton .screen.memframe.b$i -text $mem -variable targetASIC -value $mem
|
337 |
|
|
pack .screen.memframe.b$i -side top -anchor w
|
338 |
|
|
incr i 1
|
339 |
|
|
}
|
340 |
|
|
|
341 |
|
|
#Create a frame for Register File memory type
|
342 |
|
|
frame .screen.rfframe -bd 2 -relief groove
|
343 |
|
|
pack .screen.rfframe -side top -padx 2m -pady 2m
|
344 |
|
|
label .screen.rfframe.rflab1 -text "Type of Register File RAM"
|
345 |
|
|
pack .screen.rfframe.rflab1 -side top
|
346 |
|
|
radiobutton .screen.rfframe.rf1 -text "Generic (flip-flop based) " -variable RF_RAM -value 0
|
347 |
|
|
radiobutton .screen.rfframe.rf2 -text "Two port RAM" -variable RF_RAM -value 1
|
348 |
|
|
radiobutton .screen.rfframe.rf3 -text "Dual port RAM" -variable RF_RAM -value 2
|
349 |
|
|
pack .screen.rfframe.rf1 .screen.rfframe.rf2 .screen.rfframe.rf3 -side top -anchor w
|
350 |
|
|
|
351 |
|
|
|
352 |
|
|
#Create a frame for the multiplier type selection
|
353 |
|
|
frame .screen.multframe -bd 2 -relief groove
|
354 |
|
|
pack .screen.multframe -side top -padx 2m -pady 2m
|
355 |
|
|
label .screen.multframe.multl -text "Multiplier"
|
356 |
|
|
pack .screen.multframe.multl -side top
|
357 |
|
|
radiobutton .screen.multframe.rmul1 -text "GENERIC 32x32 MULTIPLIER" -variable ASIC_MULTP2_32X32 -value 0
|
358 |
|
|
radiobutton .screen.multframe.rmul2 -text "ASIC 32x32 MULTIPLIER" -variable ASIC_MULTP2_32X32 -value 1
|
359 |
|
|
pack .screen.multframe.rmul1 -side top -anchor w
|
360 |
|
|
pack .screen.multframe.rmul2 -side top -anchor w
|
361 |
|
|
|
362 |
|
|
|
363 |
|
|
}
|
364 |
|
|
|
365 |
|
|
|
366 |
|
|
|
367 |
|
|
|
368 |
|
|
proc about { } {
|
369 |
|
|
toplevel .dabout -class Dialog
|
370 |
|
|
wm title .dabout About
|
371 |
|
|
wm iconname .dabout Dialog
|
372 |
|
|
frame .dabout.top -relief raised -bd 1
|
373 |
|
|
pack .dabout.top -side top -fill both
|
374 |
|
|
frame .dabout.bot -relief raised -bd 1
|
375 |
|
|
pack .dabout.bot -side bottom -fill both
|
376 |
|
|
|
377 |
7 |
jcastillo |
message .dabout.top.msg -width 8i -text "OpenRisc 1200 graphic configuration tool"
|
378 |
8 |
jcastillo |
message .dabout.top.msg2 -width 8i -text "javier.castillo@urjc.es"
|
379 |
7 |
jcastillo |
message .dabout.top.msg3 -width 8i -text "Version 0.1.2"
|
380 |
2 |
jcastillo |
pack .dabout.top.msg .dabout.top.msg2 .dabout.top.msg3 -side top -expand 1 -fill both -padx 3m -pady 3m
|
381 |
|
|
|
382 |
|
|
}
|
383 |
|
|
|
384 |
|
|
|
385 |
|
|
proc confOR1200 { } {
|
386 |
|
|
|
387 |
|
|
destroy .d
|
388 |
|
|
|
389 |
|
|
toplevel .d -class Dialog
|
390 |
|
|
wm title .d "OpenRISC 1200 Core Configuration"
|
391 |
|
|
frame .d.left -relief raised -bd 1 -relief flat
|
392 |
|
|
frame .d.right -relief raised -bd 1 -relief flat
|
393 |
|
|
pack .d.left -side left -fill both
|
394 |
|
|
pack .d.right -side right -fill both
|
395 |
|
|
|
396 |
|
|
#Add buttons
|
397 |
|
|
|
398 |
|
|
button .d.left.iub -text "Integer Unit" -command { confIU }
|
399 |
|
|
button .d.left.icb -text "Instruction Cache" -command { confIC }
|
400 |
|
|
button .d.left.dcb -text "Data Cache" -command { confDC }
|
401 |
|
|
button .d.left.mmub -text "MMU" -command { confMMU }
|
402 |
|
|
|
403 |
|
|
button .d.left.dub -text "Debug Unit" -command { confDU }
|
404 |
|
|
button .d.left.pmb -text "Power Management" -command { confPM }
|
405 |
|
|
button .d.right.picb -text "PIC" -command { confPIC }
|
406 |
|
|
button .d.right.ttb -text "Tick Timer" -command { confTT }
|
407 |
|
|
button .d.right.qmb -text "Quick Embedded Memory" -command { confQM }
|
408 |
|
|
button .d.right.mcb -text "Misc" -command { confMISC }
|
409 |
|
|
button .d.right.exb -text "Exit" -command { destroy .d }
|
410 |
|
|
|
411 |
|
|
|
412 |
|
|
pack .d.left.iub .d.left.icb .d.left.dcb .d.left.mmub -padx 10m -fill x
|
413 |
|
|
pack .d.left.dub .d.left.pmb .d.right.picb -padx 10m -fill x
|
414 |
|
|
pack .d.right.ttb .d.right.qmb .d.right.mcb .d.right.exb -padx 10m -fill x
|
415 |
|
|
|
416 |
|
|
}
|
417 |
|
|
|
418 |
|
|
|
419 |
|
|
proc confIU { } {
|
420 |
|
|
|
421 |
|
|
destroy .diu
|
422 |
|
|
destroy .dmi
|
423 |
|
|
|
424 |
|
|
toplevel .diu -class Dialog
|
425 |
|
|
wm title .diu "Integer Unit"
|
426 |
|
|
frame .diu.top -relief raised -bd 1 -relief flat
|
427 |
|
|
frame .diu.top2 -relief raised -bd 1 -relief groove
|
428 |
|
|
frame .diu.top3 -relief raised -bd 1 -relief groove
|
429 |
|
|
frame .diu.top4 -relief raised -bd 1 -relief groove
|
430 |
|
|
frame .diu.top5 -relief raised -bd 1 -relief groove
|
431 |
|
|
frame .diu.top6 -relief raised -bd 1 -relief groove
|
432 |
|
|
frame .diu.top7 -relief raised -bd 1 -relief groove
|
433 |
|
|
frame .diu.top8 -relief raised -bd 1 -relief groove
|
434 |
|
|
frame .diu.top9 -relief raised -bd 1 -relief groove
|
435 |
|
|
frame .diu.top10 -relief raised -bd 1 -relief groove
|
436 |
|
|
frame .diu.top11 -relief raised -bd 1 -relief groove
|
437 |
|
|
|
438 |
|
|
pack .diu.top -side top -fill both
|
439 |
|
|
pack .diu.top2 -side top -fill both
|
440 |
|
|
pack .diu.top3 -side top -fill both
|
441 |
|
|
pack .diu.top4 -side top -fill both
|
442 |
|
|
pack .diu.top5 -side top -fill both
|
443 |
|
|
pack .diu.top6 -side top -fill both
|
444 |
|
|
pack .diu.top7 -side top -fill both
|
445 |
|
|
pack .diu.top8 -side top -fill both
|
446 |
|
|
pack .diu.top9 -side top -fill both
|
447 |
|
|
pack .diu.top10 -side top -fill both
|
448 |
|
|
pack .diu.top11 -side top -fill both
|
449 |
|
|
|
450 |
|
|
label .diu.top.opl -text "OpenRISC 1200 Integer Unit Configuration" -relief raised
|
451 |
|
|
pack .diu.top.opl -side top -pady 5m -padx 10m
|
452 |
|
|
|
453 |
|
|
radiobutton .diu.top2.flashy -text y -variable SR_EPH_DEF -value 1
|
454 |
|
|
radiobutton .diu.top2.flashn -text n -variable SR_EPH_DEF -value 0
|
455 |
|
|
pack .diu.top2.flashy .diu.top2.flashn -side left
|
456 |
|
|
|
457 |
|
|
radiobutton .diu.top3.addcy -text y -variable IMPL_ADDC -value 1
|
458 |
|
|
radiobutton .diu.top3.addcn -text n -variable IMPL_ADDC -value 0
|
459 |
|
|
pack .diu.top3.addcy .diu.top3.addcn -side left
|
460 |
|
|
|
461 |
|
|
radiobutton .diu.top4.cyy -text y -variable IMPL_CY -value 1
|
462 |
|
|
radiobutton .diu.top4.cyn -text n -variable IMPL_CY -value 0
|
463 |
|
|
pack .diu.top4.cyy .diu.top4.cyn -side left
|
464 |
|
|
|
465 |
|
|
radiobutton .diu.top5.addcompy -text y -variable ADDITIONAL_FLAG_MODIFIERS -value 1
|
466 |
|
|
radiobutton .diu.top5.addcompn -text n -variable ADDITIONAL_FLAG_MODIFIERS -value 0
|
467 |
|
|
pack .diu.top5.addcompy .diu.top5.addcompn -side left
|
468 |
|
|
|
469 |
|
|
radiobutton .diu.top6.divy -text y -variable IMPL_DIV -value 1
|
470 |
|
|
radiobutton .diu.top6.divn -text n -variable IMPL_DIV -value 0
|
471 |
|
|
pack .diu.top6.divy .diu.top6.divn -side left
|
472 |
|
|
|
473 |
|
|
radiobutton .diu.top7.roty -text y -variable IMPL_ALU_ROTATE -value 1
|
474 |
|
|
radiobutton .diu.top7.rotn -text n -variable IMPL_ALU_ROTATE -value 0
|
475 |
|
|
pack .diu.top7.roty .diu.top7.rotn -side left
|
476 |
|
|
|
477 |
|
|
radiobutton .diu.top8.muly -text y -variable MULT_IMPLEMENTED -value 1
|
478 |
|
|
radiobutton .diu.top8.muln -text n -variable MULT_IMPLEMENTED -value 0
|
479 |
|
|
pack .diu.top8.muly .diu.top8.muln -side left
|
480 |
|
|
|
481 |
|
|
radiobutton .diu.top9.lpmuly -text y -variable LWPWR_MULT -value 1
|
482 |
|
|
radiobutton .diu.top9.lpmuln -text n -variable LWPWR_MULT -value 0
|
483 |
|
|
pack .diu.top9.lpmuly .diu.top9.lpmuln -side left
|
484 |
|
|
|
485 |
|
|
radiobutton .diu.top10.comp1 -text 1 -variable ALU_COMP -value 1
|
486 |
|
|
radiobutton .diu.top10.comp2 -text 2 -variable ALU_COMP -value 2
|
487 |
|
|
pack .diu.top10.comp1 .diu.top10.comp2 -side left
|
488 |
|
|
|
489 |
|
|
label .diu.top2.flashl -text " Exception vectors in FLASH"
|
490 |
|
|
label .diu.top3.addcl -text " Implement l.addc instruction"
|
491 |
|
|
label .diu.top4.cyl -text " Implement carry bit SR\[CY\]"
|
492 |
|
|
label .diu.top5.fml -text " Add operations set compare flag when result is zero"
|
493 |
|
|
label .diu.top6.divl -text " Implement optional l.div/l.divu operations"
|
494 |
|
|
label .diu.top7.rotl -text " Implement rotate in the ALU"
|
495 |
|
|
label .diu.top8.mull -text " Implement multiplier"
|
496 |
|
|
label .diu.top9.lpmull -text " Low power multiplier"
|
497 |
|
|
label .diu.top10.compl -text " Type of ALU compare to implement"
|
498 |
|
|
|
499 |
|
|
pack .diu.top2.flashl .diu.top3.addcl .diu.top4.cyl .diu.top5.fml .diu.top6.divl .diu.top7.rotl .diu.top8.mull .diu.top9.lpmull .diu.top10.compl -side left
|
500 |
|
|
|
501 |
|
|
|
502 |
|
|
frame .diu.top11.left -relief raised -bd 1 -relief flat
|
503 |
|
|
frame .diu.top11.right -relief raised -bd 1 -relief flat
|
504 |
|
|
|
505 |
|
|
pack .diu.top11.left -side left -fill both
|
506 |
|
|
pack .diu.top11.right -side right -fill both
|
507 |
|
|
|
508 |
|
|
button .diu.top11.left.nextb -text "Next" -command { confIC }
|
509 |
|
|
button .diu.top11.right.exitb -text "Exit" -command { destroy .diu }
|
510 |
|
|
|
511 |
|
|
pack .diu.top11.left.nextb -side top -padx 10m -pady 5m -fill x
|
512 |
|
|
pack .diu.top11.right.exitb -side top -padx 10m -pady 5m -fill x
|
513 |
|
|
|
514 |
|
|
}
|
515 |
|
|
|
516 |
|
|
|
517 |
|
|
proc confPM { } {
|
518 |
|
|
|
519 |
|
|
destroy .dpm
|
520 |
|
|
destroy .ddu
|
521 |
|
|
|
522 |
|
|
toplevel .dpm -class Dialog
|
523 |
|
|
wm title .dpm "Power Management"
|
524 |
|
|
wm iconname .dpm Dialog
|
525 |
|
|
|
526 |
|
|
frame .dpm.top -relief raised -bd 1 -relief flat
|
527 |
|
|
frame .dpm.top2 -relief raised -bd 1 -relief groove
|
528 |
|
|
frame .dpm.top3 -relief raised -bd 1 -relief groove
|
529 |
|
|
frame .dpm.top4 -relief raised -bd 1 -relief groove
|
530 |
|
|
frame .dpm.top5 -relief raised -bd 1 -relief groove
|
531 |
|
|
frame .dpm.top6 -relief raised -bd 1 -relief groove
|
532 |
|
|
|
533 |
|
|
pack .dpm.top -side top -fill both
|
534 |
|
|
pack .dpm.top2 -side top -fill both
|
535 |
|
|
pack .dpm.top3 -side top -fill both
|
536 |
|
|
pack .dpm.top4 -side top -fill both
|
537 |
|
|
pack .dpm.top5 -side top -fill both
|
538 |
|
|
pack .dpm.top6 -side top -fill both
|
539 |
|
|
|
540 |
|
|
label .dpm.top.opl -text "OpenRISC 1200 Power Management Configuration" -relief raised
|
541 |
|
|
pack .dpm.top.opl -side top -pady 5m -padx 10m
|
542 |
|
|
|
543 |
|
|
radiobutton .dpm.top2.imply -text y -variable PM_IMPLEMENTED -value 1
|
544 |
|
|
radiobutton .dpm.top2.impln -text n -variable PM_IMPLEMENTED -value 0
|
545 |
|
|
pack .dpm.top2.imply .dpm.top2.impln -side left
|
546 |
|
|
|
547 |
|
|
|
548 |
|
|
radiobutton .dpm.top3.ready -text y -variable PM_READREGS -value 1
|
549 |
|
|
radiobutton .dpm.top3.readn -text n -variable PM_READREGS -value 0
|
550 |
|
|
pack .dpm.top3.ready .dpm.top3.readn -side left
|
551 |
|
|
|
552 |
|
|
radiobutton .dpm.top4.unusedy -text y -variable PM_UNUSED_ZERO -value 1
|
553 |
|
|
radiobutton .dpm.top4.unusedn -text n -variable PM_UNUSED_ZERO -value 0
|
554 |
|
|
pack .dpm.top4.unusedy .dpm.top4.unusedn -side left
|
555 |
|
|
|
556 |
|
|
radiobutton .dpm.top5.pary -text y -variable PM_PARTIAL_DECODING -value 1
|
557 |
|
|
radiobutton .dpm.top5.parn -text n -variable PM_PARTIAL_DECODING -value 0
|
558 |
|
|
pack .dpm.top5.pary .dpm.top5.parn -side left
|
559 |
|
|
|
560 |
|
|
|
561 |
|
|
label .dpm.top2.impll -text " Power Management Unit Implemented"
|
562 |
|
|
label .dpm.top3.readl -text " Read PMR is allowed"
|
563 |
|
|
label .dpm.top4.unusedl -text " Unused PMR bits should be zero"
|
564 |
|
|
label .dpm.top5.parl -text " PMR can be read/written at any address inside PM group"
|
565 |
|
|
|
566 |
|
|
pack .dpm.top2.impll -side left
|
567 |
|
|
pack .dpm.top3.readl -side left
|
568 |
|
|
pack .dpm.top4.unusedl -side left
|
569 |
|
|
pack .dpm.top5.parl -side left
|
570 |
|
|
|
571 |
|
|
frame .dpm.top6.left -relief raised -bd 1 -relief flat
|
572 |
|
|
frame .dpm.top6.right -relief raised -bd 1 -relief flat
|
573 |
|
|
|
574 |
|
|
pack .dpm.top6.left -side left -fill both
|
575 |
|
|
pack .dpm.top6.right -side right -fill both
|
576 |
|
|
|
577 |
|
|
button .dpm.top6.left.nextb -text "Next" -command { confPIC }
|
578 |
|
|
button .dpm.top6.right.exitb -text "Exit" -command { destroy .dpm }
|
579 |
|
|
|
580 |
|
|
pack .dpm.top6.left.nextb -side top -padx 10m -pady 5m -fill x
|
581 |
|
|
pack .dpm.top6.right.exitb -side top -padx 10m -pady 5m -fill x
|
582 |
|
|
|
583 |
|
|
}
|
584 |
|
|
|
585 |
|
|
proc confDU { } {
|
586 |
|
|
|
587 |
|
|
global ASIC
|
588 |
|
|
global targetFPGA
|
589 |
|
|
|
590 |
|
|
|
591 |
|
|
destroy .dmu
|
592 |
|
|
destroy .ddu
|
593 |
|
|
|
594 |
|
|
toplevel .ddu -class Dialog
|
595 |
|
|
wm title .ddu "Debug Unit"
|
596 |
|
|
wm iconname .ddu Dialog
|
597 |
|
|
|
598 |
|
|
frame .ddu.top -relief raised -bd 1 -relief flat
|
599 |
|
|
frame .ddu.top2 -relief raised -bd 1 -relief groove
|
600 |
|
|
frame .ddu.top3 -relief raised -bd 1 -relief groove
|
601 |
|
|
frame .ddu.top4 -relief raised -bd 1 -relief groove
|
602 |
|
|
frame .ddu.top5 -relief raised -bd 1 -relief groove
|
603 |
|
|
frame .ddu.top6 -relief raised -bd 1 -relief groove
|
604 |
|
|
frame .ddu.top7 -relief raised -bd 1 -relief groove
|
605 |
|
|
frame .ddu.top8 -relief raised -bd 1 -relief groove
|
606 |
|
|
|
607 |
|
|
pack .ddu.top -side top -fill both
|
608 |
|
|
pack .ddu.top2 -side top -fill both
|
609 |
|
|
pack .ddu.top3 -side top -fill both
|
610 |
|
|
pack .ddu.top4 -side top -fill both
|
611 |
|
|
pack .ddu.top5 -side top -fill both
|
612 |
|
|
pack .ddu.top6 -side top -fill both
|
613 |
|
|
pack .ddu.top7 -side top -fill both
|
614 |
|
|
pack .ddu.top8 -side top -fill both
|
615 |
|
|
|
616 |
|
|
label .ddu.top.opl -text "OpenRISC 1200 Debug Unit Configuration" -relief raised
|
617 |
|
|
pack .ddu.top.opl -side top -pady 5m -padx 10m
|
618 |
|
|
|
619 |
|
|
radiobutton .ddu.top2.imply -text y -variable DU_IMPLEMENTED -value 1
|
620 |
|
|
radiobutton .ddu.top2.impln -text n -variable DU_IMPLEMENTED -value 0
|
621 |
|
|
pack .ddu.top2.imply .ddu.top2.impln -side left
|
622 |
|
|
|
623 |
|
|
|
624 |
|
|
radiobutton .ddu.top3.hwby -text y -variable DU_HWBKPTS -value 1
|
625 |
|
|
radiobutton .ddu.top3.hwbn -text n -variable DU_HWBKPTS -value 0
|
626 |
|
|
pack .ddu.top3.hwby .ddu.top3.hwbn -side left
|
627 |
|
|
|
628 |
|
|
|
629 |
|
|
#Trace buffer option only if Virtex FPGA selected
|
630 |
|
|
|
631 |
|
|
if { $ASIC==0 && ( $targetFPGA=="XILINX_RAMB4" || $targetFPGA=="XILINX_RAM32x1D" ) } {
|
632 |
|
|
radiobutton .ddu.top4.tby -text y -variable DU_TB_IMPLEMENTED -value 1
|
633 |
|
|
radiobutton .ddu.top4.tbn -text n -variable DU_TB_IMPLEMENTED -value 0
|
634 |
|
|
pack .ddu.top4.tby .ddu.top4.tbn -side left
|
635 |
|
|
|
636 |
|
|
label .ddu.top4.bufl -text " Trace Buffer implemented (Only for Xilinx FPGA)"
|
637 |
|
|
pack .ddu.top4.bufl -side left
|
638 |
|
|
} else {
|
639 |
|
|
set DU_TB_IMPLEMENTED 0
|
640 |
|
|
}
|
641 |
|
|
|
642 |
|
|
radiobutton .ddu.top5.ready -text y -variable DU_READREGS -value 1
|
643 |
|
|
radiobutton .ddu.top5.readn -text n -variable DU_READREGS -value 0
|
644 |
|
|
pack .ddu.top5.ready .ddu.top5.readn -side left
|
645 |
|
|
|
646 |
|
|
radiobutton .ddu.top6.unusedy -text y -variable DU_UNUSED_ZERO -value 1
|
647 |
|
|
radiobutton .ddu.top6.unusedn -text n -variable DU_UNUSED_ZERO -value 0
|
648 |
|
|
pack .ddu.top6.unusedy .ddu.top6.unusedn -side left
|
649 |
|
|
|
650 |
|
|
radiobutton .ddu.top7.ifstaty -text y -variable DU_STATUS_UNIMPLEMENTED -value 1
|
651 |
|
|
radiobutton .ddu.top7.ifstatn -text n -variable DU_STATUS_UNIMPLEMENTED -value 0
|
652 |
|
|
pack .ddu.top7.ifstaty .ddu.top7.ifstatn -side left
|
653 |
|
|
|
654 |
|
|
|
655 |
|
|
label .ddu.top2.impll -text " Debug Unit Implemented"
|
656 |
|
|
label .ddu.top3.hwbl -text " Hardware breakpoints implemented"
|
657 |
|
|
label .ddu.top5.readl -text " Read DU registers is allowed"
|
658 |
|
|
label .ddu.top6.unusedl -text " Unused DU registers bits should be zero"
|
659 |
|
|
label .ddu.top7.ifstatl -text " IF/LSU status is not needed by devel I/F"
|
660 |
|
|
|
661 |
|
|
pack .ddu.top2.impll -side left
|
662 |
|
|
pack .ddu.top3.hwbl -side left
|
663 |
|
|
pack .ddu.top5.readl -side left
|
664 |
|
|
pack .ddu.top6.unusedl -side left
|
665 |
|
|
pack .ddu.top7.ifstatl -side left
|
666 |
|
|
|
667 |
|
|
|
668 |
|
|
frame .ddu.top8.left -relief raised -bd 1 -relief flat
|
669 |
|
|
frame .ddu.top8.right -relief raised -bd 1 -relief flat
|
670 |
|
|
|
671 |
|
|
pack .ddu.top8.left -side left -fill both
|
672 |
|
|
pack .ddu.top8.right -side right -fill both
|
673 |
|
|
|
674 |
|
|
button .ddu.top8.left.nextb -text "Next" -command { confPM }
|
675 |
|
|
button .ddu.top8.right.exitb -text "Exit" -command { destroy .ddu }
|
676 |
|
|
|
677 |
|
|
pack .ddu.top8.left.nextb -side top -padx 10m -pady 5m -fill x
|
678 |
|
|
pack .ddu.top8.right.exitb -side top -padx 10m -pady 5m -fill x
|
679 |
|
|
|
680 |
|
|
}
|
681 |
|
|
|
682 |
|
|
|
683 |
|
|
proc confPIC { } {
|
684 |
|
|
|
685 |
|
|
destroy .dpic
|
686 |
|
|
destroy .dpm
|
687 |
|
|
|
688 |
|
|
|
689 |
|
|
toplevel .dpic -class Dialog
|
690 |
|
|
wm title .dpic "PIC"
|
691 |
|
|
wm iconname .dpic Dialog
|
692 |
|
|
|
693 |
|
|
frame .dpic.top -relief raised -bd 1 -relief flat
|
694 |
|
|
frame .dpic.top2 -relief raised -bd 1 -relief groove
|
695 |
|
|
frame .dpic.top3 -relief raised -bd 1 -relief groove
|
696 |
|
|
frame .dpic.top4 -relief raised -bd 1 -relief groove
|
697 |
|
|
frame .dpic.top5 -relief raised -bd 1 -relief groove
|
698 |
|
|
frame .dpic.top6 -relief raised -bd 1 -relief groove
|
699 |
|
|
frame .dpic.top7 -relief raised -bd 1 -relief groove
|
700 |
|
|
frame .dpic.top8 -relief raised -bd 1 -relief groove
|
701 |
|
|
|
702 |
|
|
pack .dpic.top -side top -fill both
|
703 |
|
|
pack .dpic.top2 -side top -fill both
|
704 |
|
|
pack .dpic.top3 -side top -fill both
|
705 |
|
|
pack .dpic.top4 -side top -fill both
|
706 |
|
|
pack .dpic.top5 -side top -fill both
|
707 |
|
|
pack .dpic.top6 -side top -fill both
|
708 |
|
|
pack .dpic.top7 -side top -fill both
|
709 |
|
|
pack .dpic.top8 -side top -fill both
|
710 |
|
|
|
711 |
|
|
|
712 |
|
|
label .dpic.top.opl -text "OpenRISC 1200 PIC Configuration" -relief raised
|
713 |
|
|
pack .dpic.top.opl -side top -pady 5m -padx 10m
|
714 |
|
|
|
715 |
|
|
radiobutton .dpic.top2.imply -text y -variable PIC_IMPLEMENTED -value 1
|
716 |
|
|
radiobutton .dpic.top2.impln -text n -variable PIC_IMPLEMENTED -value 0
|
717 |
|
|
pack .dpic.top2.imply .dpic.top2.impln -side left
|
718 |
|
|
|
719 |
|
|
entry .dpic.top3.entry1 -width 3 -relief sunken -bd 2 -textvariable PIC_INTS
|
720 |
|
|
pack .dpic.top3.entry1 -side left
|
721 |
|
|
|
722 |
|
|
radiobutton .dpic.top4.ready -text y -variable PIC_READREGS -value 1
|
723 |
|
|
radiobutton .dpic.top4.readn -text n -variable PIC_READREGS -value 0
|
724 |
|
|
pack .dpic.top4.ready .dpic.top4.readn -side left
|
725 |
|
|
|
726 |
|
|
radiobutton .dpic.top5.unusedy -text y -variable PIC_UNUSED_ZERO -value 1
|
727 |
|
|
radiobutton .dpic.top5.unusedn -text n -variable PIC_UNUSED_ZERO -value 0
|
728 |
|
|
pack .dpic.top5.unusedy .dpic.top5.unusedn -side left
|
729 |
|
|
|
730 |
|
|
radiobutton .dpic.top6.mry -text y -variable PIC_PICMR -value 1
|
731 |
|
|
radiobutton .dpic.top6.mrn -text n -variable PIC_PICMR -value 0
|
732 |
|
|
pack .dpic.top6.mry .dpic.top6.mrn -side left
|
733 |
|
|
|
734 |
|
|
radiobutton .dpic.top7.sry -text y -variable PIC_PICSR -value 1
|
735 |
|
|
radiobutton .dpic.top7.srn -text n -variable PIC_PICSR -value 0
|
736 |
|
|
pack .dpic.top7.sry .dpic.top7.srn -side left
|
737 |
|
|
|
738 |
|
|
|
739 |
|
|
|
740 |
|
|
label .dpic.top2.impll -text " PIC Implemented"
|
741 |
|
|
label .dpic.top3.numl -text " Number of interrupt inputs (2-31)"
|
742 |
|
|
label .dpic.top4.unusedl -text " Read PIC registers is allowed"
|
743 |
|
|
label .dpic.top5.parl -text " Unused PIC bits should be zero"
|
744 |
|
|
label .dpic.top6.mrl -text " Implement PICMR register"
|
745 |
|
|
label .dpic.top7.srl -text " Implement PICSR register"
|
746 |
|
|
|
747 |
|
|
pack .dpic.top2.impll -side left
|
748 |
|
|
pack .dpic.top3.numl -side left
|
749 |
|
|
pack .dpic.top4.unusedl -side left
|
750 |
|
|
pack .dpic.top5.parl -side left
|
751 |
|
|
pack .dpic.top6.mrl -side left
|
752 |
|
|
pack .dpic.top7.srl -side left
|
753 |
|
|
|
754 |
|
|
frame .dpic.top8.left -relief raised -bd 1 -relief flat
|
755 |
|
|
frame .dpic.top8.right -relief raised -bd 1 -relief flat
|
756 |
|
|
|
757 |
|
|
pack .dpic.top8.left -side left -fill both
|
758 |
|
|
pack .dpic.top8.right -side right -fill both
|
759 |
|
|
|
760 |
|
|
button .dpic.top8.left.nextb -text "Next" -command { confTT }
|
761 |
|
|
button .dpic.top8.right.exitb -text "Exit" -command { destroy .dpic }
|
762 |
|
|
|
763 |
|
|
pack .dpic.top8.left.nextb -side top -padx 10m -pady 5m -fill x
|
764 |
|
|
pack .dpic.top8.right.exitb -side top -padx 10m -pady 5m -fill x
|
765 |
|
|
|
766 |
|
|
}
|
767 |
|
|
|
768 |
|
|
|
769 |
|
|
proc confTT { } {
|
770 |
|
|
|
771 |
|
|
destroy .dpic
|
772 |
|
|
destroy .dtt
|
773 |
|
|
|
774 |
|
|
toplevel .dtt -class Dialog
|
775 |
|
|
wm title .dtt "Tick Timer"
|
776 |
|
|
wm iconname .dtt Dialog
|
777 |
|
|
|
778 |
|
|
frame .dtt.top -relief raised -bd 1 -relief flat
|
779 |
|
|
frame .dtt.top2 -relief raised -bd 1 -relief groove
|
780 |
|
|
frame .dtt.top3 -relief raised -bd 1 -relief groove
|
781 |
|
|
frame .dtt.top4 -relief raised -bd 1 -relief groove
|
782 |
|
|
frame .dtt.top5 -relief raised -bd 1 -relief groove
|
783 |
|
|
frame .dtt.top6 -relief raised -bd 1 -relief groove
|
784 |
|
|
|
785 |
|
|
pack .dtt.top -side top -fill both
|
786 |
|
|
pack .dtt.top2 -side top -fill both
|
787 |
|
|
pack .dtt.top3 -side top -fill both
|
788 |
|
|
pack .dtt.top4 -side top -fill both
|
789 |
|
|
pack .dtt.top5 -side top -fill both
|
790 |
|
|
pack .dtt.top6 -side top -fill both
|
791 |
|
|
|
792 |
|
|
|
793 |
|
|
label .dtt.top.opl -text "OpenRISC 1200 Tick Timer Configuration" -relief raised
|
794 |
|
|
pack .dtt.top.opl -side top -pady 5m -padx 10m
|
795 |
|
|
|
796 |
|
|
radiobutton .dtt.top2.imply -text y -variable TT_IMPLEMENTED -value 1
|
797 |
|
|
radiobutton .dtt.top2.impln -text n -variable TT_IMPLEMENTED -value 0
|
798 |
|
|
pack .dtt.top2.imply .dtt.top2.impln -side left
|
799 |
|
|
|
800 |
|
|
radiobutton .dtt.top3.mry -text y -variable TT_TTMR -value 1
|
801 |
|
|
radiobutton .dtt.top3.mrn -text n -variable TT_TTMR -value 0
|
802 |
|
|
pack .dtt.top3.mry .dtt.top3.mrn -side left
|
803 |
|
|
|
804 |
|
|
radiobutton .dtt.top4.sry -text y -variable TT_TTSR -value 1
|
805 |
|
|
radiobutton .dtt.top4.srn -text n -variable TT_TTSR -value 0
|
806 |
|
|
pack .dtt.top4.sry .dtt.top4.srn -side left
|
807 |
|
|
|
808 |
|
|
radiobutton .dtt.top5.ready -text y -variable TT_READREGS -value 1
|
809 |
|
|
radiobutton .dtt.top5.readn -text n -variable TT_READREGS -value 0
|
810 |
|
|
pack .dtt.top5.ready .dtt.top5.readn -side left
|
811 |
|
|
|
812 |
|
|
|
813 |
|
|
|
814 |
|
|
label .dtt.top2.impll -text " Tick Timer Implemented"
|
815 |
|
|
label .dtt.top3.mrl -text " Implement TTMR register"
|
816 |
|
|
label .dtt.top4.srl -text " Implement TTSR register"
|
817 |
|
|
label .dtt.top5.readl -text " Read TT registers is allowed"
|
818 |
|
|
|
819 |
|
|
pack .dtt.top2.impll -side left
|
820 |
|
|
pack .dtt.top3.mrl -side left
|
821 |
|
|
pack .dtt.top4.srl -side left
|
822 |
|
|
pack .dtt.top5.readl -side left
|
823 |
|
|
|
824 |
|
|
|
825 |
|
|
frame .dtt.top6.left -relief raised -bd 1 -relief flat
|
826 |
|
|
frame .dtt.top6.right -relief raised -bd 1 -relief flat
|
827 |
|
|
|
828 |
|
|
pack .dtt.top6.left -side left -fill both
|
829 |
|
|
pack .dtt.top6.right -side right -fill both
|
830 |
|
|
|
831 |
|
|
button .dtt.top6.left.nextb -text "Next" -command { confQM }
|
832 |
|
|
button .dtt.top6.right.exitb -text "Exit" -command { destroy .dtt }
|
833 |
|
|
|
834 |
|
|
pack .dtt.top6.left.nextb -side top -padx 10m -pady 5m -fill x
|
835 |
|
|
pack .dtt.top6.right.exitb -side top -padx 10m -pady 5m -fill x
|
836 |
|
|
|
837 |
|
|
}
|
838 |
|
|
|
839 |
|
|
proc confIC { } {
|
840 |
|
|
|
841 |
|
|
global IC_WAYS
|
842 |
|
|
global IC_SIZE
|
843 |
|
|
global ICLS
|
844 |
|
|
|
845 |
|
|
destroy .diu
|
846 |
|
|
destroy .dic
|
847 |
|
|
|
848 |
|
|
toplevel .dic -class Dialog
|
849 |
|
|
wm title .dic "Instruction Cache"
|
850 |
|
|
wm iconname .dic Dialog
|
851 |
|
|
|
852 |
|
|
frame .dic.top -relief raised -bd 1 -relief flat
|
853 |
|
|
frame .dic.top2 -relief raised -bd 1 -relief groove
|
854 |
|
|
frame .dic.top3 -relief raised -bd 1 -relief groove
|
855 |
|
|
frame .dic.top4 -relief raised -bd 1 -relief groove
|
856 |
|
|
frame .dic.top5 -relief raised -bd 1 -relief groove
|
857 |
|
|
frame .dic.top6 -relief raised -bd 1 -relief groove
|
858 |
|
|
|
859 |
|
|
pack .dic.top -side top -fill both
|
860 |
|
|
pack .dic.top2 -side top -fill both
|
861 |
|
|
pack .dic.top3 -side top -fill both
|
862 |
|
|
pack .dic.top4 -side top -fill both
|
863 |
|
|
pack .dic.top5 -side top -fill both
|
864 |
|
|
pack .dic.top6 -side top -fill both
|
865 |
|
|
|
866 |
|
|
|
867 |
|
|
label .dic.top.opl -text "OpenRISC 1200 Instruction Cache Configuration" -relief raised
|
868 |
|
|
pack .dic.top.opl -side top -pady 5m -padx 10m
|
869 |
|
|
|
870 |
|
|
radiobutton .dic.top2.imply -text y -variable NO_IC -value 0
|
871 |
|
|
radiobutton .dic.top2.impln -text n -variable NO_IC -value 1
|
872 |
|
|
pack .dic.top2.imply .dic.top2.impln -side left
|
873 |
|
|
|
874 |
|
|
menubutton .dic.top3.ways -text Ways -menu .dic.top3.ways.menu -relief raised
|
875 |
|
|
pack .dic.top3.ways -side left -fill both
|
876 |
|
|
menu .dic.top3.ways.menu
|
877 |
|
|
.dic.top3.ways.menu add radiobutton -label "1" -variable IC_WAYS -value 1
|
878 |
|
|
tk_menuBar .dic.top3.ways
|
879 |
|
|
|
880 |
|
|
menubutton .dic.top4.size -text Size -menu .dic.top4.size.menu -relief raised
|
881 |
|
|
pack .dic.top4.size -side left -fill both
|
882 |
|
|
menu .dic.top4.size.menu
|
883 |
|
|
.dic.top4.size.menu add radiobutton -label "512B" -variable IC_SIZE -value 512B
|
884 |
|
|
.dic.top4.size.menu add radiobutton -label "4KB" -variable IC_SIZE -value 4KB
|
885 |
|
|
.dic.top4.size.menu add radiobutton -label "8KB" -variable IC_SIZE -value 8KB
|
886 |
|
|
|
887 |
|
|
tk_menuBar .dic.top4.size
|
888 |
|
|
|
889 |
|
|
menubutton .dic.top5.lcls -text "Line Size" -menu .dic.top5.lcls.menu -relief raised
|
890 |
|
|
pack .dic.top5.lcls -side left -fill both
|
891 |
|
|
menu .dic.top5.lcls.menu
|
892 |
|
|
.dic.top5.lcls.menu add radiobutton -label "8" -variable ICLS -value 8
|
893 |
|
|
.dic.top5.lcls.menu add radiobutton -label "16" -variable ICLS -value 16
|
894 |
|
|
|
895 |
|
|
tk_menuBar .dic.top5.lcls
|
896 |
|
|
|
897 |
|
|
|
898 |
|
|
|
899 |
|
|
|
900 |
|
|
label .dic.top2.impll -text " Instruction Cache Implemented"
|
901 |
|
|
label .dic.top3.wayl -text " Instruction Cache Ways"
|
902 |
|
|
label .dic.top4.sizel -text " Instruction Cache Size"
|
903 |
|
|
label .dic.top5.lclsl -text " Instruction Cache Line Size in bytes"
|
904 |
|
|
|
905 |
|
|
pack .dic.top2.impll -side left
|
906 |
|
|
pack .dic.top3.wayl -side left
|
907 |
|
|
pack .dic.top4.sizel -side left
|
908 |
|
|
pack .dic.top5.lclsl -side left
|
909 |
|
|
|
910 |
|
|
frame .dic.top6.left -relief raised -bd 1 -relief flat
|
911 |
|
|
frame .dic.top6.right -relief raised -bd 1 -relief flat
|
912 |
|
|
|
913 |
|
|
pack .dic.top6.left -side left -fill both
|
914 |
|
|
pack .dic.top6.right -side right -fill both
|
915 |
|
|
|
916 |
|
|
button .dic.top6.left.nextb -text "Next" -command { confDC }
|
917 |
|
|
button .dic.top6.right.exitb -text "Exit" -command { destroy .dic }
|
918 |
|
|
|
919 |
|
|
pack .dic.top6.left.nextb -side top -padx 10m -pady 5m -fill x
|
920 |
|
|
pack .dic.top6.right.exitb -side top -padx 10m -pady 5m -fill x
|
921 |
|
|
|
922 |
|
|
}
|
923 |
|
|
|
924 |
|
|
proc confDC { } {
|
925 |
|
|
|
926 |
|
|
global DC_WAYS
|
927 |
|
|
global DC_SIZE
|
928 |
|
|
global DCLS
|
929 |
|
|
|
930 |
|
|
destroy .ddc
|
931 |
|
|
destroy .dic
|
932 |
|
|
|
933 |
|
|
toplevel .ddc -class Dialog
|
934 |
|
|
wm title .ddc "Data Cache"
|
935 |
|
|
wm iconname .ddc Dialog
|
936 |
|
|
|
937 |
|
|
frame .ddc.top -relief raised -bd 1 -relief flat
|
938 |
|
|
frame .ddc.top2 -relief raised -bd 1 -relief groove
|
939 |
|
|
frame .ddc.top3 -relief raised -bd 1 -relief groove
|
940 |
|
|
frame .ddc.top4 -relief raised -bd 1 -relief groove
|
941 |
|
|
frame .ddc.top5 -relief raised -bd 1 -relief groove
|
942 |
|
|
frame .ddc.top6 -relief raised -bd 1 -relief groove
|
943 |
|
|
frame .ddc.top7 -relief raised -bd 1 -relief groove
|
944 |
|
|
frame .ddc.top8 -relief raised -bd 1 -relief groove
|
945 |
|
|
frame .ddc.top9 -relief raised -bd 1 -relief groove
|
946 |
|
|
frame .ddc.top10 -relief raised -bd 1 -relief groove
|
947 |
|
|
|
948 |
|
|
|
949 |
|
|
pack .ddc.top -side top -fill both
|
950 |
|
|
pack .ddc.top2 -side top -fill both
|
951 |
|
|
pack .ddc.top3 -side top -fill both
|
952 |
|
|
pack .ddc.top4 -side top -fill both
|
953 |
|
|
pack .ddc.top5 -side top -fill both
|
954 |
|
|
pack .ddc.top6 -side top -fill both
|
955 |
|
|
pack .ddc.top7 -side top -fill both
|
956 |
|
|
pack .ddc.top8 -side top -fill both
|
957 |
|
|
pack .ddc.top9 -side top -fill both
|
958 |
|
|
pack .ddc.top10 -side top -fill both
|
959 |
|
|
|
960 |
|
|
label .ddc.top.opl -text "OpenRISC 1200 Data Cache Configuration" -relief raised
|
961 |
|
|
pack .ddc.top.opl -side top -pady 5m -padx 10m
|
962 |
|
|
|
963 |
|
|
radiobutton .ddc.top2.imply -text y -variable NO_DC -value 0
|
964 |
|
|
radiobutton .ddc.top2.impln -text n -variable NO_DC -value 1
|
965 |
|
|
pack .ddc.top2.imply .ddc.top2.impln -side left
|
966 |
|
|
|
967 |
|
|
menubutton .ddc.top3.ways -text Ways -menu .ddc.top3.ways.menu -relief raised
|
968 |
|
|
pack .ddc.top3.ways -side left -fill both
|
969 |
|
|
menu .ddc.top3.ways.menu
|
970 |
|
|
.ddc.top3.ways.menu add radiobutton -label "1" -variable DC_WAYS -value 1
|
971 |
|
|
tk_menuBar .ddc.top3.ways
|
972 |
|
|
|
973 |
|
|
menubutton .ddc.top4.size -text Size -menu .ddc.top4.size.menu -relief raised
|
974 |
|
|
pack .ddc.top4.size -side left -fill both
|
975 |
|
|
menu .ddc.top4.size.menu
|
976 |
|
|
.ddc.top4.size.menu add radiobutton -label "4KB" -variable DC_SIZE -value 4KB
|
977 |
|
|
.ddc.top4.size.menu add radiobutton -label "8KB" -variable DC_SIZE -value 8KB
|
978 |
|
|
|
979 |
|
|
tk_menuBar .ddc.top4.size
|
980 |
|
|
|
981 |
|
|
menubutton .ddc.top5.lcls -text "Line Size" -menu .ddc.top5.lcls.menu -relief raised
|
982 |
|
|
pack .ddc.top5.lcls -side left -fill both
|
983 |
|
|
menu .ddc.top5.lcls.menu
|
984 |
|
|
.ddc.top5.lcls.menu add radiobutton -label "8" -variable DCLS -value 8
|
985 |
|
|
.ddc.top5.lcls.menu add radiobutton -label "16" -variable DCLS -value 16
|
986 |
|
|
|
987 |
|
|
tk_menuBar .ddc.top5.lcls
|
988 |
|
|
|
989 |
|
|
label .ddc.top6.opl -text "OpenRISC 1200 Store Buffer Configuration" -relief raised
|
990 |
|
|
pack .ddc.top6.opl -side top -pady 5m -padx 10m
|
991 |
|
|
|
992 |
|
|
radiobutton .ddc.top7.imply -text y -variable SB_IMPLEMENTED -value 1
|
993 |
|
|
radiobutton .ddc.top7.impln -text n -variable SB_IMPLEMENTED -value 0
|
994 |
|
|
pack .ddc.top7.imply .ddc.top7.impln -side left
|
995 |
|
|
|
996 |
|
|
menubutton .ddc.top8.sbs -text "Store Buffer Size" -menu .ddc.top8.sbs.menu -relief raised
|
997 |
|
|
pack .ddc.top8.sbs -side left -fill both
|
998 |
|
|
menu .ddc.top8.sbs.menu
|
999 |
|
|
.ddc.top8.sbs.menu add radiobutton -label "4" -variable SB_ENTRIES -value 4 -command { set SB_LOG 2 }
|
1000 |
|
|
.ddc.top8.sbs.menu add radiobutton -label "8" -variable SB_ENTRIES -value 8 -command { set SB_LOG 3 }
|
1001 |
|
|
|
1002 |
|
|
tk_menuBar .ddc.top8.sbs
|
1003 |
|
|
|
1004 |
|
|
|
1005 |
|
|
|
1006 |
|
|
label .ddc.top2.impll -text " Data Cache Implemented"
|
1007 |
|
|
label .ddc.top3.wayl -text " Data Cache Ways"
|
1008 |
|
|
label .ddc.top4.sizel -text " Data Cache Size"
|
1009 |
|
|
label .ddc.top5.lclsl -text " Data Cache Line Size in bytes"
|
1010 |
|
|
label .ddc.top7.impl -text " Enable Store Buffer"
|
1011 |
|
|
label .ddc.top8.sbel -text " Store Buffer Entries"
|
1012 |
|
|
|
1013 |
|
|
pack .ddc.top2.impll -side left
|
1014 |
|
|
pack .ddc.top3.wayl -side left
|
1015 |
|
|
pack .ddc.top4.sizel -side left
|
1016 |
|
|
pack .ddc.top5.lclsl -side left
|
1017 |
|
|
pack .ddc.top7.impl -side left
|
1018 |
|
|
pack .ddc.top8.sbel -side left
|
1019 |
|
|
|
1020 |
|
|
frame .ddc.top10.left -relief raised -bd 1 -relief flat
|
1021 |
|
|
frame .ddc.top10.right -relief raised -bd 1 -relief flat
|
1022 |
|
|
|
1023 |
|
|
pack .ddc.top10.left -side left -fill both
|
1024 |
|
|
pack .ddc.top10.right -side right -fill both
|
1025 |
|
|
|
1026 |
|
|
button .ddc.top10.left.nextb -text "Next" -command { confMMU }
|
1027 |
|
|
button .ddc.top10.right.exitb -text "Exit" -command { destroy .ddc }
|
1028 |
|
|
|
1029 |
|
|
pack .ddc.top10.left.nextb -side top -padx 10m -pady 5m -fill x
|
1030 |
|
|
pack .ddc.top10.right.exitb -side top -padx 10m -pady 5m -fill x
|
1031 |
|
|
|
1032 |
|
|
}
|
1033 |
|
|
|
1034 |
|
|
proc confQM { } {
|
1035 |
|
|
|
1036 |
|
|
destroy .dqm
|
1037 |
|
|
destroy .dtt
|
1038 |
|
|
|
1039 |
|
|
toplevel .dqm -class Dialog
|
1040 |
|
|
wm title .dqm "Quick Embedded Memory"
|
1041 |
|
|
wm iconname .dqm Dialog
|
1042 |
|
|
|
1043 |
|
|
frame .dqm.top -relief raised -bd 1 -relief flat
|
1044 |
|
|
frame .dqm.top2 -relief raised -bd 1 -relief groove
|
1045 |
|
|
frame .dqm.top3 -relief raised -bd 1 -relief groove
|
1046 |
|
|
frame .dqm.top4 -relief raised -bd 1 -relief groove
|
1047 |
|
|
frame .dqm.top6 -relief raised -bd 1 -relief groove
|
1048 |
|
|
|
1049 |
|
|
pack .dqm.top -side top -fill both
|
1050 |
|
|
pack .dqm.top2 -side top -fill both
|
1051 |
|
|
pack .dqm.top3 -side top -fill both
|
1052 |
|
|
pack .dqm.top4 -side top -fill both
|
1053 |
|
|
pack .dqm.top6 -side top -fill both
|
1054 |
|
|
|
1055 |
|
|
|
1056 |
|
|
label .dqm.top.opl -text "OpenRISC 1200 Quick Embedded Memory Configuration" -relief raised
|
1057 |
|
|
pack .dqm.top.opl -side top -pady 5m -padx 10m
|
1058 |
|
|
|
1059 |
|
|
radiobutton .dqm.top2.imply -text y -variable QMEM_IMPLEMENTED -value 1
|
1060 |
|
|
radiobutton .dqm.top2.impln -text n -variable QMEM_IMPLEMENTED -value 0
|
1061 |
|
|
pack .dqm.top2.imply .dqm.top2.impln -side left
|
1062 |
|
|
|
1063 |
|
|
radiobutton .dqm.top3.sely -text y -variable QMEM_BSEL -value 1
|
1064 |
|
|
radiobutton .dqm.top3.seln -text n -variable QMEM_BSEL -value 0
|
1065 |
|
|
pack .dqm.top3.sely .dqm.top3.seln -side left
|
1066 |
|
|
|
1067 |
|
|
radiobutton .dqm.top4.acky -text y -variable QMEM_ACK -value 1
|
1068 |
|
|
radiobutton .dqm.top4.ackn -text n -variable QMEM_ACK -value 0
|
1069 |
|
|
pack .dqm.top4.acky .dqm.top4.ackn -side left
|
1070 |
|
|
|
1071 |
|
|
|
1072 |
|
|
label .dqm.top2.impll -text " Implement Quick Embedded Memory"
|
1073 |
|
|
label .dqm.top3.sell -text " Enable qmem_sel* ports"
|
1074 |
|
|
label .dqm.top4.ackl -text " Enable qmem_ack port"
|
1075 |
|
|
|
1076 |
|
|
pack .dqm.top2.impll -side left
|
1077 |
|
|
pack .dqm.top3.sell -side left
|
1078 |
|
|
pack .dqm.top4.ackl -side left
|
1079 |
|
|
|
1080 |
|
|
frame .dqm.top6.left -relief raised -bd 1 -relief flat
|
1081 |
|
|
frame .dqm.top6.right -relief raised -bd 1 -relief flat
|
1082 |
|
|
|
1083 |
|
|
pack .dqm.top6.left -side left -fill both
|
1084 |
|
|
pack .dqm.top6.right -side right -fill both
|
1085 |
|
|
|
1086 |
|
|
button .dqm.top6.left.nextb -text "Next" -command { confMISC }
|
1087 |
|
|
button .dqm.top6.right.exitb -text "Exit" -command { destroy .dqm }
|
1088 |
|
|
|
1089 |
|
|
pack .dqm.top6.left.nextb -side top -padx 10m -pady 5m -fill x
|
1090 |
|
|
pack .dqm.top6.right.exitb -side top -padx 10m -pady 5m -fill x
|
1091 |
|
|
|
1092 |
|
|
}
|
1093 |
|
|
|
1094 |
|
|
proc confMMU { } {
|
1095 |
|
|
|
1096 |
|
|
destroy .dmu
|
1097 |
|
|
destroy .ddc
|
1098 |
|
|
|
1099 |
|
|
toplevel .dmu -class Dialog
|
1100 |
|
|
wm title .dmu "MMU"
|
1101 |
|
|
wm iconname .dmu Dialog
|
1102 |
|
|
|
1103 |
|
|
frame .dmu.top -relief raised -bd 1 -relief flat
|
1104 |
|
|
frame .dmu.top2 -relief raised -bd 1 -relief groove
|
1105 |
|
|
frame .dmu.top3 -relief raised -bd 1 -relief groove
|
1106 |
|
|
frame .dmu.top6 -relief raised -bd 1 -relief groove
|
1107 |
|
|
|
1108 |
|
|
pack .dmu.top -side top -fill both
|
1109 |
|
|
pack .dmu.top2 -side top -fill both
|
1110 |
|
|
pack .dmu.top3 -side top -fill both
|
1111 |
|
|
pack .dmu.top6 -side top -fill both
|
1112 |
|
|
|
1113 |
|
|
|
1114 |
|
|
label .dmu.top.opl -text "OpenRISC 1200 MMU Configuration" -relief raised
|
1115 |
|
|
pack .dmu.top.opl -side top -pady 5m -padx 10m
|
1116 |
|
|
|
1117 |
|
|
radiobutton .dmu.top2.imply -text y -variable NO_IMMU -value 0
|
1118 |
|
|
radiobutton .dmu.top2.impln -text n -variable NO_IMMU -value 1
|
1119 |
|
|
pack .dmu.top2.imply .dmu.top2.impln -side left
|
1120 |
|
|
|
1121 |
|
|
|
1122 |
|
|
radiobutton .dmu.top3.imply -text y -variable NO_DMMU -value 0
|
1123 |
|
|
radiobutton .dmu.top3.impln -text n -variable NO_DMMU -value 1
|
1124 |
|
|
pack .dmu.top3.imply .dmu.top3.impln -side left
|
1125 |
|
|
|
1126 |
|
|
|
1127 |
|
|
label .dmu.top2.impll -text " Implement Instruction MMU"
|
1128 |
|
|
label .dmu.top3.impll -text " Implement Data MMU"
|
1129 |
|
|
|
1130 |
|
|
pack .dmu.top2.impll -side left
|
1131 |
|
|
pack .dmu.top3.impll -side left
|
1132 |
|
|
|
1133 |
|
|
|
1134 |
|
|
frame .dmu.top6.left -relief raised -bd 1 -relief flat
|
1135 |
|
|
frame .dmu.top6.right -relief raised -bd 1 -relief flat
|
1136 |
|
|
|
1137 |
|
|
pack .dmu.top6.left -side left -fill both
|
1138 |
|
|
pack .dmu.top6.right -side right -fill both
|
1139 |
|
|
|
1140 |
|
|
button .dmu.top6.left.nextb -text "Next" -command { confDU }
|
1141 |
|
|
button .dmu.top6.right.exitb -text "Exit" -command { destroy .dmu }
|
1142 |
|
|
|
1143 |
|
|
pack .dmu.top6.left.nextb -side top -padx 10m -pady 5m -fill x
|
1144 |
|
|
pack .dmu.top6.right.exitb -side top -padx 10m -pady 5m -fill x
|
1145 |
|
|
|
1146 |
|
|
}
|
1147 |
|
|
|
1148 |
|
|
proc confMISC { } {
|
1149 |
|
|
|
1150 |
|
|
destroy .dmi
|
1151 |
|
|
destroy .dqm
|
1152 |
|
|
|
1153 |
|
|
toplevel .dmi -class Dialog
|
1154 |
|
|
wm title .dmi "Misc"
|
1155 |
|
|
wm iconname .dmi Dialog
|
1156 |
|
|
|
1157 |
|
|
frame .dmi.top -relief raised -bd 1 -relief flat
|
1158 |
|
|
frame .dmi.top2 -relief raised -bd 1 -relief groove
|
1159 |
|
|
frame .dmi.top3 -relief raised -bd 1 -relief groove
|
1160 |
|
|
frame .dmi.top4 -relief raised -bd 1 -relief groove
|
1161 |
|
|
frame .dmi.top5 -relief raised -bd 1 -relief groove
|
1162 |
|
|
frame .dmi.top6 -relief raised -bd 1 -relief groove
|
1163 |
|
|
|
1164 |
|
|
pack .dmi.top -side top -fill both
|
1165 |
|
|
pack .dmi.top2 -side top -fill both
|
1166 |
|
|
pack .dmi.top3 -side top -fill both
|
1167 |
|
|
pack .dmi.top4 -side top -fill both
|
1168 |
|
|
pack .dmi.top5 -side top -fill both
|
1169 |
|
|
pack .dmi.top6 -side top -fill both
|
1170 |
|
|
|
1171 |
|
|
|
1172 |
|
|
label .dmi.top.opl -text "OpenRISC 1200 Miscellaneous Configuration" -relief raised
|
1173 |
|
|
pack .dmi.top.opl -side top -pady 5m -padx 10m
|
1174 |
|
|
|
1175 |
|
|
radiobutton .dmi.top2.imply -text y -variable MAC_IMPLEMENTED -value 1
|
1176 |
|
|
radiobutton .dmi.top2.impln -text n -variable MAC_IMPLEMENTED -value 0
|
1177 |
|
|
pack .dmi.top2.imply .dmi.top2.impln -side left
|
1178 |
|
|
|
1179 |
|
|
radiobutton .dmi.top3.macwey -text y -variable MAC_SPR_WE -value 1
|
1180 |
|
|
radiobutton .dmi.top3.macwen -text n -variable MAC_SPR_WE -value 0
|
1181 |
|
|
pack .dmi.top3.macwey .dmi.top3.macwen -side left
|
1182 |
|
|
|
1183 |
|
|
radiobutton .dmi.top4.imply -text y -variable CFGR_IMPLEMENTED -value 1
|
1184 |
|
|
radiobutton .dmi.top4.impln -text n -variable CFGR_IMPLEMENTED -value 0
|
1185 |
|
|
pack .dmi.top4.imply .dmi.top4.impln -side left
|
1186 |
|
|
|
1187 |
|
|
radiobutton .dmi.top5.sysy -text y -variable SYS_FULL_DECODE -value 1
|
1188 |
|
|
radiobutton .dmi.top5.sysn -text n -variable SYS_FULL_DECODE -value 0
|
1189 |
|
|
pack .dmi.top5.sysy .dmi.top5.sysn -side left
|
1190 |
|
|
|
1191 |
|
|
|
1192 |
|
|
label .dmi.top2.impll -text " Implement Multiply and Accumulate (MAC) Unit"
|
1193 |
|
|
label .dmi.top3.macwel -text " MACLO/MACHI registers are writable"
|
1194 |
|
|
label .dmi.top4.impll -text " Implement configuration registers"
|
1195 |
|
|
label .dmi.top5.sysl -text " Full address decode inside SYS group"
|
1196 |
|
|
|
1197 |
|
|
pack .dmi.top2.impll -side left
|
1198 |
|
|
pack .dmi.top3.macwel -side left
|
1199 |
|
|
pack .dmi.top4.impll -side left
|
1200 |
|
|
pack .dmi.top5.sysl -side left
|
1201 |
|
|
|
1202 |
|
|
frame .dmi.top6.left -relief raised -bd 1 -relief flat
|
1203 |
|
|
frame .dmi.top6.right -relief raised -bd 1 -relief flat
|
1204 |
|
|
|
1205 |
|
|
pack .dmi.top6.left -side left -fill both
|
1206 |
|
|
pack .dmi.top6.right -side right -fill both
|
1207 |
|
|
|
1208 |
|
|
button .dmi.top6.left.nextb -text "Next" -command { confIU }
|
1209 |
|
|
button .dmi.top6.right.exitb -text "Exit" -command { destroy .dmi }
|
1210 |
|
|
|
1211 |
|
|
pack .dmi.top6.left.nextb -side top -padx 10m -pady 5m -fill x
|
1212 |
|
|
pack .dmi.top6.right.exitb -side top -padx 10m -pady 5m -fill x
|
1213 |
|
|
|
1214 |
|
|
}
|
1215 |
|
|
|
1216 |
|
|
|
1217 |
|
|
proc saveconfdialog { } {
|
1218 |
|
|
|
1219 |
|
|
destroy .dsaveconf
|
1220 |
|
|
|
1221 |
|
|
toplevel .dsaveconf -class Dialog
|
1222 |
|
|
wm title .dsaveconf "Save Configuration"
|
1223 |
|
|
wm iconname .dsaveconf Dialog
|
1224 |
|
|
frame .dsaveconf.top -relief raised -bd 1
|
1225 |
|
|
pack .dsaveconf.top -side top -fill both
|
1226 |
|
|
frame .dsaveconf.bot -relief raised -bd 1
|
1227 |
|
|
pack .dsaveconf.bot -side top -fill both
|
1228 |
|
|
|
1229 |
|
|
|
1230 |
|
|
label .dsaveconf.top.fn -text "Enter Filename" -relief raised
|
1231 |
|
|
pack .dsaveconf.top.fn -side left -pady 5m -padx 10m
|
1232 |
|
|
|
1233 |
|
|
entry .dsaveconf.top.entry1 -width 20 -relief sunken -bd 2 -textvariable savefilename
|
1234 |
|
|
pack .dsaveconf.top.entry1 -side left -pady 5m -padx 10m
|
1235 |
|
|
|
1236 |
|
|
frame .dsaveconf.bot.left -relief raised -bd 1 -relief flat
|
1237 |
|
|
frame .dsaveconf.bot.right -relief raised -bd 1 -relief flat
|
1238 |
|
|
|
1239 |
|
|
pack .dsaveconf.bot.left -side left -fill both
|
1240 |
|
|
pack .dsaveconf.bot.right -side right -fill both
|
1241 |
|
|
|
1242 |
|
|
button .dsaveconf.bot.left.okb -text "OK" -command { saveconf $savefilename }
|
1243 |
|
|
button .dsaveconf.bot.right.cancelb -text "Cancel" -command { destroy .dsaveconf }
|
1244 |
|
|
|
1245 |
|
|
pack .dsaveconf.bot.left.okb -side top -padx 10m -pady 5m -fill x
|
1246 |
|
|
pack .dsaveconf.bot.right.cancelb -side top -padx 10m -pady 5m -fill x
|
1247 |
|
|
|
1248 |
|
|
|
1249 |
|
|
}
|
1250 |
|
|
|
1251 |
|
|
proc saveconf { file } {
|
1252 |
|
|
|
1253 |
|
|
global ASIC
|
1254 |
|
|
global VCD_DUMP
|
1255 |
|
|
global VERBOSE
|
1256 |
|
|
global targetFPGA
|
1257 |
|
|
global targetASIC
|
1258 |
|
|
global ASIC_MULTP2_32X32
|
1259 |
|
|
global BIST
|
1260 |
|
|
global RF_RAM
|
1261 |
|
|
#Wishbone defines
|
1262 |
|
|
global REGISTERED_OUTPUTS
|
1263 |
|
|
global REGISTERED_INPUTS
|
1264 |
|
|
global NO_BURSTS
|
1265 |
|
|
global WB_RETRY
|
1266 |
|
|
global WB_CAB
|
1267 |
|
|
global WB_B3
|
1268 |
|
|
global CLKDIV2_SUPPORT
|
1269 |
|
|
global CLKDIV4_SUPPORT
|
1270 |
|
|
#Misc
|
1271 |
|
|
global ADDITIONAL_SYNOPSYS_DIRECTIVES
|
1272 |
|
|
global CASE_DEFAULT
|
1273 |
|
|
global IMPL_MEM2REG
|
1274 |
|
|
#IU defines
|
1275 |
|
|
global SR_EPH_DEF
|
1276 |
|
|
global IMPL_ADDC
|
1277 |
|
|
global IMPL_CY
|
1278 |
|
|
global ADDITIONAL_FLAG_MODIFIERS
|
1279 |
|
|
global IMPL_DIV
|
1280 |
|
|
global IMPL_ALU_ROTATE
|
1281 |
|
|
global MULT_IMPLEMENTED
|
1282 |
|
|
global LWPWR_MULT
|
1283 |
|
|
global ALU_COMP
|
1284 |
|
|
#PM defines
|
1285 |
|
|
global PM_IMPLEMENTED
|
1286 |
|
|
global PM_READREGS
|
1287 |
|
|
global PM_UNUSED_ZERO
|
1288 |
|
|
global PM_PARTIAL_DECODING
|
1289 |
|
|
#DU defines
|
1290 |
|
|
global DU_IMPLEMENTED
|
1291 |
|
|
global DU_HWBKPTS
|
1292 |
|
|
global DU_TB_IMPLEMENTED
|
1293 |
|
|
global DU_READREGS
|
1294 |
|
|
global DU_UNUSED_ZERO
|
1295 |
|
|
global DU_STATUS_UNIMPLEMENTED
|
1296 |
|
|
#PIC defines
|
1297 |
|
|
global PIC_IMPLEMENTED
|
1298 |
|
|
global PIC_READREGS
|
1299 |
|
|
global PIC_UNUSED_ZERO
|
1300 |
|
|
global PIC_PICMR
|
1301 |
|
|
global PIC_PICSR
|
1302 |
|
|
global PIC_INTS
|
1303 |
|
|
#TT defines
|
1304 |
|
|
global TT_IMPLEMENTED
|
1305 |
|
|
global TT_TTMR
|
1306 |
|
|
global TT_TTSR
|
1307 |
|
|
global TT_READREGS
|
1308 |
|
|
#IC CACHES
|
1309 |
|
|
global NO_IC
|
1310 |
|
|
global IC_WAYS
|
1311 |
|
|
global IC_SIZE
|
1312 |
|
|
global ICLS
|
1313 |
|
|
#DC defines
|
1314 |
|
|
global NO_DC
|
1315 |
|
|
global DC_WAYS
|
1316 |
|
|
global DC_SIZE
|
1317 |
|
|
global DCLS
|
1318 |
|
|
global SB_IMPLEMENTED
|
1319 |
|
|
global SB_ENTRIES
|
1320 |
|
|
global SB_LOG
|
1321 |
|
|
#MMU defines
|
1322 |
|
|
global NO_IMMU
|
1323 |
|
|
global NO_DMMU
|
1324 |
|
|
#QMEM defines
|
1325 |
|
|
global QMEM_IMPLEMENTED
|
1326 |
|
|
global QMEM_BSEL
|
1327 |
|
|
global QMEM_ACK
|
1328 |
|
|
#MISC defines
|
1329 |
|
|
global MAC_IMPLEMENTED
|
1330 |
|
|
global MAC_SPR_WE
|
1331 |
|
|
global CFGR_IMPLEMENTED
|
1332 |
|
|
global SYS_FULL_DECODE
|
1333 |
|
|
|
1334 |
|
|
|
1335 |
|
|
set errorno [catch { set f [open $file w] } errorname ]
|
1336 |
|
|
|
1337 |
|
|
if { $errorno != 0 } {
|
1338 |
|
|
errorfile
|
1339 |
|
|
return
|
1340 |
|
|
}
|
1341 |
|
|
|
1342 |
|
|
|
1343 |
|
|
puts $f $ASIC
|
1344 |
|
|
puts $f $VCD_DUMP
|
1345 |
|
|
puts $f $VERBOSE
|
1346 |
|
|
puts $f $targetFPGA
|
1347 |
|
|
puts $f $targetASIC
|
1348 |
|
|
puts $f $ASIC_MULTP2_32X32
|
1349 |
|
|
puts $f $BIST
|
1350 |
|
|
puts $f $RF_RAM
|
1351 |
|
|
|
1352 |
|
|
#Wishbone defines
|
1353 |
|
|
puts $f $REGISTERED_OUTPUTS
|
1354 |
|
|
puts $f $REGISTERED_INPUTS
|
1355 |
|
|
puts $f $NO_BURSTS
|
1356 |
|
|
puts $f $WB_RETRY
|
1357 |
|
|
puts $f $WB_CAB
|
1358 |
|
|
puts $f $WB_B3
|
1359 |
|
|
puts $f $CLKDIV2_SUPPORT
|
1360 |
|
|
puts $f $CLKDIV4_SUPPORT
|
1361 |
|
|
|
1362 |
|
|
#Misc
|
1363 |
|
|
puts $f $ADDITIONAL_SYNOPSYS_DIRECTIVES
|
1364 |
|
|
puts $f $CASE_DEFAULT
|
1365 |
|
|
puts $f $IMPL_MEM2REG
|
1366 |
|
|
|
1367 |
|
|
#IU defines
|
1368 |
|
|
puts $f $SR_EPH_DEF
|
1369 |
|
|
puts $f $IMPL_ADDC
|
1370 |
|
|
puts $f $IMPL_CY
|
1371 |
|
|
puts $f $ADDITIONAL_FLAG_MODIFIERS
|
1372 |
|
|
puts $f $IMPL_DIV
|
1373 |
|
|
puts $f $IMPL_ALU_ROTATE
|
1374 |
|
|
puts $f $MULT_IMPLEMENTED
|
1375 |
|
|
puts $f $LWPWR_MULT
|
1376 |
|
|
puts $f $ALU_COMP
|
1377 |
|
|
|
1378 |
|
|
#PM defines
|
1379 |
|
|
puts $f $PM_IMPLEMENTED
|
1380 |
|
|
puts $f $PM_READREGS
|
1381 |
|
|
puts $f $PM_UNUSED_ZERO
|
1382 |
|
|
puts $f $PM_PARTIAL_DECODING
|
1383 |
|
|
|
1384 |
|
|
#DU defines
|
1385 |
|
|
puts $f $DU_IMPLEMENTED
|
1386 |
|
|
puts $f $DU_HWBKPTS
|
1387 |
|
|
puts $f $DU_TB_IMPLEMENTED
|
1388 |
|
|
puts $f $DU_READREGS
|
1389 |
|
|
puts $f $DU_UNUSED_ZERO
|
1390 |
|
|
puts $f $DU_STATUS_UNIMPLEMENTED
|
1391 |
|
|
|
1392 |
|
|
#PIC defines
|
1393 |
|
|
puts $f $PIC_IMPLEMENTED
|
1394 |
|
|
puts $f $PIC_READREGS
|
1395 |
|
|
puts $f $PIC_UNUSED_ZERO
|
1396 |
|
|
puts $f $PIC_PICMR
|
1397 |
|
|
puts $f $PIC_PICSR
|
1398 |
|
|
puts $f $PIC_INTS
|
1399 |
|
|
|
1400 |
|
|
#TT defines
|
1401 |
|
|
puts $f $TT_IMPLEMENTED
|
1402 |
|
|
puts $f $TT_TTMR
|
1403 |
|
|
puts $f $TT_TTSR
|
1404 |
|
|
puts $f $TT_READREGS
|
1405 |
|
|
|
1406 |
|
|
|
1407 |
|
|
#IC CACHES
|
1408 |
|
|
puts $f $NO_IC
|
1409 |
|
|
puts $f $IC_WAYS
|
1410 |
|
|
puts $f $IC_SIZE
|
1411 |
|
|
puts $f $ICLS
|
1412 |
|
|
|
1413 |
|
|
#DC defines
|
1414 |
|
|
puts $f $NO_DC
|
1415 |
|
|
puts $f $DC_WAYS
|
1416 |
|
|
puts $f $DC_SIZE
|
1417 |
|
|
puts $f $DCLS
|
1418 |
|
|
puts $f $SB_IMPLEMENTED
|
1419 |
|
|
puts $f $SB_ENTRIES
|
1420 |
|
|
puts $f $SB_LOG
|
1421 |
|
|
|
1422 |
|
|
#MMU defines
|
1423 |
|
|
puts $f $NO_IMMU
|
1424 |
|
|
puts $f $NO_DMMU
|
1425 |
|
|
|
1426 |
|
|
#QMEM defines
|
1427 |
|
|
puts $f $QMEM_IMPLEMENTED
|
1428 |
|
|
puts $f $QMEM_BSEL
|
1429 |
|
|
puts $f $QMEM_ACK
|
1430 |
|
|
|
1431 |
|
|
#MISC defines
|
1432 |
|
|
puts $f $MAC_IMPLEMENTED
|
1433 |
|
|
puts $f $MAC_SPR_WE
|
1434 |
|
|
puts $f $CFGR_IMPLEMENTED
|
1435 |
|
|
puts $f $SYS_FULL_DECODE
|
1436 |
|
|
|
1437 |
|
|
|
1438 |
|
|
|
1439 |
|
|
close $f
|
1440 |
|
|
destroy .dsaveconf
|
1441 |
|
|
|
1442 |
|
|
}
|
1443 |
|
|
|
1444 |
|
|
proc loadconfdialog { } {
|
1445 |
|
|
|
1446 |
|
|
destroy .dloadconf
|
1447 |
|
|
|
1448 |
|
|
toplevel .dloadconf -class Dialog
|
1449 |
|
|
wm title .dloadconf "Load Configuration"
|
1450 |
|
|
wm iconname .dloadconf Dialog
|
1451 |
|
|
frame .dloadconf.top -relief raised -bd 1
|
1452 |
|
|
pack .dloadconf.top -side top -fill both
|
1453 |
|
|
frame .dloadconf.bot -relief raised -bd 1
|
1454 |
|
|
pack .dloadconf.bot -side top -fill both
|
1455 |
|
|
|
1456 |
|
|
|
1457 |
|
|
label .dloadconf.top.fn -text "Enter Filename" -relief raised
|
1458 |
|
|
pack .dloadconf.top.fn -side left -pady 5m -padx 10m
|
1459 |
|
|
|
1460 |
|
|
entry .dloadconf.top.entry1 -width 20 -relief sunken -bd 2 -textvariable loadfilename
|
1461 |
|
|
pack .dloadconf.top.entry1 -side left -pady 5m -padx 10m
|
1462 |
|
|
|
1463 |
|
|
frame .dloadconf.bot.left -relief raised -bd 1 -relief flat
|
1464 |
|
|
frame .dloadconf.bot.right -relief raised -bd 1 -relief flat
|
1465 |
|
|
|
1466 |
|
|
pack .dloadconf.bot.left -side left -fill both
|
1467 |
|
|
pack .dloadconf.bot.right -side right -fill both
|
1468 |
|
|
|
1469 |
|
|
button .dloadconf.bot.left.okb -text "OK" -command { loadconf $loadfilename }
|
1470 |
|
|
button .dloadconf.bot.right.cancelb -text "Cancel" -command { destroy .dloadconf }
|
1471 |
|
|
|
1472 |
|
|
pack .dloadconf.bot.left.okb -side top -padx 10m -pady 5m -fill x
|
1473 |
|
|
pack .dloadconf.bot.right.cancelb -side top -padx 10m -pady 5m -fill x
|
1474 |
|
|
|
1475 |
|
|
|
1476 |
|
|
}
|
1477 |
|
|
|
1478 |
|
|
proc loadconf { file } {
|
1479 |
|
|
|
1480 |
|
|
global ASIC
|
1481 |
|
|
global VCD_DUMP
|
1482 |
|
|
global VERBOSE
|
1483 |
|
|
global targetFPGA
|
1484 |
|
|
global targetASIC
|
1485 |
|
|
global ASIC_MULTP2_32X32
|
1486 |
|
|
global BIST
|
1487 |
|
|
global RF_RAM
|
1488 |
|
|
#Wishbone defines
|
1489 |
|
|
global REGISTERED_OUTPUTS
|
1490 |
|
|
global REGISTERED_INPUTS
|
1491 |
|
|
global NO_BURSTS
|
1492 |
|
|
global WB_RETRY
|
1493 |
|
|
global WB_CAB
|
1494 |
|
|
global WB_B3
|
1495 |
|
|
global CLKDIV2_SUPPORT
|
1496 |
|
|
global CLKDIV4_SUPPORT
|
1497 |
|
|
#Misc
|
1498 |
|
|
global ADDITIONAL_SYNOPSYS_DIRECTIVES
|
1499 |
|
|
global CASE_DEFAULT
|
1500 |
|
|
global IMPL_MEM2REG
|
1501 |
|
|
#IU defines
|
1502 |
|
|
global SR_EPH_DEF
|
1503 |
|
|
global IMPL_ADDC
|
1504 |
|
|
global IMPL_CY
|
1505 |
|
|
global ADDITIONAL_FLAG_MODIFIERS
|
1506 |
|
|
global IMPL_DIV
|
1507 |
|
|
global IMPL_ALU_ROTATE
|
1508 |
|
|
global MULT_IMPLEMENTED
|
1509 |
|
|
global LWPWR_MULT
|
1510 |
|
|
global ALU_COMP
|
1511 |
|
|
#PM defines
|
1512 |
|
|
global PM_IMPLEMENTED
|
1513 |
|
|
global PM_READREGS
|
1514 |
|
|
global PM_UNUSED_ZERO
|
1515 |
|
|
global PM_PARTIAL_DECODING
|
1516 |
|
|
#DU defines
|
1517 |
|
|
global DU_IMPLEMENTED
|
1518 |
|
|
global DU_HWBKPTS
|
1519 |
|
|
global DU_TB_IMPLEMENTED
|
1520 |
|
|
global DU_READREGS
|
1521 |
|
|
global DU_UNUSED_ZERO
|
1522 |
|
|
global DU_STATUS_UNIMPLEMENTED
|
1523 |
|
|
#PIC defines
|
1524 |
|
|
global PIC_IMPLEMENTED
|
1525 |
|
|
global PIC_READREGS
|
1526 |
|
|
global PIC_UNUSED_ZERO
|
1527 |
|
|
global PIC_PICMR
|
1528 |
|
|
global PIC_PICSR
|
1529 |
|
|
global PIC_INTS
|
1530 |
|
|
#TT defines
|
1531 |
|
|
global TT_IMPLEMENTED
|
1532 |
|
|
global TT_TTMR
|
1533 |
|
|
global TT_TTSR
|
1534 |
|
|
global TT_READREGS
|
1535 |
|
|
#IC CACHES
|
1536 |
|
|
global NO_IC
|
1537 |
|
|
global IC_WAYS
|
1538 |
|
|
global IC_SIZE
|
1539 |
|
|
global ICLS
|
1540 |
|
|
#DC defines
|
1541 |
|
|
global NO_DC
|
1542 |
|
|
global DC_WAYS
|
1543 |
|
|
global DC_SIZE
|
1544 |
|
|
global DCLS
|
1545 |
|
|
global SB_IMPLEMENTED
|
1546 |
|
|
global SB_ENTRIES
|
1547 |
|
|
global SB_LOG
|
1548 |
|
|
#MMU defines
|
1549 |
|
|
global NO_IMMU
|
1550 |
|
|
global NO_DMMU
|
1551 |
|
|
#QMEM defines
|
1552 |
|
|
global QMEM_IMPLEMENTED
|
1553 |
|
|
global QMEM_BSEL
|
1554 |
|
|
global QMEM_ACK
|
1555 |
|
|
#MISC defines
|
1556 |
|
|
global MAC_IMPLEMENTED
|
1557 |
|
|
global MAC_SPR_WE
|
1558 |
|
|
global CFGR_IMPLEMENTED
|
1559 |
|
|
global SYS_FULL_DECODE
|
1560 |
|
|
|
1561 |
|
|
|
1562 |
|
|
set errorno [catch { set f [open $file r] } errorname ]
|
1563 |
|
|
|
1564 |
|
|
if { $errorno != 0 } {
|
1565 |
|
|
errorfile
|
1566 |
|
|
return
|
1567 |
|
|
}
|
1568 |
|
|
|
1569 |
|
|
|
1570 |
|
|
set ASIC [gets $f]
|
1571 |
|
|
set VCD_DUMP [gets $f]
|
1572 |
|
|
set VERBOSE [gets $f]
|
1573 |
|
|
set targetFPGA [gets $f]
|
1574 |
|
|
set targetASIC [gets $f]
|
1575 |
|
|
set ASIC_MULTP2_32X32 [gets $f]
|
1576 |
|
|
set BIST [gets $f]
|
1577 |
|
|
set RF_RAM [gets $f]
|
1578 |
|
|
|
1579 |
|
|
#Wishbone defines
|
1580 |
|
|
set REGISTERED_OUTPUTS [gets $f]
|
1581 |
|
|
set REGISTERED_INPUTS [gets $f]
|
1582 |
|
|
set NO_BURSTS [gets $f]
|
1583 |
|
|
set WB_RETRY [gets $f]
|
1584 |
|
|
set WB_CAB [gets $f]
|
1585 |
|
|
set WB_B3 [gets $f]
|
1586 |
|
|
set CLKDIV2_SUPPORT [gets $f]
|
1587 |
|
|
set CLKDIV4_SUPPORT [gets $f]
|
1588 |
|
|
|
1589 |
|
|
#Misc
|
1590 |
|
|
set ADDITIONAL_SYNOPSYS_DIRECTIVES [gets $f]
|
1591 |
|
|
set CASE_DEFAULT [gets $f]
|
1592 |
|
|
set IMPL_MEM2REG [gets $f]
|
1593 |
|
|
|
1594 |
|
|
#IU defines
|
1595 |
|
|
set SR_EPH_DEF [gets $f]
|
1596 |
|
|
set IMPL_ADDC [gets $f]
|
1597 |
|
|
set IMPL_CY [gets $f]
|
1598 |
|
|
set ADDITIONAL_FLAG_MODIFIERS [gets $f]
|
1599 |
|
|
set IMPL_DIV [gets $f]
|
1600 |
|
|
set IMPL_ALU_ROTATE [gets $f]
|
1601 |
|
|
set MULT_IMPLEMENTED [gets $f]
|
1602 |
|
|
set LWPWR_MULT [gets $f]
|
1603 |
|
|
set ALU_COMP [gets $f]
|
1604 |
|
|
|
1605 |
|
|
#PM defines
|
1606 |
|
|
set PM_IMPLEMENTED [gets $f]
|
1607 |
|
|
set PM_READREGS [gets $f]
|
1608 |
|
|
set PM_UNUSED_ZERO [gets $f]
|
1609 |
|
|
set PM_PARTIAL_DECODING [gets $f]
|
1610 |
|
|
|
1611 |
|
|
#DU defines
|
1612 |
|
|
set DU_IMPLEMENTED [gets $f]
|
1613 |
|
|
set DU_HWBKPTS [gets $f]
|
1614 |
|
|
set DU_TB_IMPLEMENTED [gets $f]
|
1615 |
|
|
set DU_READREGS [gets $f]
|
1616 |
|
|
set DU_UNUSED_ZERO [gets $f]
|
1617 |
|
|
set DU_STATUS_UNIMPLEMENTED [gets $f]
|
1618 |
|
|
|
1619 |
|
|
#PIC defines
|
1620 |
|
|
set PIC_IMPLEMENTED [gets $f]
|
1621 |
|
|
set PIC_READREGS [gets $f]
|
1622 |
|
|
set PIC_UNUSED_ZERO [gets $f]
|
1623 |
|
|
set PIC_PICMR [gets $f]
|
1624 |
|
|
set PIC_PICSR [gets $f]
|
1625 |
|
|
set PIC_INTS [gets $f]
|
1626 |
|
|
|
1627 |
|
|
#TT defines
|
1628 |
|
|
set TT_IMPLEMENTED [gets $f]
|
1629 |
|
|
set TT_TTMR [gets $f]
|
1630 |
|
|
set TT_TTSR [gets $f]
|
1631 |
|
|
set TT_READREGS [gets $f]
|
1632 |
|
|
|
1633 |
|
|
|
1634 |
|
|
#IC CACHES
|
1635 |
|
|
set NO_IC [gets $f]
|
1636 |
|
|
set IC_WAYS [gets $f]
|
1637 |
|
|
set IC_SIZE [gets $f]
|
1638 |
|
|
set ICLS [gets $f]
|
1639 |
|
|
|
1640 |
|
|
#DC defines
|
1641 |
|
|
set NO_DC [gets $f]
|
1642 |
|
|
set DC_WAYS [gets $f]
|
1643 |
|
|
set DC_SIZE [gets $f]
|
1644 |
|
|
set DCLS [gets $f]
|
1645 |
|
|
set SB_IMPLEMENTED [gets $f]
|
1646 |
|
|
set SB_ENTRIES [gets $f]
|
1647 |
|
|
set SB_LOG [gets $f]
|
1648 |
|
|
|
1649 |
|
|
#MMU defines
|
1650 |
|
|
set NO_IMMU [gets $f]
|
1651 |
|
|
set NO_DMMU [gets $f]
|
1652 |
|
|
|
1653 |
|
|
#QMEM defines
|
1654 |
|
|
set QMEM_IMPLEMENTED [gets $f]
|
1655 |
|
|
set QMEM_BSEL [gets $f]
|
1656 |
|
|
set QMEM_ACK [gets $f]
|
1657 |
|
|
|
1658 |
|
|
#MISC defines
|
1659 |
|
|
set MAC_IMPLEMENTED [gets $f]
|
1660 |
|
|
set MAC_SPR_WE [gets $f]
|
1661 |
|
|
set CFGR_IMPLEMENTED [gets $f]
|
1662 |
|
|
set SYS_FULL_DECODE [gets $f]
|
1663 |
|
|
|
1664 |
|
|
|
1665 |
|
|
|
1666 |
|
|
close $f
|
1667 |
|
|
destroy .dloadconf
|
1668 |
|
|
|
1669 |
|
|
}
|
1670 |
|
|
|
1671 |
|
|
proc export { } {
|
1672 |
|
|
|
1673 |
|
|
|
1674 |
|
|
global ASIC
|
1675 |
|
|
global VCD_DUMP
|
1676 |
|
|
global VERBOSE
|
1677 |
|
|
global targetFPGA
|
1678 |
|
|
global targetASIC
|
1679 |
|
|
global ASIC_MULTP2_32X32
|
1680 |
|
|
global BIST
|
1681 |
|
|
global RF_RAM
|
1682 |
|
|
#Wishbone defines
|
1683 |
|
|
global REGISTERED_OUTPUTS
|
1684 |
|
|
global REGISTERED_INPUTS
|
1685 |
|
|
global NO_BURSTS
|
1686 |
|
|
global WB_RETRY
|
1687 |
|
|
global WB_CAB
|
1688 |
|
|
global WB_B3
|
1689 |
|
|
global CLKDIV2_SUPPORT
|
1690 |
|
|
global CLKDIV4_SUPPORT
|
1691 |
|
|
#Misc
|
1692 |
|
|
global ADDITIONAL_SYNOPSYS_DIRECTIVES
|
1693 |
|
|
global CASE_DEFAULT
|
1694 |
|
|
global IMPL_MEM2REG
|
1695 |
|
|
#IU defines
|
1696 |
|
|
global SR_EPH_DEF
|
1697 |
|
|
global IMPL_ADDC
|
1698 |
|
|
global IMPL_CY
|
1699 |
|
|
global ADDITIONAL_FLAG_MODIFIERS
|
1700 |
|
|
global IMPL_DIV
|
1701 |
|
|
global IMPL_ALU_ROTATE
|
1702 |
|
|
global MULT_IMPLEMENTED
|
1703 |
|
|
global LWPWR_MULT
|
1704 |
|
|
global ALU_COMP
|
1705 |
|
|
#PM defines
|
1706 |
|
|
global PM_IMPLEMENTED
|
1707 |
|
|
global PM_READREGS
|
1708 |
|
|
global PM_UNUSED_ZERO
|
1709 |
|
|
global PM_PARTIAL_DECODING
|
1710 |
|
|
#DU defines
|
1711 |
|
|
global DU_IMPLEMENTED
|
1712 |
|
|
global DU_HWBKPTS
|
1713 |
|
|
global DU_TB_IMPLEMENTED
|
1714 |
|
|
global DU_READREGS
|
1715 |
|
|
global DU_UNUSED_ZERO
|
1716 |
|
|
global DU_STATUS_UNIMPLEMENTED
|
1717 |
|
|
#PIC defines
|
1718 |
|
|
global PIC_IMPLEMENTED
|
1719 |
|
|
global PIC_READREGS
|
1720 |
|
|
global PIC_UNUSED_ZERO
|
1721 |
|
|
global PIC_PICMR
|
1722 |
|
|
global PIC_PICSR
|
1723 |
|
|
global PIC_INTS
|
1724 |
|
|
#TT defines
|
1725 |
|
|
global TT_IMPLEMENTED
|
1726 |
|
|
global TT_TTMR
|
1727 |
|
|
global TT_TTSR
|
1728 |
|
|
global TT_READREGS
|
1729 |
|
|
#IC CACHES
|
1730 |
|
|
global NO_IC
|
1731 |
|
|
global IC_WAYS
|
1732 |
|
|
global IC_SIZE
|
1733 |
|
|
global ICLS
|
1734 |
|
|
#DC defines
|
1735 |
|
|
global NO_DC
|
1736 |
|
|
global DC_WAYS
|
1737 |
|
|
global DC_SIZE
|
1738 |
|
|
global DCLS
|
1739 |
|
|
global SB_IMPLEMENTED
|
1740 |
|
|
global SB_ENTRIES
|
1741 |
|
|
global SB_LOG
|
1742 |
|
|
#MMU defines
|
1743 |
|
|
global NO_IMMU
|
1744 |
|
|
global NO_DMMU
|
1745 |
|
|
#QMEM defines
|
1746 |
|
|
global QMEM_IMPLEMENTED
|
1747 |
|
|
global QMEM_BSEL
|
1748 |
|
|
global QMEM_ACK
|
1749 |
|
|
#MISC defines
|
1750 |
|
|
global MAC_IMPLEMENTED
|
1751 |
|
|
global MAC_SPR_WE
|
1752 |
|
|
global CFGR_IMPLEMENTED
|
1753 |
|
|
global SYS_FULL_DECODE
|
1754 |
|
|
|
1755 |
|
|
set errorno [catch { set f [open "or1200_config.v" w] } errorname ]
|
1756 |
|
|
|
1757 |
|
|
if { $errorno != 0 } {
|
1758 |
|
|
errorfile
|
1759 |
|
|
return
|
1760 |
|
|
}
|
1761 |
|
|
|
1762 |
|
|
if { $ASIC == 1 } {
|
1763 |
|
|
puts $f {`define OR1200_ASIC}
|
1764 |
4 |
jcastillo |
puts $f "`define OR1200_$targetASIC "
|
1765 |
|
|
} else {
|
1766 |
|
|
puts $f "`define OR1200_$targetFPGA "
|
1767 |
2 |
jcastillo |
}
|
1768 |
4 |
jcastillo |
|
1769 |
2 |
jcastillo |
if { $VCD_DUMP == 1 } {
|
1770 |
|
|
puts $f {`define OR1200_VCD_DUMP }
|
1771 |
|
|
}
|
1772 |
|
|
if { $VERBOSE == 1 } {
|
1773 |
|
|
puts $f {`define OR1200_VERBOSE }
|
1774 |
|
|
}
|
1775 |
|
|
|
1776 |
|
|
if { $ASIC_MULTP2_32X32 == 1 } {
|
1777 |
|
|
puts $f {`define OR1200_ASIC_MULTP2_32X32 }
|
1778 |
|
|
} else {
|
1779 |
|
|
puts $f {`define OR1200_GENERIC_MULTP2_32X32 }
|
1780 |
|
|
}
|
1781 |
|
|
|
1782 |
|
|
if {$ASIC == 1 && ($targetASIC=="VIRTUALSILICON_SSP" | $targetASIC=="VIRTUALSILICON_STP_T1" | $targetASIC=="VIRTUALSILICON_STP_T2")} {
|
1783 |
|
|
if { $BIST == 1 } {
|
1784 |
|
|
puts $f {`define OR1200_BIST }
|
1785 |
|
|
}
|
1786 |
|
|
}
|
1787 |
|
|
|
1788 |
|
|
if { $RF_RAM == 0 } {
|
1789 |
|
|
puts $f {`define OR1200_RFRAM_GENERIC }
|
1790 |
|
|
} elseif { $RF_RAM == 1 } {
|
1791 |
|
|
puts $f {`define OR1200_RFRAM_TWOPORT }
|
1792 |
|
|
} else {
|
1793 |
|
|
puts $f {`define OR1200_RFRAM_DUALPORT }
|
1794 |
|
|
}
|
1795 |
|
|
|
1796 |
|
|
|
1797 |
|
|
#Wishbone defines
|
1798 |
|
|
if { $REGISTERED_OUTPUTS==1 } {
|
1799 |
|
|
puts $f {`define OR1200_REGISTERED_OUTPUTS }
|
1800 |
|
|
}
|
1801 |
|
|
if { $REGISTERED_INPUTS==1 } {
|
1802 |
|
|
puts $f {`define OR1200_REGISTERED_INPUTS }
|
1803 |
|
|
}
|
1804 |
|
|
if { $NO_BURSTS==1 } {
|
1805 |
|
|
puts $f {`define OR1200_NO_BURSTS }
|
1806 |
|
|
}
|
1807 |
|
|
if { $WB_RETRY==1 } {
|
1808 |
|
|
puts $f {`define OR1200_WB_RETRY }
|
1809 |
|
|
}
|
1810 |
|
|
if { $WB_CAB==1 } {
|
1811 |
|
|
puts $f {`define OR1200_WB_CAB }
|
1812 |
|
|
}
|
1813 |
|
|
if { $WB_B3==1 } {
|
1814 |
|
|
puts $f {`define OR1200_WB_B3 }
|
1815 |
|
|
}
|
1816 |
|
|
if { $CLKDIV2_SUPPORT==1 } {
|
1817 |
|
|
puts $f {`define OR1200_CLKDIV2_SUPPORT }
|
1818 |
|
|
}
|
1819 |
|
|
if { $CLKDIV4_SUPPORT==1 } {
|
1820 |
|
|
puts $f {`define OR1200_CLKDIV4_SUPPORT }
|
1821 |
|
|
}
|
1822 |
|
|
|
1823 |
|
|
#Misc
|
1824 |
|
|
if { $ADDITIONAL_SYNOPSYS_DIRECTIVES==1 } {
|
1825 |
|
|
puts $f {`define OR1200_ADDITIONAL_SYNOPSYS_DIRECTIVES }
|
1826 |
|
|
}
|
1827 |
|
|
if { $CASE_DEFAULT==1 } {
|
1828 |
|
|
puts $f {`define OR1200_CASE_DEFAULT }
|
1829 |
|
|
}
|
1830 |
|
|
if { $IMPL_MEM2REG==1 } {
|
1831 |
|
|
puts $f {`define OR1200_IMPL_MEM2REG1 }
|
1832 |
|
|
} else {
|
1833 |
|
|
puts $f {`define OR1200_IMPL_MEM2REG2 }
|
1834 |
|
|
}
|
1835 |
|
|
|
1836 |
|
|
#IU defines
|
1837 |
|
|
|
1838 |
|
|
if { $SR_EPH_DEF==1 } {
|
1839 |
6 |
jcastillo |
puts $f {`define OR1200_SR_EPH_DEF 1'b1}
|
1840 |
|
|
} else {
|
1841 |
|
|
puts $f {`define OR1200_SR_EPH_DEF 1'b0}
|
1842 |
2 |
jcastillo |
}
|
1843 |
6 |
jcastillo |
|
1844 |
2 |
jcastillo |
if { $IMPL_ADDC==1 } {
|
1845 |
|
|
puts $f {`define OR1200_IMPL_ADDC }
|
1846 |
|
|
}
|
1847 |
|
|
if { $IMPL_CY==1 } {
|
1848 |
|
|
puts $f {`define OR1200_IMPL_CY }
|
1849 |
|
|
}
|
1850 |
|
|
if { $ADDITIONAL_FLAG_MODIFIERS==1 } {
|
1851 |
|
|
puts $f {`define OR1200_ADDITIONAL_FLAG_MODIFIERS }
|
1852 |
|
|
}
|
1853 |
|
|
if { $IMPL_DIV==1 } {
|
1854 |
|
|
puts $f {`define OR1200_IMPL_DIV }
|
1855 |
|
|
}
|
1856 |
|
|
if { $IMPL_ALU_ROTATE==1 } {
|
1857 |
|
|
puts $f {`define OR1200_IMPL_ALU_ROTATE }
|
1858 |
|
|
}
|
1859 |
|
|
if { $MULT_IMPLEMENTED==1 } {
|
1860 |
|
|
puts $f {`define OR1200_MULT_IMPLEMENTED }
|
1861 |
|
|
}
|
1862 |
|
|
if { $LWPWR_MULT==1 } {
|
1863 |
|
|
puts $f {`define OR1200_LWPWR_MULT }
|
1864 |
|
|
}
|
1865 |
|
|
if { $ALU_COMP==1 } {
|
1866 |
|
|
puts $f {`define OR1200_ALU_COMP }
|
1867 |
|
|
}
|
1868 |
|
|
|
1869 |
|
|
#PM defines
|
1870 |
|
|
if { $PM_IMPLEMENTED==1 } {
|
1871 |
|
|
puts $f {`define OR1200_PM_IMPLEMENTED }
|
1872 |
|
|
}
|
1873 |
|
|
if { $PM_READREGS==1 } {
|
1874 |
|
|
puts $f {`define OR1200_PM_READREGS }
|
1875 |
|
|
}
|
1876 |
|
|
if { $PM_UNUSED_ZERO==1 } {
|
1877 |
|
|
puts $f {`define OR1200_PM_UNUSED_ZERO }
|
1878 |
|
|
}
|
1879 |
|
|
if { $PM_PARTIAL_DECODING==1 } {
|
1880 |
|
|
puts $f {`define OR1200_PM_PARTIAL_DECODING }
|
1881 |
|
|
}
|
1882 |
|
|
|
1883 |
|
|
#DU defines
|
1884 |
|
|
if { $DU_IMPLEMENTED==1 } {
|
1885 |
|
|
puts $f {`define OR1200_DU_IMPLEMENTED }
|
1886 |
|
|
}
|
1887 |
|
|
if { $DU_HWBKPTS==1 } {
|
1888 |
|
|
puts $f {`define OR1200_DU_HWBKPTS }
|
1889 |
|
|
}
|
1890 |
5 |
jcastillo |
if { $DU_TB_IMPLEMENTED==1 && $ASIC==0 && $targetFPGA=="XILINX_RAMB4" } {
|
1891 |
2 |
jcastillo |
puts $f {`define OR1200_DU_TB_IMPLEMENTED }
|
1892 |
|
|
}
|
1893 |
|
|
if { $DU_READREGS==1 } {
|
1894 |
|
|
puts $f {`define OR1200_DU_READREGS }
|
1895 |
|
|
}
|
1896 |
|
|
if { $DU_UNUSED_ZERO==1 } {
|
1897 |
|
|
puts $f {`define OR1200_DU_UNUSED_ZERO }
|
1898 |
|
|
}
|
1899 |
|
|
if { $DU_STATUS_UNIMPLEMENTED==1 } {
|
1900 |
|
|
puts $f {`define OR1200_DU_STATUS_UNIMPLEMENTED }
|
1901 |
|
|
}
|
1902 |
|
|
|
1903 |
|
|
|
1904 |
|
|
#PIC defines
|
1905 |
|
|
if { $PIC_IMPLEMENTED==1 } {
|
1906 |
|
|
puts $f {`define OR1200_PIC_IMPLEMENTED }
|
1907 |
|
|
}
|
1908 |
|
|
if { $PIC_READREGS==1 } {
|
1909 |
|
|
puts $f {`define OR1200_PIC_READREGS }
|
1910 |
|
|
}
|
1911 |
|
|
if { $PIC_UNUSED_ZERO==1 } {
|
1912 |
|
|
puts $f {`define OR1200_PIC_UNUSED_ZERO }
|
1913 |
|
|
}
|
1914 |
|
|
if { $PIC_PICMR==1 } {
|
1915 |
|
|
puts $f {`define OR1200_PIC_PICMR }
|
1916 |
|
|
}
|
1917 |
|
|
if { $PIC_PICSR==1 } {
|
1918 |
|
|
puts $f {`define OR1200_PIC_PICSR }
|
1919 |
|
|
}
|
1920 |
|
|
|
1921 |
|
|
puts $f "`define OR1200_PIC_INTS $PIC_INTS"
|
1922 |
|
|
|
1923 |
|
|
|
1924 |
|
|
|
1925 |
|
|
#TT defines
|
1926 |
|
|
if { $TT_IMPLEMENTED==1 } {
|
1927 |
|
|
puts $f {`define OR1200_TT_IMPLEMENTED }
|
1928 |
|
|
}
|
1929 |
|
|
if { $TT_TTMR==1 } {
|
1930 |
|
|
puts $f {`define OR1200_TT_TTMR }
|
1931 |
|
|
}
|
1932 |
|
|
if { $TT_TTSR==1 } {
|
1933 |
|
|
puts $f {`define OR1200_TT_TTSR }
|
1934 |
|
|
}
|
1935 |
|
|
if { $TT_READREGS==1 } {
|
1936 |
|
|
puts $f {`define OR1200_TT_READREGS }
|
1937 |
|
|
}
|
1938 |
|
|
|
1939 |
|
|
#IC CACHES
|
1940 |
|
|
if { $NO_IC==1 } {
|
1941 |
|
|
puts $f {`define OR1200_NO_IC }
|
1942 |
|
|
}
|
1943 |
|
|
|
1944 |
|
|
puts $f "`define OR1200_IC_$IC_WAYS\W_$IC_SIZE"
|
1945 |
|
|
|
1946 |
|
|
if { $ICLS==8 } {
|
1947 |
|
|
puts $f {`define OR1200_ICLS 3 }
|
1948 |
|
|
} else {
|
1949 |
|
|
puts $f {`define OR1200_ICLS 4 }
|
1950 |
|
|
}
|
1951 |
|
|
|
1952 |
|
|
#DC defines
|
1953 |
|
|
if { $NO_DC==1 } {
|
1954 |
|
|
puts $f {`define OR1200_NO_DC }
|
1955 |
|
|
}
|
1956 |
|
|
|
1957 |
|
|
puts $f "`define OR1200_DC_$DC_WAYS\W_$DC_SIZE"
|
1958 |
|
|
|
1959 |
|
|
if { $DCLS==8 } {
|
1960 |
|
|
puts $f {`define OR1200_DCLS 3 }
|
1961 |
|
|
} else {
|
1962 |
|
|
puts $f {`define OR1200_DCLS 4 }
|
1963 |
|
|
}
|
1964 |
|
|
|
1965 |
|
|
if { $SB_IMPLEMENTED==1 } {
|
1966 |
|
|
puts $f {`define OR1200_SB_IMPLEMENTED }
|
1967 |
|
|
}
|
1968 |
|
|
|
1969 |
|
|
puts $f "`define OR1200_SB_ENTRIES $SB_ENTRIES"
|
1970 |
|
|
|
1971 |
|
|
puts $f "`define OR1200_SB_LOG $SB_LOG"
|
1972 |
|
|
|
1973 |
|
|
|
1974 |
|
|
#MMU defines
|
1975 |
|
|
if { $NO_IMMU==1 } {
|
1976 |
|
|
puts $f {`define OR1200_NO_IMMU }
|
1977 |
|
|
}
|
1978 |
|
|
if { $NO_DMMU==1 } {
|
1979 |
|
|
puts $f {`define OR1200_NO_DMMU }
|
1980 |
|
|
}
|
1981 |
|
|
|
1982 |
|
|
#QMEM defines
|
1983 |
|
|
if {$QMEM_IMPLEMENTED == 1} {
|
1984 |
|
|
puts $f {`define OR1200_QMEM_IMPLEMENTED }
|
1985 |
|
|
}
|
1986 |
|
|
if {$QMEM_BSEL == 1} {
|
1987 |
|
|
puts $f {`define OR1200_QMEM_BSEL }
|
1988 |
|
|
}
|
1989 |
|
|
if {$QMEM_ACK == 1} {
|
1990 |
|
|
puts $f {`define OR1200_QMEM_ACK }
|
1991 |
|
|
}
|
1992 |
|
|
|
1993 |
|
|
#MISC defines
|
1994 |
|
|
if {$MAC_IMPLEMENTED == 1} {
|
1995 |
|
|
puts $f {`define OR1200_MAC_IMPLEMENTED }
|
1996 |
|
|
}
|
1997 |
|
|
if {$MAC_SPR_WE == 1} {
|
1998 |
|
|
puts $f {`define OR1200_MAC_SPR_WE }
|
1999 |
|
|
}
|
2000 |
|
|
if {$CFGR_IMPLEMENTED == 1} {
|
2001 |
|
|
puts $f {`define OR1200_CFGR_IMPLEMENTED }
|
2002 |
|
|
}
|
2003 |
|
|
if {$SYS_FULL_DECODE == 1} {
|
2004 |
|
|
puts $f {`define OR1200_SYS_FULL_DECODE }
|
2005 |
|
|
}
|
2006 |
|
|
|
2007 |
|
|
close $f
|
2008 |
|
|
|
2009 |
|
|
|
2010 |
|
|
}
|
2011 |
|
|
|
2012 |
|
|
|
2013 |
|
|
proc errorfile { } {
|
2014 |
|
|
|
2015 |
|
|
destroy .derror
|
2016 |
|
|
|
2017 |
|
|
toplevel .derror -class Dialog
|
2018 |
|
|
wm title .derror "Error in File Access"
|
2019 |
|
|
wm iconname .derror Dialog
|
2020 |
|
|
frame .derror.top -relief raised -bd 1
|
2021 |
|
|
pack .derror.top -side top -fill both
|
2022 |
|
|
frame .derror.bot -relief raised -bd 1
|
2023 |
|
|
pack .derror.bot -side top -fill both
|
2024 |
|
|
|
2025 |
|
|
|
2026 |
|
|
label .derror.top.fn -text "ERROR IN FILE ACCESS"
|
2027 |
|
|
pack .derror.top.fn -side top -pady 5m -padx 10m
|
2028 |
|
|
|
2029 |
|
|
|
2030 |
|
|
button .derror.bot.okb -text "OK" -command { destroy .derror }
|
2031 |
|
|
|
2032 |
|
|
pack .derror.bot.okb -side top -padx 10m -pady 5m -fill x
|
2033 |
|
|
|
2034 |
|
|
|
2035 |
|
|
}
|
2036 |
|
|
|
2037 |
|
|
|
2038 |
|
|
wm title . "OR1200 Graphic Configuration Tool"
|
2039 |
|
|
#wm minsize . 1000 600
|
2040 |
|
|
|
2041 |
|
|
|
2042 |
|
|
defaultvals
|
2043 |
|
|
|
2044 |
|
|
frame .mbar -relief raised -bd 2
|
2045 |
|
|
frame .screen -width 15c -height 10c
|
2046 |
|
|
|
2047 |
|
|
pack .mbar .screen -side top -fill x
|
2048 |
|
|
|
2049 |
|
|
menubutton .mbar.file -text File -underline 0 -menu .mbar.file.menu
|
2050 |
|
|
menubutton .mbar.synthesis -text Target -underline 0 -menu .mbar.synthesis.menu
|
2051 |
|
|
menubutton .mbar.processor -text "Processor Settings" -underline 0 -menu .mbar.processor.menu
|
2052 |
|
|
menubutton .mbar.wishbone -text Wishbone -underline 0 -menu .mbar.wishbone.menu
|
2053 |
|
|
menubutton .mbar.misc -text Misc -underline 0 -menu .mbar.misc.menu
|
2054 |
|
|
menubutton .mbar.simulation -text Simulation -underline 0 -menu .mbar.simulation.menu
|
2055 |
|
|
menubutton .mbar.help -text Help -underline 0 -menu .mbar.help.menu
|
2056 |
|
|
|
2057 |
|
|
pack .mbar.file .mbar.synthesis .mbar.processor .mbar.wishbone .mbar.misc .mbar.simulation -side left
|
2058 |
|
|
pack .mbar.help -side right
|
2059 |
|
|
|
2060 |
|
|
menu .mbar.file.menu
|
2061 |
|
|
|
2062 |
|
|
.mbar.file.menu add command -label "Load configuration" -command {loadconfdialog}
|
2063 |
|
|
.mbar.file.menu add command -label "Save configuration" -command {saveconfdialog}
|
2064 |
|
|
.mbar.file.menu add separator
|
2065 |
|
|
.mbar.file.menu add command -label "Generate verilog configuration file" -command { export }
|
2066 |
|
|
.mbar.file.menu add separator
|
2067 |
|
|
.mbar.file.menu add command -label "Default values" -command {defaultvals}
|
2068 |
|
|
.mbar.file.menu add separator
|
2069 |
|
|
.mbar.file.menu add command -label "Exit" -command {exit}
|
2070 |
|
|
|
2071 |
|
|
menu .mbar.help.menu
|
2072 |
|
|
|
2073 |
|
|
.mbar.help.menu add command -label "About ..." -command about
|
2074 |
|
|
|
2075 |
|
|
|
2076 |
|
|
menu .mbar.simulation.menu
|
2077 |
|
|
|
2078 |
|
|
.mbar.simulation.menu add checkbutton -label "Dump VCD file" -variable VCD_DUMP
|
2079 |
|
|
.mbar.simulation.menu add separator
|
2080 |
|
|
.mbar.simulation.menu add checkbutton -label "Generate debug messages" -variable VERBOSE
|
2081 |
|
|
|
2082 |
|
|
menu .mbar.synthesis.menu
|
2083 |
|
|
|
2084 |
|
|
.mbar.synthesis.menu add radiobutton -label "ASIC" -variable ASIC -value 1 -command {confASIC}
|
2085 |
|
|
.mbar.synthesis.menu add radiobutton -label "FPGA" -variable ASIC -value 0 -command {confFPGA}
|
2086 |
|
|
confFPGA
|
2087 |
|
|
|
2088 |
|
|
menu .mbar.processor.menu
|
2089 |
|
|
.mbar.processor.menu add command -label "Configure OpenRISC" -command {confOR1200}
|
2090 |
|
|
|
2091 |
|
|
menu .mbar.wishbone.menu
|
2092 |
|
|
|
2093 |
|
|
.mbar.wishbone.menu add checkbutton -label "Register WB outputs" -variable REGISTERED_OUTPUTS
|
2094 |
|
|
.mbar.wishbone.menu add checkbutton -label "Register WB inputs" -variable REGISTERED_INPUTS
|
2095 |
|
|
.mbar.wishbone.menu add separator
|
2096 |
|
|
.mbar.wishbone.menu add checkbutton -label "Disable memory bursts" -variable NO_BURSTS
|
2097 |
|
|
.mbar.wishbone.menu add checkbutton -label "Remove CAB signals" -variable WB_CAB
|
2098 |
|
|
.mbar.wishbone.menu add separator
|
2099 |
|
|
.mbar.wishbone.menu add checkbutton -label "Wishbone B3 compatibility" -variable WB_B3
|
2100 |
|
|
.mbar.wishbone.menu add separator
|
2101 |
|
|
.mbar.wishbone.menu add checkbutton -label "WB:RISC 1:2 clock ratio" -variable CLKDIV2_SUPPORT
|
2102 |
|
|
.mbar.wishbone.menu add checkbutton -label "WB:RISC 1:4 clock ratio" -variable CLKDIV4_SUPPORT
|
2103 |
|
|
.mbar.wishbone.menu add separator
|
2104 |
|
|
.mbar.wishbone.menu add checkbutton -label "Retry counter enabled" -variable WB_RETRY
|
2105 |
|
|
|
2106 |
|
|
menu .mbar.misc.menu
|
2107 |
|
|
|
2108 |
|
|
.mbar.misc.menu add checkbutton -label "Additional Synopsys directives" -variable ADDITIONAL_SYNOPSYS_DIRECTIVES
|
2109 |
|
|
.mbar.misc.menu add checkbutton -label "Enable default statement in case blocks" -variable CASE_DEFAULT
|
2110 |
|
|
.mbar.misc.menu add separator
|
2111 |
|
|
.mbar.misc.menu add radiobutton -label "Type of mem2reg aligner 1" -variable IMPL_MEM2REG -value 1
|
2112 |
|
|
.mbar.misc.menu add radiobutton -label "Type of mem2reg aligner 2" -variable IMPL_MEM2REG -value 2
|
2113 |
|
|
.mbar.misc.menu add separator
|
2114 |
|
|
.mbar.misc.menu add checkbutton -label "Enable BIST (only for VIRTUAL SILICON memories)" -variable BIST
|
2115 |
|
|
|
2116 |
|
|
tk_menuBar .mbar .mbar.file .mbar.synthesis .mbar.processor .mbar.misc .mbar.simulation .mbar.help
|
2117 |
|
|
|
2118 |
|
|
focus .mbar
|