Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: tcl commands in Altera Modelsim

  1. #1
    Join Date
    Mar 2010
    Posts
    78
    Rep Power
    1

    Default tcl commands in Altera Modelsim

    Hi all!

    I am using Altera Modelsim, which is tcl-based. I use the GUI.

    In the console, when I type the command puts "a" I get not output:

    ModelSim> set a 1
    # 1
    ModelSim> echo $a
    # 1
    ModelSim> puts $a
    ModelSim> puts "a"
    ModelSim>

    Can anyone explain that?

    Thx

  2. #2
    Join Date
    Mar 2010
    Posts
    78
    Rep Power
    1

    Default Re: tcl commands in Altera Modelsim

    on the other hand, each time a "set" command is executed, there is a trace in the console with the value
    Why is that?

  3. #3
    Join Date
    Nov 2008
    Posts
    2,440
    Rep Power
    1

    Default Re: tcl commands in Altera Modelsim

    puts will put messages into the host OS's console window (i see this on linux). i'm not sure where they'd go if you are using Windows.

    echo prints to the ModelSim transcript window as you've seen.

  4. #4
    Join Date
    Mar 2010
    Posts
    78
    Rep Power
    1

    Default Re: tcl commands in Altera Modelsim

    correct.
    Is there a way to redirect the host OS's console into ModelSim's console?

  5. #5
    Join Date
    Nov 2008
    Posts
    2,440
    Rep Power
    1

    Default Re: tcl commands in Altera Modelsim

    you'd have to find a tcl channelid for the ModelSim console. i'm not sure if there is one.

  6. #6
    Join Date
    Mar 2010
    Posts
    78
    Rep Power
    1

    Default Re: tcl commands in Altera Modelsim

    OK. Thanks!

  7. #7
    Join Date
    Jun 2013
    Location
    The Netherlands
    Posts
    415
    Rep Power
    1

    Default Re: tcl commands in Altera Modelsim

    I have encountered the same problem, were you able to find a solution?

  8. #8
    Join Date
    Aug 2005
    Location
    California
    Posts
    4,522
    Rep Power
    1

    Default Re: tcl commands in Altera Modelsim

    I encountered this issue a long time ago. If you compare "echo" vs "puts" on a Linux version of modelsim, you will see "puts" output going to the terminal that launches the Modelsim process, whereas "echo" prints to the Modelsim console output.

    I never bothered to figure out how to redirect puts, I just used echo in my scripts

    Cheers,
    Dave

  9. #9
    Join Date
    Jun 2013
    Location
    The Netherlands
    Posts
    415
    Rep Power
    1

    Default Re: tcl commands in Altera Modelsim

    I would do the same but I have a lot of automated simulations and thus many files to change. Apart from that I also take input using gets and I assume I will run in to some problems there.

  10. #10
    Join Date
    Aug 2005
    Location
    California
    Posts
    4,522
    Rep Power
    1

    Default Re: tcl commands in Altera Modelsim

    I would do the same but I have a lot of automated simulations and thus many files to change. Apart from that I also take input using gets and I assume I will run in to some problems there.
    Yeah, I'd agree that there is a pretty good chance that you'll run into trouble there.

    Chances are Mentor have been asked this question in the past. If you have a Mentor Site ID and service contract, just file a service request. If you do not, ask me, and I'll file one ... since I am interested in the answer

    Cheers,
    Dave

Similar Threads

  1. Difference between Altera Modelsim and Modelsim by Mentor?
    By cttmoon in forum Quartus II and EDA Tools Discussion
    Replies: 6
    Last Post: March 16th, 2010, 03:27 AM
  2. altera aware tcl interpreter
    By fruehwirth in forum Quartus II and EDA Tools Discussion
    Replies: 1
    Last Post: November 27th, 2009, 12:35 AM
  3. ModelSim TCL Scripts
    By tjsrh7 in forum Quartus II and EDA Tools Discussion
    Replies: 2
    Last Post: July 27th, 2009, 12:28 AM
  4. Modelsim Altera 6.1g
    By shah_Satish2002 in forum Quartus II and EDA Tools Discussion
    Replies: 12
    Last Post: May 8th, 2009, 02:28 AM
  5. Using ModelSim-Altera with Altera designs
    By rlanier in forum Quartus II and EDA Tools Discussion
    Replies: 11
    Last Post: January 22nd, 2008, 06:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •