Forum Discussion

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

Is tcl script language used in Modelsim?

Modelsim provides friendly GUI. But it can also be operated through script language. I wonder whether it is tcl script language? And anybody can provide some good tutorial?

Thanks very much.

4 Replies

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

    --- Quote Start ---

    Modelsim provides friendly GUI. But it can also be operated through script language. I wonder whether it is tcl script language? And anybody can provide some good tutorial?

    --- Quote End ---

    Both Modelsim and Quartus can be controlled from Tcl scripts.

    For an example, see this tutorial here:

    http://www.alterawiki.com/wiki/using_the_usb-blaster_as_an_sopc/qsys_avalon-mm_master_tutorial

    The Quartus scripts are called synth.tcl, while the Modelsim scripts are called sim.tcl.

    Cheers,

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

    Hi Dave, thx very much. But I should first understand the tcl script language, right?

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

    --- Quote Start ---

    But I should first understand the tcl script language, right?

    --- Quote End ---

    It certainly helps to know the syntax if you're trying to write your own script. However, its syntax is similar to many programming/scripting languages, so if you've ever written code, you should be able to follow the logic of a Tcl script.

    Take a look at the scripts, run them to see what they do, and then read them to see how they are implemented.

    Brent Welch, "Practical Programming in Tcl and Tk", is a pretty good book for learning the language.

    Cheers,

    Dave