https://github.com/conneroisu/cpre488-mp1
mp1
https://github.com/conneroisu/cpre488-mp1
Last synced: 3 months ago
JSON representation
mp1
- Host: GitHub
- URL: https://github.com/conneroisu/cpre488-mp1
- Owner: conneroisu
- Created: 2025-02-11T01:31:01.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-18T18:15:26.000Z (3 months ago)
- Last Synced: 2025-02-18T18:25:30.559Z (3 months ago)
- Language: Tcl
- Size: 42.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cpre488-mp1
mp1
## Development
### Workflow
First, Run the update script assocuated with your OS:
```
# Windows
./scripts/update_vivado.bat# Linux
./scripts/update_vivado.sh
```1. When first starting a project, create it in a folder called `vivado_project`
(e.g. `PROJECT_NAME/vivado_project`). All the untracked files will be under this directory.2. Place your source files anywhere you want in your project folder
(e.g. `PROJECT_NAME/src`).Here is an example of a possible project structure:
```
PROJECT_NAME
├── .git
├── .gitignore
├── project_name.tcl # Project generator script
├── src/ # Tracked source files
│ ├── design/
│ │ ├── *.v
│ │ └── *.vhd
│ ├── testbench/
│ │ ├── *.v
│ │ └── *.vhd
│ └── ...
├── ips/ # Tracked project-specific IP repository
│ ├── my_first_ip/
│ │ ├── src/
│ │ ├── xgui/
│ │ └── component.xml
│ ├── my_second_ip/
│ └── ...
└── vivado_project/ # Untracked generated files
├── project_name.xpr
├── project_name.cache/
├── project_name.hw/
├── project_name.sim/
├── project_name.srcs/
│ ├── sources_1/
│ │ ├── bd/ # BDs are regenerated from script
│ │ │ ├── my_bd/
│ │ │ └── ...
│ │ └── imports/hdl/ # BD wrappers are also regenerated
│ │ ├── my_bd_wrapper.{v,vhd}
│ │ └── ...
│ │
│ └── ...
└── ...
```3. Initialize the git repository with `git init` on the Tcl Console. This will
create the repository, automatically change to your project directory
(`PROJECT_NAME`), generate the `.gitignore` file and stage it.4. Stage your source files with `git add`.
5. When you are done, `git commit` your project. A `PROJECT_NAME.tcl`
script will be created in your `PROJECT_NAME` folder and added to your commit.- **Note**: Always use the `-m` argument to pass your message when committing.
This is needed because the Tcl Console on Vivado cannot handle terminal-based
editors.6. Afterwards, when opening the project after cloning it, do it by using
`Tools -> Run Tcl Script...` and selecting the `PROJECT_NAME.tcl` file
created earlier. This will regenerate the project so that you can continue to work.
> Block design supportIf a block design is present, Tcl procedures will be integrated in the project generator file to regenerate it. Make sure to specify it as when creating the Block Design with the GUI, so that it is created inside the vivado_project directory.
The script will also automatically create and add the BD wrapper to the project.
The wrapper of the .bd file must be called ${bd_name}_wrapper (e.g. my_awesome_bd_wrapper if your BD is called my_awesome_bd), which is the default when creating in the GUI with Create HDL Wrapper....
The BD wrapper that is automatically generated by Vivado must not be tracked by Git. If you need to manually modify the BD wrapper generated by Vivado, you can write a handwritten wrapper to the generated wrapper and put only the handwritten one under source control.
Also note that the layout information of the block design will not be kept.
Board part and IP repositories pathsOnly board part and IP repositories inside the project are stored in the project generator script.
If you have a system wide board part or IP repository, you will need to add it manually after recreating the project from the Tcl script (e.g. via Settings --> Board Repository).
### Developer Tooling[ccls](https://github.com/MaskRay/ccls)
[nvc](https://github.com/nickg/nvc)
[vhdl-ls](https://github.com/VHDL-LS/rust_hdl)
[ghdl](https://github.com/ghdl/ghdl)### Configuration Files
#### ccls
At the root of the project exists a `.ccls` file. This file is used to configure ccls.