Introduction: How to Run Digilent Tcl Format Projects

Picture of How to Run Digilent Tcl Format Projects

The demonstration projects available on the Digilent Inc. website are being converted into a new format. This new format is short and simple but does merit some explanation. As with any of the projects you may be attempting to run, you will need:

  • Installed version of Vivado (Tcl demos are built in Vivado 2015.1)
  • Your Digilent board (Basys3, Nexys4DDR, etc)

Step 1: Download the Tcl Version

Make sure you have the Tcl version of the desired project available to you, either from a downloaded repository via GitHub or from the Digilent wiki.

All of the necessary files are included within each project folder, with relative file paths established, so as long as the files aren't moved around within the folder, you can move and run the project from any location. If you downloaded a .zip file from the wiki, just unzip the folder prior to proceeding.

Step 2: Find the Tcl File Location

Picture of Find the Tcl File Location

Within the project folder there will be two subfolders named "proj" and "src". As illustrated in the images above:

  • Go into the proj folder and right click the "create_project" file and select "Properties"
  • Highlight and copy the file's location.

Step 3: Open Up Vivado

Picture of Open Up Vivado

Open a new Vivado window and enter the letters 'cd' (for change directory) followed by the file location you just copied into the Tcl Console window at the bottom.

As in the image above, once you have copied there may be a pop-up with a suggested 'proj/'. If you click on this the Tcl Console will automatically flip the slashes in the address from back slashed ( / ) to forward slashes ( \ ). This is a bit mundane but is important since the console will not recognize the address with the backslashes. If it does not automatically correct them, just go in manually and replace each back slash with a forward slash.

Again, as illustrated in the images, type in "source ./" and select the auto-fill suggestion 'create_project.tcl' and hit enter.

Step 4: Run the Project

From this point the .tcl script will have created a new project with the source files, constraints, and any supplementary files included. Click 'Generate Bitstream' as normal and Vivado will go through synthesis and implementation. The build time of the demo will depend on the size/complexity of the project as well as if it includes IP cores (and how many there are).

Step 5: Clean Up Step

To run the create_project script successfully in the future, the folder it is contained in must be in its initial state. In order to facilitate this a "cleanup" script is included within the proj folder. Just double click the Windows Command Script once you have closed the project in Vivado and it will clean up the product files from the run.

!!!!CAUTION!!!!

This script is potentially dangerous if the cleanup script is moved from its location in the folder, as it erases any files that are not on its ignore list within the folder. The list of files it ignores is specific, so to avoid the chance of accidentally erasing massive amounts of files, only use it as described in the location it resides in.

Comments

JColvin91 (author)2015-08-26

Hi NAEastland,

I have a question. What exactly is "Tcl"? It looks like some sort of file extension built by Vivado? Or is a script thing that you have to build yourself somehow?

Thanks!

NAEastland (author)JColvin912015-12-15

Hey JColvin91,

Tcl, or Tool Command Language, is a scripting language developed in the late '80s by John Ousterhout while he was at Berkeley. There are lots of features to it, as it is a fully fledged scripting language, but if you are interested in leaning more about it Wikipedia is generally a good place to start!

About This Instructable

1,022views

3favorites

License:

More by NAEastland:Getting Started With PetaLinuxSetting Up TFTP Server for PetaLinuxHow to Make a 3D Printed Microcontroller Case
Add instructable to: