Browse Source

Rename vivado_proj to vivado_project

pull/5/head
Ricardo Barbedo 6 years ago
parent
commit
cc14fbbd0e
4 changed files with 8 additions and 8 deletions
  1. +2
    -2
      README.md
  2. +1
    -1
      scripts/alias.tcl
  3. +2
    -2
      scripts/git_wrapper.tcl
  4. +3
    -3
      scripts/write_project_tcl_git.tcl

+ 2
- 2
README.md View File

@ -32,7 +32,7 @@ Vivado is a pain in the ass to source control decently, so these scripts provide
### Workflow ### Workflow
1. When first starting with a project, create it in a folder called `vivado_proj` (e.g. `PROJECT_NAME/vivado_proj`) . All the untracked files will be under this directory.
1. When first starting with 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 (usually in the `PROJECT_NAME/src`). 2. Place your source files anywhere you want in your project folder (usually in the `PROJECT_NAME/src`).
@ -50,7 +50,7 @@ Vivado is a pain in the ass to source control decently, so these scripts provide
│ │ ├── *.v │ │ ├── *.v
│ │ └── *.vhd │ │ └── *.vhd
│ └── ... │ └── ...
└── vivado_proj/ # Untracked generated files
└── vivado_project/ # Untracked generated files
├── project_name.xpr ├── project_name.xpr
├── project_name.cache/ ├── project_name.cache/
├── project_name.hw/ ├── project_name.hw/


+ 1
- 1
scripts/alias.tcl View File

@ -13,7 +13,7 @@ namespace eval ::alias {
proc wproj {} { proc wproj {} {
# Change directory project directory if not in it yet # Change directory project directory if not in it yet
set proj_dir [regsub {\/vivado_proj$} [get_property DIRECTORY [current_project]] {}]
set proj_dir [regsub {\/vivado_project$} [get_property DIRECTORY [current_project]] {}]
set current_dir [pwd] set current_dir [pwd]
if { if {
[string compare -nocase $proj_dir $current_dir] [string compare -nocase $proj_dir $current_dir]


+ 2
- 2
scripts/git_wrapper.tcl View File

@ -19,7 +19,7 @@ namespace eval ::git_wrapper {
set command [lindex $args 0] set command [lindex $args 0]
# Change directory project directory if not in it yet # Change directory project directory if not in it yet
set proj_dir [regsub {\/vivado_proj$} [get_property DIRECTORY [current_project]] {}]
set proj_dir [regsub {\/vivado_project$} [get_property DIRECTORY [current_project]] {}]
set current_dir [pwd] set current_dir [pwd]
if { if {
[string compare -nocase $proj_dir $current_dir] [string compare -nocase $proj_dir $current_dir]
@ -39,7 +39,7 @@ namespace eval ::git_wrapper {
proc git_init {args} { proc git_init {args} {
# Generate gitignore file # Generate gitignore file
set file [open ".gitignore" "w"] set file [open ".gitignore" "w"]
puts $file "vivado_proj/*"
puts $file "vivado_project/*"
close $file close $file
# Initialize the repo # Initialize the repo


+ 3
- 3
scripts/write_project_tcl_git.tcl View File

@ -29,8 +29,8 @@
# 1. The project directory is now relative to the scripts location. # 1. The project directory is now relative to the scripts location.
# Project directory was relative to the tcl console current directory. # Project directory was relative to the tcl console current directory.
# #
# 2. When recreating a project, the generated files will be put in a "vivado_proj" directory
# under the project directory. If "vivado_proj" exists already, it will be rewritten.
# 2. When recreating a project, the generated files will be put in a "vivado_project" directory
# under the top directory. If "vivado_project" exists already, it will be rewritten.
# #
# 3. After recreating a project, the tcl console will change directory to the project directory. # 3. After recreating a project, the tcl console will change directory to the project directory.
# #
@ -475,7 +475,7 @@ proc wr_create_project { proj_dir name part_name } {
# set target project directory path if specified. If not, create project dir in current dir. # set target project directory path if specified. If not, create project dir in current dir.
set target_dir $a_global_vars(s_target_proj_dir) set target_dir $a_global_vars(s_target_proj_dir)
if { {} == $target_dir } { if { {} == $target_dir } {
set tcl_cmd "create_project \$\{project_name\} \$origin_dir/vivado_proj -part $part_name -quiet -force"
set tcl_cmd "create_project \$\{project_name\} \$origin_dir/vivado_project -part $part_name -quiet -force"
} else { } else {
# is specified target proj dir == current dir? # is specified target proj dir == current dir?
set cwd [file normalize [string map {\\ /} [pwd]]] set cwd [file normalize [string map {\\ /} [pwd]]]


Loading…
Cancel
Save