Skip to content

Commit

Permalink
adding syntax checking in the CheckPrjConfig() proc
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed Mar 2, 2017
1 parent b6abc45 commit 6fab1c9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions vivado_proc.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,28 @@ proc CheckPrjConfig { } {
return false
}

# Check for syntax errors
set syntaxReport [check_syntax -fileset sources_1 -return_string -quiet -verbose]
set syntaxReport [split ${syntaxReport} "\n"]
set listErr ""
foreach msg ${syntaxReport} {
if { [string match {*Syntax error *} ${msg}] == 1 } {
set listErr "${listErr}\n${msg}"
}
}
if { ${listErr} != "" } {
set listErr [string map {"ERROR: \[#UNDEF\]" ""} ${listErr} ]
set listErr [string map {"CRITICAL WARNING: \[HDL 9-806\]" ""} ${listErr} ]
puts "\n\n\n\n\n********************************************************"
puts "********************************************************"
puts "********************************************************"
puts "The following syntax error(s) were detected before synthesis:${listErr}"
puts "********************************************************"
puts "********************************************************"
puts "********************************************************\n\n\n\n\n"
return false
}

# Check SDK
return [CheckSdkSrcPath]
}
Expand Down

0 comments on commit 6fab1c9

Please sign in to comment.