Skip to content

Commit 013c236

Browse files
committed
marble.tcl: gitid variables renamed and comment adjustment
1 parent 8328357 commit 013c236

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

projects/test_marble_family/marble.tcl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ set outputDir ./_xilinx
22
file mkdir $outputDir
33

44
# experimental!
5-
# this old_commit value matches that in build_rom.py --placeholder_rev
65
proc get_gitid {} {
76
switch -glob -- [exec git describe --always --dirty] {
87
*-dirty {return [string toupper [exec git rev-parse --short=24 HEAD]]0000000000000000}
@@ -13,6 +12,7 @@ proc get_gitid {} {
1312
proc gitid_print {gitid_arg} {
1413
puts "#[string repeat "-" 48]\n# gitid $gitid_arg\n#[string repeat "-" 48]"
1514
}
15+
# this old_commit value matches that in build_rom.py --placeholder_rev
1616
set old_commit [string toupper "da39a3ee5e6b4b0d3255bfef95601890afd80709"]
1717
set new_commit [get_gitid]
1818
gitid_print $new_commit
@@ -50,10 +50,10 @@ add_files $file_data
5050
set_property top "marble_top" [current_fileset]
5151
set_property verilog_define [list "CHIP_FAMILY_7SERIES"] [current_fileset]
5252

53-
# Get git commit ID
54-
set gitid [exec git describe --always --abbrev=8 --dirty]
55-
set gitid_v 32'h$gitid
56-
set new_defs [list "GIT_32BIT_ID=$gitid_v" "REVC_1W"]
53+
# Get shorter git commit ID for verilog and bitfile filename
54+
set gitid_for_filename [exec git describe --always --abbrev=8 --dirty]
55+
set gitid_for_verilog 32'h$[string range $gitid_for_filename 0 7]
56+
set new_defs [list "GIT_32BIT_ID=$gitid_for_verilog" "REVC_1W"]
5757

5858
launch_runs synth_1
5959
wait_on_run synth_1
@@ -86,4 +86,4 @@ project_rpt $my_proj_name
8686

8787
swap_gitid $old_commit $new_commit 16 0
8888

89-
write_bitstream -force $build_id.$gitid.x.bit
89+
write_bitstream -force $build_id.$gitid_for_filename.x.bit

0 commit comments

Comments
 (0)