|
1 | 1 | # digilent-vitis-scripts
|
2 | 2 | Set of scripts for managing Vitis workspaces with git.
|
| 3 | + |
| 4 | +## Glossary |
| 5 | + * XSCT = Xilinx Software Command-Line Tool |
| 6 | + * XSA = Xilinx Shell Architecture, handoff file including all relevent data from a Vivado design, including address maps, instantiated IP, etc. |
| 7 | + * TODO |
| 8 | + |
| 9 | + |
| 10 | +---- |
| 11 | +## Quick Guide |
| 12 | + |
| 13 | +TODO: Simple instructions for cloning and checking out a repository using this as a submodule |
| 14 | + |
| 15 | +Repositories using this submodule should be cloned recursively (`git clone --recursive <URL>`), or recursively initialized and updated, if already cloned non-recursively (`git submodule update --init --recursive`). |
| 16 | + |
| 17 | +When launching Vitis, whether through Vivado's Tools menu, or on its own, the workspace should be specified as the parent repository's sw/workspace folder. |
| 18 | + |
| 19 | +Individual scripts present in this repository can be run through the use of XSCT, which is built into Vitis. This tool can be opened from the Vitis GUI through the *Xilinx > XSCT Console* option in the menu bar at the top of the window. Upon launch, XSCT's current working directory is set to the Vitis install directory. To recreate the workspace, the following sequence of commands is recommended: |
| 20 | + |
| 21 | +`cd [getws]; source ../scripts/create_workspace.xsct.tcl` |
| 22 | + |
| 23 | +**Note:** *The current working directory is irrelevant to the functionality of the scripts in this submodule. The cd command is used only to simplify the path used in the source command.* |
| 24 | + |
| 25 | +---- |
| 26 | +## File Structure |
| 27 | + |
| 28 | +The parent repository must contain all Vitis-related information in one directory, which will be referred to as `sw`. This folder must contain the following: |
| 29 | + |
| 30 | + * `workspace` - Working directory for the local repository. |
| 31 | + * `scripts` - digilent-vitis-scripts, this submodule. |
| 32 | + * `workspace_info.xsct.tcl` - Script for the Xilinx Software Command-Line Tool that contains information about the workspace not handled by source files. |
| 33 | + * `handoff/*.xsa` - Single handoff file, as exported from Vivado. Used to recreate the platform project. |
| 34 | + * `app/<app name>/<sources>` - Application project sources for each application project present in the workspace. |
| 35 | + * `bsp/<domain name>/*.mss` - MSS files for each domain present in the (single) platform project. |
| 36 | + * `lib` - *Placeholder* directory intended for submodule libraries depended upon by applications in the workspace. |
| 37 | + |
| 38 | +Several notes must be made about this model and its current implementation: |
| 39 | + - Multiple application projects are not currently handled. This is a high priority issue. |
| 40 | + - It does not currently handle modified FSBL sources or BIF files. |
| 41 | + - Several settings are not able to be automatically resolved, requiring that the workspace_info script be manually edited - particularly the application project's language and template . |
| 42 | + |
| 43 | +---- |
| 44 | +## Scripts |
| 45 | +### create_workspace.xsct.tcl |
| 46 | + |
| 47 | +Populates the parent repository's sw/workspace folder with a Vitis Workspace using sources and information pulled from the parent repository. |
| 48 | + |
| 49 | +---- |
| 50 | +### config_workspace.xsct.tcl |
| 51 | +#### Intent |
| 52 | + |
| 53 | +Pulls changes to sources without symlinks from version control into the workspace. |
| 54 | + |
| 55 | +#### Current Implementation |
| 56 | + |
| 57 | +Updates the platform based on the XSA file and each domain based on the corresponding MSS files. |
| 58 | + |
| 59 | +---- |
| 60 | +### checkin_workspace.xsct.tcl |
| 61 | + |
| 62 | +Not yet implemented. |
| 63 | + |
| 64 | +Writes a mostly-complete workspace_info.tcl script into the parent repository, collects and copies workspace sources and configuration files into the parent repo's sw directory. Writes a template gitignore into the parent repo's sw directory. |
0 commit comments