22 {no_bitstream "If set, the bitstream file will not be produced."}
23 {recreate "If set, the project will be re-created if it already exists."}
24 {no_reset "If set, runs (synthesis and implementation) won't be reset before launching them."}
25 {check_syntax "If set, the HDL syntax will be checked at the beginning of the workflow."}
26 {njobs.arg 4 "Number of jobs. Default: 4"}
27 {ext_path.arg "" "Sets the absolute path for the external libraries."}
28 {lib.arg "" "Compiled simulation library path"}
29 {synth_only "If set, only the synthesis will be performed."}
30 {impl_only "If set, only the implementation will be performed. This assumes synthesis should was already done."}
31 {simset.arg "" "Simulation sets, separated by commas, to be run."}
32 {verbose "If set, launch the script in verbose mode"}
35 set usage " \[OPTIONS\] <directive> <project>\n The most common <directive> values are CREATE (or C), WORKFLOW (or W), SIMULATE (or S).
37 ** Directives (case insensitive):
38 - CREATE or C: Create the project, replacing it if already existing.
39 - WORKFLOW or W: Launches the complete workflow, creates the project if not existing.
40 - CREATEWORKFLOW or CW: Creates the project -even if existing- and launches the complete workflow.
41 - SIMULATE or S: Simulate the project, creating it if not existing.
42 - IMPLEMENT: Runs the implementation only, the project must already exist and be synthesised.
43 - SYNTHESIS: Runs the synthesis only, creates the project if not existing.
44 - LIST or L: Only list all the projects
48 set tcl_path [
file normalize "[
file dirname [
info script]]"]
49 source $tcl_path/hog.tcl
53 set argv $quartus(args)
56 Msg Debug "s: $::argv0 a: $argv"
58 lassign [
InitLauncher $::argv0 $tcl_path $parameters $usage $argv] directive project project_name group_name repo_path old_path bin_dir top_path cmd ide
60 Msg Debug "Returned by InitLauncher: $project $project_name $group_name $repo_path $old_path $bin_dir $top_path $cmd"
63 set do_implementation 0
set do_synthesis 0
set do_bitstream 0
set do_create 0
set do_compile 0
set do_simulation 0
set recreate 0
set reset 1
65 switch -regexp -- $directive {
72 \^I(MPL(EMENT(ATION)?)?)?$ {
73 set do_implementation 1
78 \^SYNT(H(ESIS(E)?)?)? {
83 \^S(IM(ULAT(ION|E)?)?)?$ {
89 set do_implementation 1
95 \^(CREATEWORKFLOW|CW)$ {
96 set do_implementation 1
104 Msg Status "ERROR: Unknown directive $directive.\n\n[
cmdline::usage $parameters $usage]"
111 Msg Status "\n\nPossible projects are:"
115 }
elseif {$cmd == -2} {
117 Msg Status "ERROR: You must specify a project with directive $directive.\n\n[
cmdline::usage $parameters $usage]"
118 Msg Status "\n Possible projects are:"
123 }
elseif {$cmd == 0} {
125 Msg Info "$::argv0 was launched from the IDE."
129 Msg Info "Launching command: $cmd..."
132 set ret [
catch {
exec which $ide}]
134 Msg Error "$ide not found in your system. Make sure to add $ide to your PATH enviromental variable."
138 if {[
string first libero $cmd] >= 0} {
141 set libero_script [open "launch-libero-hog.sh" w]
142 puts $libero_script "#!/bin/sh"
143 puts $libero_script $cmd
145 set cmd "sh launch-libero-hog.sh"
150 set ret [
catch {
exec -ignorestderr {*}$cmd >@ stdout} result]
153 Msg Error "IDE returned an error state."
159 if {[
string first libero $cmd] >= 0} {
160 file delete "launch-libero-hog.sh"
171 if {[
info exists env(HOG_TCLLIB_PATH)]} {
172 lappend auto_path $env(HOG_TCLLIB_PATH)
174 puts "ERROR: To run Hog with Microsemi Libero SoC, you need to define the HOG_TCLLIB_PATH variable."
179 if {[
catch {
package require cmdline} ERROR] || [
catch {
package require struct::matrix} ERROR]} {
180 puts "$ERROR\n Tcllib not found. If you are running this script on tclsh for debuggin purpose ONLY, you can fix this by installing 'tcllib'"
184 lassign [
GetOptions $::argv $parameters $usage] option_list arg_list
186 if {[
catch {
array set options [
cmdline::getoptions option_list $parameters $usage]}] || [
llength $arg_list] != 2 } {
190 set main_folder [
file normalize "$repo_path/Projects/$project_name/$project.runs/"]
192 set main_folder [
file normalize "$repo_path/Projects/$project_name/"]
194 set main_sim_folder [
file normalize "$repo_path/Projects/$project_name/$project.sim/"]
200 set project_path [
file normalize "$repo_path/Projects/$project_name/"]
204 if { $options(no_bitstream) == 1 } {
209 if { $options(recreate) == 1 } {
213 if { $options(synth_only) == 1} {
214 set do_implementation 0
221 if { $options(impl_only) == 1} {
222 set do_implementation 0
230 if { $options(no_reset) == 1 } {
234 if { $options(check_syntax) == 1 } {
238 if { $do_simulation == 1 } {
239 set simsets $options(simset)
242 if { $options(ext_path) != ""} {
243 set ext_path $options(ext_path)
246 if {$options(lib)!= ""} {
247 set lib_path [
file normalize $options(lib)]
249 if {[
info exists env(HOG_SIMULATION_LIB_PATH)]} {
250 set lib_path $env(HOG_SIMULATION_LIB_PATH)
252 if {[
file exists "$repo_path/SimulationLib"]} {
253 set lib_path [
file normalize "$repo_path/SimulationLib"]
262 if { $options(verbose) == 1 } {
263 variable ::DEBUG_MODE 1
266 Msg Info "Number of jobs set to $options(njobs)."
278 set project_file [
file normalize $repo_path/Projects/$project_name/$project.ppr]
280 set project_file [
file normalize $repo_path/Projects/$project_name/$project.xpr]
283 if {[
file exists $project_file]} {
284 Msg Info "Found project file $project_file for $project_name."
287 Msg Info "Project file not found for $project_name."
291 if {($proj_found == 0 || $recreate == 1) && ($do_synthesis == 1 || $do_create == 1)} {
292 Msg Info "Creating (possibly replacing) the project $project_name..."
293 lassign [
GetConfFiles $repo_path/Top/$project_name] conf sim pre post
295 if {[
file exists $conf]} {
297 CreateProject -simlib_path $lib_path $project_name $repo_path
299 Msg Error "Project $project_name is incomplete: no hog.conf file found, please create one..."
302 Msg Info "Opening existing project file $project_file..."
303 file mkdir "$repo_path/Projects/$project_name/$project.gen/sources_1"
304 open_project $project_file
308 if { $check_syntax == 1 } {
310 Msg Info "Checking syntax option is not supported by Xilinx PlanAhead. Skipping.."
312 Msg Info "Checking syntax for project $project_name..."
313 set syntax [check_syntax -return_string]
315 if {[
string first "CRITICAL" $syntax] != -1} {
321 Msg Debug "Skipping syntax check for project $project_name"
325 if {$reset == 1 && $do_create == 0} {
326 Msg Info "Resetting run before launching synthesis..."
332 source $tcl_path/../../Hog/Tcl/integrated/pre-synthesis.tcl
335 if {$do_synthesis == 1} {
336 launch_runs synth_1 -jobs $options(njobs) -dir $main_folder
338 set prog [get_property PROGRESS [get_runs synth_1]]
339 set status [get_property STATUS [get_runs synth_1]]
340 Msg Info "Run: synth_1 progress: $prog, status : $status"
348 lassign [
GetRepoVersions [
file normalize ./Top/$project_name] $repo_path $ext_path] sha
350 Msg Info "Git describe set to $describe"
353 set xci_file [get_property IP_FILE $ip]
355 set xci_path [
file dirname $xci_file]
356 set xci_ip_name [
file rootname [
file tail $xci_file]]
357 foreach rptfile [glob -nocomplain -directory $xci_path *.rpt] {
358 file copy $rptfile $bin_dir/$project_name-$describe/reports
383 if {$prog ne "100%"} {
384 Msg Error "Synthesis error, status is: $status"
387 Msg Debug "Skipping synthesis (and IP handling)..."
392 if {$do_implementation == 1 } {
394 Msg Info "Starting implementation flow..."
395 if { $reset == 1 && $do_create == 0} {
396 Msg Info "Resetting run before launching implementation..."
400 if {[
IsISE]} {source $tcl_path/../../Hog/Tcl/integrated/pre-implementation.tcl}
401 launch_runs impl_1 -jobs $options(njobs) -dir $main_folder
403 if {[
IsISE]} {source $tcl_path/../../Hog/Tcl/integrated/post-implementation.tcl}
405 set prog [get_property PROGRESS [get_runs impl_1]]
406 set status [get_property STATUS [get_runs impl_1]]
407 Msg Info "Run: impl_1 progress: $prog, status : $status"
412 set status_file [open "$main_folder/timing.txt" "w"]
413 puts $status_file "## $project_name Timing summary"
415 set f [open [
lindex [glob "$main_folder/impl_1/*.twr" 0]]]
417 while {[
gets $f line] >= 0} {
418 if { [
string match "Timing summary:" $line] } {
419 while {[
gets $f line] >= 0} {
420 if { [
string match "Timing errors:*" $line] } {
421 set errs [regexp -inline -- {[0-9]+} $line]
423 if { [
string match "*Footnotes*" $line] } {
426 puts $status_file "$line"
435 Msg Info "Time requirements are met"
436 file rename -force "$main_folder/timing.txt" "$main_folder/timing_ok.txt"
439 Msg CriticalWarning "Time requirements are NOT met"
440 file rename -force "$main_folder/timing.txt" "$main_folder/timing_error.txt"
446 set wns [get_property STATS.WNS [get_runs [current_run]]]
447 set tns [get_property STATS.TNS [get_runs [current_run]]]
448 set whs [get_property STATS.WHS [get_runs [current_run]]]
449 set ths [get_property STATS.THS [get_runs [current_run]]]
451 if {$wns >= 0 && $whs >= 0} {
452 Msg Info "Time requirements are met"
453 set status_file [open "$main_folder/timing_ok.txt" "w"]
456 Msg CriticalWarning "Time requirements are NOT met"
457 set status_file [open "$main_folder/timing_error.txt" "w"]
461 Msg Status "*** Timing summary ***"
462 Msg Status "WNS: $wns"
463 Msg Status "TNS: $tns"
464 Msg Status "WHS: $whs"
465 Msg Status "THS: $ths"
471 puts $status_file "## $project_name Timing summary"
473 m add row "| **Parameter** | \"**value (ns)**\" |"
474 m add row "| --- | --- |"
475 m add row "| WNS: | $wns |"
476 m add row "| TNS: | $tns |"
477 m add row "| WHS: | $whs |"
478 m add row "| THS: | $ths |"
480 puts $status_file [m format 2string]
481 puts $status_file "\n"
482 if {$timing_ok == 1} {
483 puts $status_file " Time requirements are met."
485 puts $status_file "Time requirements are **NOT** met."
487 puts $status_file "\n\n"
491 if {$prog ne "100%"} {
492 Msg Error "Implementation error"
495 if {$do_bitstream == 1} {
496 Msg Info "Starting write bitstream flow..."
499 Msg Info "running pre-bitstream"
500 source $tcl_path/../../Hog/Tcl/integrated/pre-bitstream.tcl
501 launch_runs impl_1 -to_step Bitgen $options(njobs) -dir $main_folder
503 Msg Info "running post-bitstream"
504 source $tcl_path/../../Hog/Tcl/integrated/post-bitstream.tcl
505 }
elseif { [
string first Vivado [version]] ==0} {
507 launch_runs impl_1 -to_step [
BinaryStepName [get_property PART [current_project]]] $options(njobs) -dir $main_folder
511 set prog [get_property PROGRESS [get_runs impl_1]]
512 set status [get_property STATUS [get_runs impl_1]]
513 Msg Info "Run: impl_1 progress: $prog, status : $status"
515 if {$prog ne "100%"} {
516 Msg Error "Write bitstream error, status is: $status"
520 Msg Status "*** Timing summary (again) ***"
521 Msg Status "WNS: $wns"
522 Msg Status "TNS: $tns"
523 Msg Status "WHS: $whs"
524 Msg Status "THS: $ths"
531 lassign [
GetRepoVersions [
file normalize ./Top/$project_name] $repo_path] sha
533 Msg Info "Git describe set to $describe"
535 set dst_dir [
file normalize "$bin_dir/$project_name\-$describe"]
540 if {[
file exists $main_folder/versions.txt]} {
541 file copy -force $main_folder/versions.txt $dst_dir
543 Msg Warning "No versions file found in $main_folder/versions.txt"
546 set timing_files [ glob -nocomplain "$main_folder/timing_*.txt"]
547 set timing_file [
file normalize [
lindex $timing_files 0]]
549 if {[
file exists $timing_file]} {
550 file copy -force $timing_file $dst_dir/
552 Msg Warning "No timing file found, not a problem if running locally"
557 if {$do_simulation == 1} {
560 if {$simsets != ""} {
561 set simsets_todo [
split $simsets ","]
562 Msg Info "Will run only the following simsets (if they exist): $simsets_todo"
567 set sim_dic [dict create]
569 Msg Info "Retrieving list of simulation sets..."
570 foreach s [get_filesets] {
571 set type [get_property FILESET_TYPE $s]
572 if {$type eq "SimulationSrcs"} {
573 if {$simsets_todo != "" && $s ni $simsets_todo} {
574 Msg Info "Skipping $s as it was not specified with the -simset option..."
577 if {[
file exists "$repo_path/Top/$project_name/list/$s.sim"]} {
578 set fp [open "$repo_path/Top/$project_name/list/$s.sim" r]
579 set file_data [read $fp]
581 set data [
split $file_data "\n"]
582 set n [
llength $data]
583 Msg Info "$n lines read from $s.sim"
585 set firstline [
lindex $data 0]
587 if { [regexp {^ *\#Simulator} $firstline] } {
588 set simulator_prop [regexp -all -inline {\S+} $firstline]
589 set simulator [
string tolower [
lindex $simulator_prop 1]]
591 Msg Warning "Simulator not set in $s.sim. The first line of $s.sim should be #Simulator <SIMULATOR_NAME>, where <SIMULATOR_NAME> can be xsim, questa, modelsim, riviera, activehdl, ies, or vcs, e.g. #Simulator questa. Setting simulator by default as xsim."
594 if {$simulator eq "skip_simulation"} {
595 Msg Info "Skipping simulation for $s"
598 set_property "target_simulator" $simulator [current_project]
599 Msg Info "Creating simulation scripts for $s..."
600 current_fileset -simset $s
601 set sim_dir $main_sim_folder/$s/behav
602 if { ([
string tolower $simulator] eq "xsim") } {
603 set sim_name "xsim:$s"
604 if { [
catch { launch_simulation -simset [get_filesets $s]} log] } {
605 Msg CriticalWarning "Simulation failed for $s, error info: $::errorInfo"
606 lappend failed $sim_name
608 lappend success $sim_name
611 Msg Info "Simulation library path is set to $lib_path."
613 if {!([
file exists $lib_path])} {
614 Msg Warning "Could not find simulation library path: $lib_path, $simulator simulation will not work."
618 if {$simlib_ok == 1} {
619 set_property "compxlib.${simulator}_compiled_library_dir" [
file normalize $lib_path] [current_project]
620 launch_simulation -scripts_only -simset [get_filesets $s]
621 set top_name [get_property TOP $s]
622 set sim_script [
file normalize $sim_dir/$simulator/]
623 Msg Info "Adding simulation script location $sim_script for $s..."
624 lappend sim_scripts $sim_script
625 dict append sim_dic $sim_script $s
627 Msg Error "Cannot run $simulator simulations without a valid library path"
635 if {[
info exists sim_scripts]} {
637 Msg Info "Generating IP simulation targets, if any..."
639 foreach ip [get_ips] {
640 generate_target simulation -quiet $ip
645 Msg Info "====== Starting simulations runs ======"
648 foreach s $sim_scripts {
651 Msg Info " ************* Compiling: $s ************* "
653 set sim_name "comp:[dict get $sim_dic $s]"
655 Msg CriticalWarning "Compilation failed for $s, error info: $::errorInfo"
656 lappend failed $sim_name
658 lappend success $sim_name
660 Msg Info "###################### Compilation log starts ######################"
661 Msg Info "\n\n$log\n\n"
662 Msg Info "###################### Compilation log ends ######################"
665 if { [
file exists "./elaborate.sh"] } {
666 set cmd ./elaborate.sh
667 Msg Info " ************* Elaborating: $s ************* "
669 set sim_name "elab:[dict get $sim_dic $s]"
671 Msg CriticalWarning "Elaboration failed for $s, error info: $::errorInfo"
672 lappend failed $sim_name
674 lappend success $sim_name
676 Msg Info "###################### Elaboration log starts ######################"
677 Msg Info "\n\n$log\n\n"
678 Msg Info "###################### Elaboration log ends ######################"
680 set cmd ./simulate.sh
681 Msg Info " ************* Simulating: $s ************* "
685 if {[
info exists env(HOG_SIMPASS_STR)]} {
686 Msg Info "Searching for simulation pass string: '$env(HOG_SIMPASS_STR)'"
687 if {[
string first $env(HOG_SIMPASS_STR) $log] == -1} {
692 set sim_name "sim:[dict get $sim_dic $s]"
694 Msg CriticalWarning "Simulation failed for $s, error info: $::errorInfo"
695 lappend failed $sim_name
697 lappend success $sim_name
699 Msg Info "###################### Simulation log starts ######################"
700 Msg Info "\n\n$log\n\n"
701 Msg Info "###################### Simulation log ends ######################"
707 if {[
llength $success] > 0} {
708 set successes [
join $success "\n"]
709 Msg Info "The following simulation sets were successful:\n\n$successes\n\n"
712 if {[
llength $failed] > 0} {
713 set failures [
join $failed "\n"]
714 Msg Error "The following simulation sets have failed:\n\n$failures\n\n"
716 }
elseif {[
llength $success] > 0} {
717 Msg Info "All the [
llength $success] compilations, elaborations and simulations were successful."
720 Msg Info "Simulation done."
733 if { [
catch {
package require ::quartus::project} ERROR] } {
734 Msg Error "$ERROR\n Can not find package ::quartus::project"
738 Msg Info "Loaded package ::quartus::project"
741 if {[
file exists "$project_path/$project.qpf"]} {
742 Msg Info "Found project file $project.qpf for $project_name."
745 Msg Warning "Project file not found for $project_name."
749 if { $proj_found == 0 || $recreate == 1 || $do_create == 1} {
750 Msg Info "Creating (possibly replacing) the project $project_name..."
751 lassign [
GetConfFiles $repo_path/Top/$project_name] conf sim pre post tcl_file
753 if {[
file exists $conf]} {
754 CreateProject -simlib_path $lib_path $project_name $repo_path
756 Msg Error "Project $project_name is incomplete: not Tcl file or hog.conf file found."
760 if {[
file exists "$project_path"]} {
763 Msg Error "Project directory not found for $project_name."
767 if { ![is_project_open] } {
768 Msg Info "Opening existing project file $project_name..."
769 project_open $project -current_revision
772 Msg Info "Number of jobs set to $options(njobs)."
773 set_global_assignment -name NUM_PARALLEL_PROCESSORS $options(njobs)
780 if { $check_syntax == 1 } {
781 Msg Info "Checking syntax for project $project_name..."
782 lassign [
GetHogFiles -list_files "*.src" "$repo_path/Top/$project_name/list/" $repo_path] src_files dummy
783 dict for {lib files} $src_files {
785 set file_extension [file extension $f]
786 if { $file_extension == ".vhd" || $file_extension == ".vhdl" || $file_extension == ".v" || $file_extension == ".sv" } {
787 if { [catch {execute_module -tool map -args "--analyze_file=$f"} result]} {
788 Msg Error "\nResult: $result\n"
789 Msg Error "Check syntax failed.\n"
791 if { $result == "" } {
792 Msg Info "Check syntax was successful for $f.\n"
794 Msg Warning "Found syntax error in file $f:\n $result\n"
803 lassign [
GetRepoVersions [
file normalize $repo_path/Top/$project_name] $repo_path] sha
806 set revision [get_current_revision]
807 if { $do_compile == 1 } {
808 if {[
catch {execute_flow -compile} result]} {
809 Msg Error "Result: $result\n"
810 Msg Error "Full compile flow failed. See the report file.\n"
812 Msg Info "Full compile Flow was successful for revision $revision.\n"
814 if {[
file exists "output_files/versions.txt"]} {
815 set dst_dir [
file normalize "$repo_path/bin/$project_name\-$describe"]
817 file copy -force "output_files/versions.txt" $dst_dir
823 if { $do_synthesis == 1 } {
827 set tool_and_command [
split [get_global_assignment -name PRE_FLOW_SCRIPT_FILE] ":"]
828 set tool [
lindex $tool_and_command 0]
829 set pre_flow_script [
lindex $tool_and_command 1]
830 set cmd "$tool -t $pre_flow_script quartus_map $project $revision"
836 Msg Warning "Can not execute command $cmd"
837 Msg Warning "LOG: $log"
839 Msg Info "Pre flow script executed!"
843 if { ![is_project_open] } {
844 Msg Info "Re-opening project file $project_name..."
845 project_open $project -current_revision
849 if {[
catch {execute_module -tool map -args "--parallel"} result]} {
850 Msg Error "Result: $result\n"
851 Msg Error "Analysis & Synthesis failed. See the report file.\n"
853 Msg Info "Analysis & Synthesis was successful for revision $revision.\n"
859 if { $do_implementation == 1 } {
860 if {[
catch {execute_module -tool fit} result]} {
861 Msg Error "Result: $result\n"
862 Msg Error "Place & Route failed. See the report file.\n"
864 Msg Info "\nINFO: Place & Route was successful for revision $revision.\n"
869 if { $do_bitstream == 1 } {
870 if {[
catch {execute_module -tool asm} result]} {
871 Msg Error "Result: $result\n"
872 Msg Error "Generate bitstream failed. See the report file.\n"
874 Msg Info "Generate bitstream was successful for revision $revision.\n"
881 if {[
catch {execute_module -tool sta -args "--do_report_timing"} result]} {
882 Msg Error "Result: $result\n"
883 Msg Error "Time Quest failed. See the report file.\n"
885 Msg Info "Time Quest was successfully run for revision $revision.\n"
888 set panel "Timing Analyzer||Timing Analyzer Summary"
889 set device [ get_report_panel_data -name $panel -col 1 -row_name "Device Name"]
890 set timing_model [ get_report_panel_data -name $panel -col 1 -row_name "Timing Models"]
891 set delay_model [ get_report_panel_data -name $panel -col 1 -row_name "Delay Model"]
893 Msg Info "*******************************************************************"
894 Msg Info "Device: $device"
895 Msg Info "Timing Models: $timing_model"
896 Msg Info "Delay Model: $delay_model"
899 Msg Info "*******************************************************************"
910 set project_file [
file normalize $repo_path/Projects/$project_name/$project.prjx]
912 if {[
file exists $project_file]} {
913 Msg Info "Found project file $project_file for $project_name."
916 Msg Info "Project file not found for $project_name."
920 if {($proj_found == 0 || $recreate == 1) && ($do_synthesis == 1 || $do_create == 1)} {
921 Msg Info "Creating (possibly replacing) the project $project_name..."
922 lassign [
GetConfFiles $repo_path/Top/$project_name] conf sim pre post
924 if {[
file exists $conf]} {
925 CreateProject -simlib_path $lib_path $project_name $repo_path
927 Msg Error "Project $project_name is incomplete: no hog.conf file found, please create one..."
930 Msg Info "Opening existing project file $project_file..."
931 open_project -file $project_file -do_backup_on_convert 1 -backup_file {./Projects/$project_file.zip}
935 if { $check_syntax == 1 } {
936 Msg Info "Checking syntax option is not supported for Microchip Libero Soc yet. Skipping.."
939 defvar_set -name RWNETLIST_32_64_MIXED_FLOW -value 0
943 if {$do_synthesis == 1} {
944 Msg Info "Run SYNTHESIS..."
945 if {[
catch {run_tool -name {SYNTHESIZE}}] } {
946 Msg Error "SYNTHESIZE FAILED!"
948 Msg Info "SYNTHESIZE PASSED!"
951 Msg Debug "Skipping synthesis (and IP handling)..."
956 if {$do_implementation == 1 } {
958 Msg Info "Starting implementation flow..."
959 if {[
catch {run_tool -name {PLACEROUTE}}] } {
960 Msg Error "PLACEROUTE FAILED!"
962 Msg Info "PLACEROUTE PASSED."
968 Msg Info "Run VERIFYTIMING ..."
969 if {[
catch {run_tool -name {VERIFYTIMING} -script {Hog/Tcl/integrated/libero_timing.tcl}}] } {
970 Msg CriticalWarning "VERIFYTIMING FAILED!"
972 Msg Info "VERIFYTIMING PASSED \n"
976 if {$do_bitstream == 1} {
977 Msg Info "Starting write bitstream flow..."
978 Msg Info "Run GENERATEPROGRAMMINGDATA ..."
979 if {[
catch {run_tool -name {GENERATEPROGRAMMINGDATA}}] } {
980 Msg Error "GENERATEPROGRAMMINGDATA FAILED!"
982 Msg Info "GENERATEPROGRAMMINGDATA PASSED."
984 Msg Info "Sourcing Hog/Tcl/integrated/post-bitstream.tcl"
985 source $tcl_path/../../Hog/Tcl/integrated/post-bitstream.tcl
991 lassign [
GetRepoVersions [
file normalize ./Top/$project_name] $repo_path] sha
993 Msg Info "Git describe set to $describe"
995 set dst_dir [
file normalize "$bin_dir/$project_name\-$describe"]
996 file mkdir $dst_dir/reports
999 if {[
file exists $main_folder/versions.txt]} {
1000 file copy -force $main_folder/versions.txt $dst_dir
1002 Msg Warning "No versions file found in $main_folder/versions.txt"
1005 set timing_file_path [
file normalize "$repo_path/Projects/timing_libero.txt"]
1006 if {[
file exists $timing_file_path]} {
1007 file copy -force $timing_file_path $dst_dir/reports/Timing.txt
1008 set timing_file [open $timing_file_path "r"]
1009 set status_file [open "$dst_dir/timing.txt" "w"]
1010 puts $status_file "## $project_name Timing summary\n\n"
1011 puts $status_file "| | |"
1012 puts $status_file "| --- | --- |"
1013 while {[
gets $timing_file line] >= 0} {
1014 if { [
string match "SUMMARY" $line] } {
1015 while {[
gets $timing_file line] >= 0} {
1016 if { [
string match "END SUMMARY" $line] } {
1019 if {[
string first ":" $line] == -1} {
1022 set out_string "| [
string map {: | } $line] |"
1023 puts $status_file "$out_string"
1028 Msg Warning "No timing file found, not a problem if running locally"
1035 Msg Error "Impossible condition. You need to run this in an IDE."
1039 Msg Info "All done."