在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3306|回复: 1

[求助] 在TCL中如何使用tcsh语法

[复制链接]
发表于 2010-1-21 09:53:39 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

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}

有问题的图片

有问题的图片
发表于 2010-6-7 08:22:44 | 显示全部楼层
Please read the tcl manual
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-9-29 16:58 , Processed in 0.014141 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表