Verify Tcl Setup

To run your Tcl scripts you have a few options. You can run them from the command line or terminal (may require additional software), Vivado, Quartus, or my personal favorite using the widget provided on each of the tutorial pages (this requires no additional software and you can skip to Printing to the Outside World).  

Running Tcl scripts from the command prompt

The first thing we need to do is determine if your computer can run Tcl scripts or if additional software is needed. If using a Windows machine open the command window by going to the start menu and typing cmd into the search bar. If using Linux or Mac open the terminal window by right-clicking on the desktop and selecting terminal. In the new command/terminal window type tclsh and press enter. If the command is accepted and you now see a % percent sign then we are in business and can skip to Outputting Strings to Console. If the % percent sign does not appear or command is not accepted then follow the steps below to download the required software.

Download ActiveTcl by going to https://www.activestate.com/activetcl/downloads and clicking the download button. Run the executable and follow the steps outlined on in the wizard. Repeat the steps above to verify that ActiveTcl was installed correctly.

Running Tcl from Vivado

After opening Vivado you should see a Tcl window typically at the bottom. If the window is not present go to the toolbar and click window->Tcl Console. In the Tcl window navigate to the directory where your Tcl scripts reside by typing cd path\to\your\directory. To run your Tcl scripts type the command tclsh tclSript.tcl.

 

JOIN OUR NEWSLETTER
I agree to receive email updates when new content is posted and receive promotional emails when new courses are available
Enjoying the article? Receive free updates when new content is published and courses are available.
We hate spam. Your email address will not be sold or shared with anyone else.
Christopher Hogstrom
christopher.hogstrom@grittyengineer.com

Leave a Reply

Your email address will not be published. Required fields are marked *