Skip to content

Commit 140a1c2

Browse files
Bail in synthesis if inferred latches are detected (#299)
1 parent 4290209 commit 140a1c2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tools/vivado_gen/templates/synth.jinja2

+9-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ set report_file [lindex $argv 1]
1818
# synthesis related settings
1919
set_part {{project.part}}
2020

21+
# Turn inferred latch warnings into errors
22+
2123
# Load the sources
2224
{% for source in project.sources %}
2325
{% set suffix = source.path.suffix %}
@@ -56,4 +58,10 @@ report_utilization -file $report_file
5658
{% for file in project.post_synth_tcl_files %}
5759
source {{file.absolute().as_posix()}}
5860
{% endfor %}
59-
write_checkpoint -force $output_checkpoint
61+
write_checkpoint -force $output_checkpoint
62+
63+
# WARNING: [Synth 8-327] inferring latch for variable ....
64+
if {[get_msg_config -count -id {Synth 8-327}] != 0} {
65+
puts "ERROR: One or more inferred latches were found. Please check the synthesis report for details: WARNING: [Synth 8-327] inferring latch for...."
66+
exit 1
67+
}

0 commit comments

Comments
 (0)