2019-06-28 03:18:13 +03:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# post_flow_vivado.tcl
|
|
|
|
# Konstantin Pavlov, pavlovconst@gmail.com
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# INFO ------------------------------------------------------------------------
|
|
|
|
# Use this script as a boilerplate for custom reporting or report analisys
|
|
|
|
# for Vivado IDE. Your custom messages will be reported in messages window
|
|
|
|
# after all normal compilation messages
|
|
|
|
#
|
|
|
|
# Set this script as a post.tcl for "Generate bitstream" step
|
|
|
|
|
|
|
|
#===============================================================================
|
|
|
|
|
2021-10-18 09:23:55 +03:00
|
|
|
puts "=== post_flow_vivado ================================================="
|
|
|
|
|
|
|
|
# compuiting elapsed time
|
2019-06-28 03:18:13 +03:00
|
|
|
set hs 0
|
|
|
|
set ms 0
|
|
|
|
set ss 0
|
|
|
|
set hs_t 0
|
|
|
|
set ms_t 0
|
|
|
|
set ss_t 0
|
|
|
|
|
|
|
|
scan [get_property STATS.ELAPSED [get_runs synth_1]] "%d:%d:%d" hs ms ss
|
2020-04-07 14:14:19 +03:00
|
|
|
puts [ join [ list "synth: " [puts [format "%02d:%02d:%02d" $hs $ms $ss]] ] "" ]
|
2019-06-28 03:18:13 +03:00
|
|
|
set hs_t [expr {$hs_t + $hs} ]
|
|
|
|
set ms_t [expr {$ms_t + $ms} ]
|
|
|
|
set ss_t [expr {$ss_t + $ss} ]
|
|
|
|
|
|
|
|
scan [get_property STATS.ELAPSED [get_runs impl_1]] "%d:%d:%d" hs ms ss
|
2020-04-07 14:14:19 +03:00
|
|
|
puts [ join [ list "impl: " [puts [format "%02d:%02d:%02d" $hs $ms $ss]] ] "" ]
|
2019-06-28 03:18:13 +03:00
|
|
|
set hs_t [expr {$hs_t + $hs} ]
|
|
|
|
set ms_t [expr {$ms_t + $ms} ]
|
|
|
|
set ss_t [expr {$ss_t + $ss} ]
|
|
|
|
|
|
|
|
while { $ss_t >= 60 } {
|
|
|
|
set ss_t [expr $ss_t - 60]
|
|
|
|
set ms_t [expr $ms_t + 1]
|
|
|
|
}
|
|
|
|
while { $ms_t >= 60 } {
|
|
|
|
set ms_t [expr $ms_t - 60]
|
|
|
|
set hs_t [expr $hs_t + 1]
|
|
|
|
}
|
2020-04-07 14:14:19 +03:00
|
|
|
puts "----------------------------------"
|
|
|
|
puts [ join [ list "TOTAL: " [format "%02d:%02d:%02d" $hs_t $ms_t $ss_t]] "" ]
|
2019-06-28 03:18:13 +03:00
|
|
|
|
|
|
|
|
2021-10-18 09:23:55 +03:00
|
|
|
# cd to project directory
|
|
|
|
set work_directory [file dirname [get_property NAME [get_files "*[get_property top [current_fileset]]*.sv" ] ]]
|
|
|
|
#set work_directory [get_property DIRECTORY [current_project]]
|
|
|
|
cd $work_directory
|
|
|
|
puts -nonewline "Changed directory to " ; pwd
|
2019-06-28 03:18:13 +03:00
|
|
|
|
2021-10-18 09:23:55 +03:00
|
|
|
puts ""
|
2019-06-28 03:18:13 +03:00
|
|
|
|