Browse Source

feat: add flag 'use-bd-files' and create function for bd-wrapper creation

master
Dennis Buchhorn 2 years ago
parent
commit
fcb4c7eeb5
2 changed files with 16 additions and 2 deletions
  1. +2
    -2
      scripts/git_wrapper.tcl
  2. +14
    -0
      scripts/write_project_tcl_git.tcl

+ 2
- 2
scripts/git_wrapper.tcl View File

@ -97,7 +97,7 @@ namespace eval ::git_wrapper {
set proj_file [current_project].tcl
# Generate project and add it
write_project_tcl_git -no_copy_sources -force $proj_file
write_project_tcl_git -no_copy_sources -use_bd_files -force $proj_file
puts $proj_file
exec git add $proj_file
@ -120,6 +120,6 @@ namespace eval ::git_wrapper {
# Generate project
set proj_file [current_project].tcl
puts $proj_file
write_project_tcl_git -no_copy_sources -force $proj_file
write_project_tcl_git -no_copy_sources -use_bd_files -force $proj_file
}
}

+ 14
- 0
scripts/write_project_tcl_git.tcl View File

@ -375,6 +375,8 @@ proc write_project_tcl_script {} {
if { !$a_global_vars(b_arg_use_bd_files) } {
wr_bd
wr_bd_bc_specific
} else {
wr_bd_create_wrapper
}
# write BC and RM filesets to handle extra files(ELF, XDC) added
@ -815,6 +817,18 @@ proc add_references { sub_design } {
}
}
proc wr_bd_create_wrapper {} {
# Get all BD files in the design
set bd_files [get_files -norecurse *.bd -filter "IS_BLOCK_CONTAINER_MANAGED == 0"]
foreach bd_file $bd_files {
# Add wrapper creation
set bd_filename [file tail $bd_file]
lappend l_script_data "\n# Create wrapper file for $bd_filename"
lappend l_script_data "make_wrapper -files \[get_files $bd_filename\] -import -top\n"
}
}
proc wr_bd {} {
# Summary: write procs to create BD's
# Return Value: None


Loading…
Cancel
Save