@@ -2,7 +2,6 @@ set outputDir ./_xilinx
2
2
file mkdir $outputDir
3
3
4
4
# experimental!
5
- # this old_commit value matches that in build_rom.py --placeholder_rev
6
5
proc get_gitid {} {
7
6
switch -glob -- [exec git describe --always --dirty] {
8
7
*-dirty {return [string toupper [exec git rev-parse --short=24 HEAD]]0000000000000000}
@@ -13,6 +12,7 @@ proc get_gitid {} {
13
12
proc gitid_print {gitid_arg} {
14
13
puts " #[ string repeat " -" 48] \n # gitid $gitid_arg \n #[ string repeat " -" 48] "
15
14
}
15
+ # this old_commit value matches that in build_rom.py --placeholder_rev
16
16
set old_commit [string toupper " da39a3ee5e6b4b0d3255bfef95601890afd80709" ]
17
17
set new_commit [get_gitid]
18
18
gitid_print $new_commit
@@ -50,10 +50,10 @@ add_files $file_data
50
50
set_property top " marble_top" [current_fileset]
51
51
set_property verilog_define [list " CHIP_FAMILY_7SERIES" ] [current_fileset]
52
52
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" ]
57
57
58
58
launch_runs synth_1
59
59
wait_on_run synth_1
@@ -86,4 +86,4 @@ project_rpt $my_proj_name
86
86
87
87
swap_gitid $old_commit $new_commit 16 0
88
88
89
- write_bitstream -force $build_id .$gitid .x.bit
89
+ write_bitstream -force $build_id .$gitid_for_filename .x.bit
0 commit comments