How to Run Digilent Tcl Format Projects
by NAEastland in Circuits > Computers
2674 Views, 3 Favorites, 0 Comments
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)
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.
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.
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.
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).
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.