cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ldm_as
Observer
Observer
1,440 Views
Registered: ‎09-04-2019

[Questa] Available TCL commands

Jump to solution

Hi All,

What TCL commands are available in ModelSim/Questa?

I've found the following commands do not work for me:

  • grep
  • which
  • puts

What's the replacement for the commands? Where can I see available TCL commands for Questa?

Thank you!

0 Kudos
1 Solution

Accepted Solutions
ldm_as
Observer
Observer
1,414 Views
Registered: ‎09-04-2019
0 Kudos
10 Replies
rshekhaw
Xilinx Employee
Xilinx Employee
1,430 Views
Registered: ‎05-22-2018

Hi @ldm_as ,

If you are looking for TCL commands specific for Questa,

I will suggest you to contact on Mentor Forum for more appropriate assistance on your query.

Thanks,

Raj

0 Kudos
ldm_as
Observer
Observer
1,427 Views
Registered: ‎09-04-2019

could you help with URL? cannot find the Questa Forum on the web ...

0 Kudos
rshekhaw
Xilinx Employee
Xilinx Employee
1,416 Views
Registered: ‎05-22-2018

Hi @ldm_as ,

Search on web as "Mentor Graphics Forums/Community."

I guess that will fulfil your requirement.

thanks,

Raj

0 Kudos
ldm_as
Observer
Observer
1,415 Views
Registered: ‎09-04-2019
0 Kudos
rshekhaw
Xilinx Employee
Xilinx Employee
1,406 Views
Registered: ‎05-22-2018

Hi @ldm_as ,

Do you have further queries on this? If not, please close this thread by marking it as accepted solution. 

Thanks,

Raj

0 Kudos
richardhead
Scholar
Scholar
1,385 Views
Registered: ‎08-01-2012

grep and which are not tcl commands, they are linux system commands. In TCL, any command it doesnt understand is passed back to the OS, so if you're on windows they wont work.

puts is a tcl command, and should work fine - what happens when you try?

ldm_as
Observer
Observer
1,371 Views
Registered: ‎09-04-2019

"if you're on windows they wont work" - no, I'm in Linux, but 'puts' and 'which' do not work for me in Questa shell (Transcript window)

"puts is a tcl command, and should work fine - what happens when you try?" - nothing happens... When I enter for example puts "ABC", I'm getting a blank line back. When I enter echo "ABC", it returns ABC as expected: 

%> puts "ABC"
%> 
%> echo "ABC"
%> ABC

Actually the puts command has the following format:

puts [-newline] [channelID] <string>

Probably I'm a wrong channel? How to know/modify the channelID?

Thanks!

 

0 Kudos
richardhead
Scholar
Scholar
1,365 Views
Registered: ‎08-01-2012

I get the feeling the transcript window doesnt natively to tcl commands. Echo is a system command so it is returning what the OS does. Try writing a .tcl file and then writing

do some_file.tcl

0 Kudos
ldm_as
Observer
Observer
1,358 Views
Registered: ‎09-04-2019

OK, I've created a try.tcl file, which contains a single command "puts ABC", ran it with 'do try.tcl', the command doesn't work...

Actually I write a lot of TCL scripts with procs, aliases, etc, they works, but some commands like 'puts' do not... I really wolder to know why these commands do not work ...

0 Kudos
kenryan2
Explorer
Explorer
738 Views
Registered: ‎04-22-2015

In Questa, "puts" outputs to the OS shell window not the transcript window.  "echo" prints a string to the transcript window.

I don't know why either.

0 Kudos