|
@ -38,17 +38,56 @@ namespace eval ::git_wrapper { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
proc git_init {args} { |
|
|
proc git_init {args} { |
|
|
|
|
|
set vivado_version [version -short] |
|
|
|
|
|
set current_project [current_project] |
|
|
|
|
|
|
|
|
# Generate gitignore file |
|
|
# Generate gitignore file |
|
|
|
|
|
puts "Generate gitignore file" |
|
|
set file [open ".gitignore" "w"] |
|
|
set file [open ".gitignore" "w"] |
|
|
puts $file "vivado_project/*" |
|
|
puts $file "vivado_project/*" |
|
|
puts $file ".Xil/*" |
|
|
puts $file ".Xil/*" |
|
|
puts $file "*.str" |
|
|
puts $file "*.str" |
|
|
puts $file "*.log" |
|
|
puts $file "*.log" |
|
|
|
|
|
puts $file "*.jobs" |
|
|
|
|
|
puts $file "*.jou" |
|
|
|
|
|
close $file |
|
|
|
|
|
|
|
|
|
|
|
# Generate readme file |
|
|
|
|
|
puts "Generate readme file" |
|
|
|
|
|
set file [open "README.md" "w"] |
|
|
|
|
|
puts $file "# ${current_project}" |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "Created with Vivado Version ${vivado_version}" |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "### Getting started" |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "After cloning this repo open the project with Vivado by using `Tools -> Run Tcl Script...` and selecting the `${current_project}.tcl` file" |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "### Workflow" |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "- Place source/design files in folder created in the top directory of the repo (e.g. `REPO/src/` or `REPO/design/`)." |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "- **The `vivado_project` folder will be untracked!**" |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "- Wenn you are done, `git add` your source/design files." |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "- Use the Tcl Console from Vivado to `git commit -m \"COMMIT_MESSAGE\"` your work. The `${current_project}.tcl` file will be recreated" |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "### Notes" |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "#### Block design" |
|
|
|
|
|
puts $file "" |
|
|
|
|
|
puts $file "When you change a block design, **befor you run synthesis** you have to disable the current HDL wrapper and create a new HDL wrapper for each design!" |
|
|
close $file |
|
|
close $file |
|
|
|
|
|
|
|
|
# Initialize the repo |
|
|
# Initialize the repo |
|
|
|
|
|
puts "Initialize the repo" |
|
|
exec git {*}$args |
|
|
exec git {*}$args |
|
|
exec git add .gitignore |
|
|
exec git add .gitignore |
|
|
|
|
|
exec git add README.md |
|
|
|
|
|
git_commit commit -m "create project" |
|
|
|
|
|
|
|
|
|
|
|
puts "finished!" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
proc git_commit {args} { |
|
|
proc git_commit {args} { |
|
|