Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

ModelSim (Altera) & TCL Problems

I'm having problems with the TCL commands in ModelSim SE - Altera Version.

(I'm running ModelSim ALTERA STARTER EDITION 10.0c)

It seems like many of the commands that should work... do not.

For example just trying to run one of the included examples fails:# Error in macro C:\altera\11.1\modelsim_ase\examples\gui\addmenu\addmenu.do line 27# invalid command name "add_menu"# while executing# "add_menu $wname mine"# (procedure "AddMyMenus" line 9)# invoked from within# "AddMyMenus $wname"

Trying to use some of the commands listed here: www.cs.pitt.edu/~don/coe1502/Reference/vsim_quickref.pdf

...like .wave.tree zoomfull doesn't work. Commands like winfo also fail.

Basically I'm trying to learn how to do introspection on the GUI elements, in order to generate new Tk windows, similar to what has been done here: www.doulos.com/knowhow/tcltk/examples/constellation/mti_tcl.pdf

...but I keep hitting roadblock after roadblock since the commands don't seem to be working.

Any ideas?

Thanks!

13 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Learning to push the data out via SystemVerilog would pay dividends in the long run.

    --- Quote End ---

    Since you work with a bunch of ASIC guys, you probably have some proficient coders that can help you.

    That being said, feel free to waste time learning Tcl, its not that bad :)

    See this thread for some Tk GUI elements that'll work in Modelsim-SE, Quartus II, ActiveState ActiveTcl, etc:

    http://www.alteraforum.com/forum/showthread.php?t=27920

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Since you work with a bunch of ASIC guys, you probably have some proficient coders that can help you.

    --- Quote End ---

    True, time to pick their brain.

    --- Quote Start ---

    That being said, feel free to waste time learning Tcl, its not that bad :)

    --- Quote End ---

    But Dave, everything is a string in Tcl, and there is no OOP as far as I can tell :eek:. (But in all seriousness, Tcl is used so much I better bite the bullet and pick it up anyway.)

    Edit:

    Thanks for the link.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    in all seriousness, Tcl is used so much I better bite the bullet and pick it up anyway

    --- Quote End ---

    Yep, that is the conclusion I came to as well.

    The key is to use it where appropriate. Its decent enough for automating the build tools, and its mediocre for building GUIs. I don't use it for anything more complex than that.

    Cheers,

    Dave

    PS. OOP in Tcl is [incr Tcl]

    http://incrtcl.sourceforge.net/itcl/

    But "Just because you can, doesn't mean you should!"