Skip to content

Commit

Permalink
Fix reference files for Vivado
Browse files Browse the repository at this point in the history
  • Loading branch information
olofk committed Nov 13, 2024
1 parent 3509127 commit 623377e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions tests/test_vivado/edif_netlist/test_vivado_0_run.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Create a bin file which can be used to program the flash on the FPGA
set_property STEPS.WRITE_BITSTREAM.ARGS.BIN_FILE true [get_runs impl_1]
if { [llength [list_property [get_runs impl_1] STEPS.WRITE_BITSTREAM.ARGS.BIN_FILE]] } {
set_property STEPS.WRITE_BITSTREAM.ARGS.BIN_FILE true [get_runs impl_1]
}

# Vivado will raise an error if impl_1 is launched when it is already done. So
# check the progress first and only launch if its not complete.
Expand Down Expand Up @@ -29,5 +31,6 @@ if { [get_property PROGRESS [get_runs impl_1]] != "100%"} {
# The Vivado default name is beneficial when using the GUI, as it is set as
# default bitstream in the "Program Device" dialog; non-standard names need to
# be selected from a file picker first.
set vivadoDefaultBitstreamFile [ get_property DIRECTORY [current_run] ]/[ get_property top [current_fileset] ].bit
file copy -force $vivadoDefaultBitstreamFile [pwd]/[current_project].bit
foreach vivadoBitstreamFile [glob -path [file rootname [get_property DIRECTORY [current_run]]/[get_property top [current_fileset]]] .{bit,bif}] {
file copy -force $vivadoBitstreamFile [pwd]/[current_project][file extension $vivadoBitstreamFile]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Create a bin file which can be used to program the flash on the FPGA
set_property STEPS.WRITE_BITSTREAM.ARGS.BIN_FILE true [get_runs impl_1]
if { [llength [list_property [get_runs impl_1] STEPS.WRITE_BITSTREAM.ARGS.BIN_FILE]] } {
set_property STEPS.WRITE_BITSTREAM.ARGS.BIN_FILE true [get_runs impl_1]
}

# Vivado will raise an error if impl_1 is launched when it is already done. So
# check the progress first and only launch if its not complete.
Expand Down Expand Up @@ -29,5 +31,6 @@ if { [get_property PROGRESS [get_runs impl_1]] != "100%"} {
# The Vivado default name is beneficial when using the GUI, as it is set as
# default bitstream in the "Program Device" dialog; non-standard names need to
# be selected from a file picker first.
set vivadoDefaultBitstreamFile [ get_property DIRECTORY [current_run] ]/[ get_property top [current_fileset] ].bit
file copy -force $vivadoDefaultBitstreamFile [pwd]/[current_project].bit
foreach vivadoBitstreamFile [glob -path [file rootname [get_property DIRECTORY [current_run]]/[get_property top [current_fileset]]] .{bit,bif}] {
file copy -force $vivadoBitstreamFile [pwd]/[current_project][file extension $vivadoBitstreamFile]
}

0 comments on commit 623377e

Please sign in to comment.