
TCL Script Directory Structure

The TCL Script directory is organized as shown below:

     HW 
     |
     |----src
     |     |---components
     |     |---constraints
     |     |---hdl
     |     |---stimulus
     |     |---1_create_design.tcl
     |     |---2_constrain_design.tcl
     |     |---3_sim_flow.tcl
     |     |---4_implement_design.tcl
     |     |---5_program_design.tcl
     |
     |----common
	 |     |---common.tcl
	 |
     |----script.tcl
	 |
     |----TCL_Script_readme.txt


TCL Script Folders
 
HW/src folder contains the following folders:
* components: contains core configuration TCLs, which are required to create the design.
* constraints: contains IO, user timing, and floor planning constraints,if applicable.
* hdl: contains HDL files, if applicable.
* stimulus: contains test bench and other required files for simulation, if applicable.


TCL Files

HW/src includes the following TCL files:
* 1_create_design.tcl: executes all the required core configuration TCLs with necessary user HDL files from src folder to create the design.
* 2_constraints.tcl: imports all the constraints which are required for the design.
* 3_sim_flow.tcl: imports the test bench, other required simulation files and simulate the design.
* 4_implement_design.tcl: runs synthesis, place & route, and verify timing.
* 5_program_design.tcl: creates the programming job file.

HW/common includes the following TCL file:
* common.tcl: provides all the IP core versions required to implement the design.

* script.tcl: this is the top-level script, which creates the Libero_Project directory, sets device, project name, and device information. It invokes all the above TCLs which are required to complete the Libero Design flow.

Running the TCL

The TCL scripts are validated for Libero v2025.1 and IP versions as specified in the common.tcl. To run the TCL, follow:
1. Launch the Libero software
2. Select Project > Execute Script.... 
3. Click Browse and select script.tcl from the downloaded HW directory.
4. Click Run.
After successful execution of TCL script, Libero project is created within HW directory.

Updating TCL for New Libero Versions and IP Versions
 
Update the IP Core versions in the common.tcl and run the TCL flow in the new Libero version. By default, the given TCL script should run for new Libero and IP releases.

If there are any mismatches in execution, check the following:
1. For Libero related errors, check Libero release notes for changes related to the design components/tools or changes to TCL commands.
2. For IP core related errors, check the IP handbook and release notes for changes in IP configuration parameters, ports and their functionality. If necessary, update the IP configuration parameters, ports and connections in the TCL.

Refer to LiberoŽ SoC TCL Command Reference Guide for more details on TCL commands. Contact Techsupport if you run into any TCL related queries.
