|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我想用TCL写一个GUI界面,然后在GUI上选择modelsim仿真相应的option。
TCL中如何使用tcsh语法
script如下:
#!/usr/bin/wish -f
# A Tcl/Tk gadget to construct a window of buttons
destroy .buttons
toplevel .buttons
wm title .buttons "Doulos Buttons"
set count 0
proc add_frame title {
global frame count
set frame .buttons.frame$count
frame $frame -border 2 -relief groove
label $frame.label -text $title
pack $frame -side left -padx 2 -pady 2 -anchor n -fill both
pack $frame.label -side top -padx 2 -pady 2
incr count
}
proc add_button {title command} {
global frame count
button $frame.$count -text $title -command $command
pack $frame.$count -side top -pady 1 -padx 1 -fill x
incr count
}
#######################################
add_frame "Control"
add_button "Window Size" {wm geometry . 464x692+0+0}
add_button "Create Library" {vlib mylib; vmap work mylib} <-error
add_button "Compile" { vcom counter.vhd
vcom countertb.vhd
vcom countercf.vhd }
add_button "Load Simulation" {vsim mylib.cfg_countertb}
add_button "Wave Window" {source wave.do}
add_button "Quit" {quit -force}
add_frame "Simulate"
add_button "Run 10" {run 10}
add_button "Run 100" {run 100}
add_button "Run 1000" {run 1000}
add_button "Run all" {run -all}
add_button "Restart" {restart -force}
add_frame "Zoom"
add_button "Full" {.wave.tree zoomfull}
add_button "2x" {WaveZoom .wave out 2.0}
add_button "4x" {WaveZoom .wave out 4.0}
add_button "1/2x" {WaveZoom .wave in 2.0}
add_button "1/4x" {WaveZoom .wave in 2.0} |
-
有问题的图片
|