22 set tcl_path [
file normalize "[
file dirname [
info script]]"]
23 source $tcl_path/hog.tcl
24 source $tcl_path/create_project.tcl
25 source $tcl_path/commands.tcl
28 set globalSettings::vitis_unified 0
29 set globalSettings::vitis_classic 0
33 if {[
info commands platform] ne ""} {
34 set globalSettings::vitis_classic 1
35 set globalSettings::vitis_unified 0
42 set argv $quartus(args)
48 set commands_path [
file normalize "$tcl_path/../../hog-commands/"]
51 lassign [
InitLauncher $::argv0 $tcl_path $parameters $default_commands $argv $custom_commands] directive project \
52 project_name group_name repo_path old_path bin_dir top_path usage short_usage cmd ide list_of_options
54 array set options $list_of_options
56 if {$options(verbose) == 1} {
60 "Returned by InitLauncher: \n - project: $project \n - project_name $project_name \n - group_name $group_name \n - \
61 repo_path $repo_path \n - old_path $old_path \n - bin_dir $bin_dir \n - top_path $top_path \n - cmd $cmd"
64 if {$options(ext_path) ne ""} {
65 set ext_path $options(ext_path)
68 if {$options(lib) ne ""} {
69 set lib_path [
file normalize $options(lib)]
71 if {[
info exists env(HOG_SIMULATION_LIB_PATH)]} {
72 set lib_path $env(HOG_SIMULATION_LIB_PATH)
74 if {[
file exists "$repo_path/SimulationLib"]} {
75 set lib_path [
file normalize "$repo_path/SimulationLib"]
83 if {$options(verbose) == 1} {
86 set env(HOG_DEBUG_MODE) "1"
92 if {$options(output) ne ""} {
93 set output_path $options(output)
96 set light_hierarchy $options(light)
97 set ignored_hierarchy $options(ignore)
98 set top_module $options(top)
99 set compile_order $options(compile_order)
100 set include_ieee $options(include_ieee)
101 set include_gen_prods $options(include_gen_prods)
105 set do_checkproj_env 0
106 set do_check_ci_env 0
107 set do_checkproj_ver 0
108 set do_implementation 0
118 set do_check_syntax 0
123 set allow_empty_proj 0
130 set do_list_file_parse 0
131 set do_check_yaml_ref 0
133 set do_check_list_files 0
141 set NO_DIRECTIVE_FOUND 0
142 Msg Debug "Looking for a $directive in : $default_commands"
143 switch -regexp -- $directive $default_commands
145 if {$NO_DIRECTIVE_FOUND == 1} {
146 Msg Debug "No directive found in default commands, looking in custom commands..."
147 if {[
string length $custom_commands] > 0 && [dict exists $custom_commands $directive]} {
148 Msg Debug "Directive $directive found in custom commands."
149 if {$cmd == "custom_tcl"} {
150 eval [dict get $custom_commands $directive SCRIPT]
154 Msg Info "Launching command: $cmd..."
157 set ret [
catch {
exec which $ide}]
159 Msg Error "$ide not found in your system. Make sure to add $ide to your PATH enviromental variable."
163 if {[
string first libero $cmd] >= 0} {
166 set libero_script [open "launch-libero-hog.sh" w]
167 puts $libero_script "#!/bin/sh"
168 puts $libero_script $cmd
170 set cmd "sh launch-libero-hog.sh"
173 set ret [
catch {
exec -ignorestderr {*}$cmd >@ stdout 2>@ stderr} result]
176 Msg Error "IDE returned an error state: $result"
182 if {[
string first libero $cmd] >= 0} {
183 file delete "launch-libero-hog.sh"
189 eval [dict get $custom_commands $directive SCRIPT]
191 set no_exit [dict get $custom_commands $directive NO_EXIT]
197 Msg Info "No directive found, pre ide exiting..."
198 Msg Status "ERROR: Unknown directive $directive.\n\n"
204 if {$options(all) == 1} {
211 if {$options(ci_run) == 1} {
215 if {$options(dst_dir) == "" && ($do_ipbus_xml == 1 || $do_cheby == 1 || $do_check_list_files == 1) && $project != ""} {
217 set proj_dir [
file normalize $repo_path/Top/$group_name/$project]
218 lassign [
GetRepoVersions $proj_dir $repo_path $ext_path] commit version \
219 hog_hash hog_ver top_hash top_ver libs hashes vers cons_ver cons_hash ext_names ext_hashes xml_hash xml_ver \
220 user_ip_repos user_ip_hashes user_ip_vers cheby_hash cheby_ver
224 set dst_dir [
file normalize "$repo_path/bin/$group_name/$project\-$describe"]
229 Msg Status "\n\nPossible projects are:"
233 }
elseif {$cmd == -2} {
235 Msg Status "ERROR: You must specify a project with directive $directive."
237 Msg Status "Possible projects are:"
240 }
elseif {$cmd == 0} {
242 Msg Info "$::argv0 was launched from the IDE."
249 if {$do_checkproj_env == 1} {
254 if {$do_checkproj_ver == 1} {
259 if {[
info exists env(GITLAB_CI)] && $env(GITLAB_CI) eq "true" && [
auto_execok glab] != ""} {
261 Msg Info "Running in the GitLab CI/CD. I will check only the active projects in the current pipeline..."
264 if {[
info exists env(CI_SERVER_HOST)]} {
265 set env(GITLAB_HOST) $env(CI_SERVER_HOST)
267 if {[
info exists env(CI_PROJECT_PATH)]} {
268 lassign [
ExecuteRet glab ci get -p $env(CI_PIPELINE_ID)] ret ci_config
270 lassign [
ExecuteRet glab ci get] ret ci_config
273 Msg Warning "Failed to get CI config from GitLab, checking all projects instead."
278 if {[
info exists env(CI_CONFIG_PATH)]} {
279 set ci_config_path $env(CI_CONFIG_PATH)
281 set ci_config_path $repo_path/.gitlab-ci.yml
284 if {[
file exists $ci_config_path]} {
285 set fh [open $ci_config_path r]
286 set content [read $fh]
288 if {[
string first "hog-dynamic.yml" $content] != -1} {
292 Msg Warning "CI config file $ci_config_path not found, checking all projects instead."
295 }
elseif {[
info exists env(GITHUB_ACTIONS)] && $env(GITHUB_ACTIONS) eq "true"} {
297 set workflow_dir "$repo_path/.github/workflows"
299 foreach workflow_file [glob -nocomplain -directory $workflow_dir -- *.yml *.yaml] {
300 set fh [open $workflow_file r]
301 set content [read $fh]
303 if {[
string first "Hog-pull.yml" $content] != -1} {
304 set ci_config $content
315 if {$project_name eq ""} {
317 foreach p $projects {
318 if {$ci_run == 0 || ($ci_run == 1 && [
string first $p $ci_config] != -1)} {
319 if {[
CheckProjVer $repo_path $p $options(simcheck) $options(ext_path)] == 0} {
320 lappend proj_to_do $p
325 if {[
CheckProjVer $repo_path $project_name $options(simcheck) $options(ext_path)] == 0} {
326 lappend proj_to_do $project_name
330 set n [
llength $proj_to_do]
332 Msg Info "The following projects were modified: \n[
join $proj_to_do \n]"
335 Msg Info "$n projects were modified since last official version."
339 if {$do_check_ci_env == 1} {
345 if {$do_ipbus_xml == 1} {
346 if {[
llength $project_name] == 0} {
347 Msg Error "XML option needs a project name."
350 Msg Info "Handling IPbus XMLs for $project_name..."
352 set proj_dir $repo_path/Top/$project_name
354 if {$options(generate) == 1} {
360 if {$options(dst_dir) != ""} {
361 set dst_dir $options(dst_dir)
363 if {![
info exists dst_dir]} {
367 set xml_dst "$dst_dir/xml"
370 if {[
llength [glob -nocomplain $proj_dir/list/*.ipb]] > 0} {
371 if {![
file exists $xml_dst]} {
372 Msg Info "$xml_dst directory not found, creating it..."
376 Msg Error "No .ipb files found in $proj_dir/list/"
381 set sha [
lindex $ret 13]
382 set hex_ver [
lindex $ret 14]
385 CopyIPbusXMLs $proj_dir $repo_path $xml_dst $ver $sha 1 $xml_gen
390 if {$do_cheby == 1} {
391 Msg Info "Handling Cheby register-map outputs for $project_name..."
393 set proj_dir $repo_path/Top/$project_name
395 if {$options(generate) == 1} {
401 if {$options(dst_dir) != ""} {
402 set dst_dir $options(dst_dir)
404 set cheby_dst "$dst_dir/cheby"
406 if {[
llength [glob -nocomplain $proj_dir/list/*.chb]] > 0} {
407 if {![
file exists $cheby_dst]} {
408 Msg Info "$cheby_dst directory not found, creating it..."
409 file mkdir $cheby_dst
412 Msg Error "No .chb files found in $proj_dir/list/"
416 set cheby_tool $options(tool)
417 if {$cheby_tool eq ""} {
418 if {[
info exists env(HOG_CHEBY_TOOL)]} {
419 set cheby_tool $env(HOG_CHEBY_TOOL)
421 set cheby_tool "cheby"
425 set cheby_profile $options(profile)
426 if {$cheby_profile eq ""} {
427 set cheby_profile "all"
431 set sha [
lindex $ret 18]
432 set hex_ver [
lindex $ret 19]
436 $ver $sha $cheby_gen $cheby_profile $cheby_tool \
437 $options(strict) $options(verbose)]
440 Msg CriticalWarning "Cheby step finished with $n_errors error(s)."
446 if {$do_list_file_parse == 1} {
447 set proj_dir $repo_path/Top/$project_name
448 set proj_list_dir $repo_path/Top/$project_name/list
449 GetHogFiles -print_log -list_files {.src,.con,.sim,.ext,.ipb,.chb} $proj_list_dir $repo_path
455 if {$do_hierarchy == 1} {
456 source $tcl_path/utils/hierarchy.tcl
457 set proj_dir $repo_path/Top/$project_name
458 set proj_list_dir $repo_path/Top/$project_name/list
459 lassign [
GetHogFiles -ext_path $ext_path -list_files ".src,.ext" $proj_list_dir $repo_path] listLibraries \
460 listProperties listSrcSets
461 set hierarchy_result \
462 [
Hierarchy $listProperties $listLibraries $repo_path $output_path $compile_order $light_hierarchy $top_module \
463 $ignored_hierarchy $include_ieee $include_gen_prods]
464 puts $hierarchy_result
467 if {$do_sigasi == 1} {
469 Msg Info "Creating Sigasi CSV files for project $project_name..."
470 set proj_dir $repo_path/Top/$project_name
471 set proj_list_dir $repo_path/Top/$project_name/list
472 set project [
file tail $project_name]
473 lassign [
GetHogFiles -list_files {.src} $proj_list_dir $repo_path] libraries
474 set csv_file [open "sigasi_$project.csv" w]
475 foreach lib $libraries {
476 set source_files [
DictGet $libraries $lib]
477 foreach source_file $source_files {
479 [
file extension $source_file] eq ".vhd"
480 || [
file extension $source_file] eq ".vhdl"
481 || [
file extension $source_file] eq ".sv"
482 || [
file extension $source_file] eq ".v"
484 puts $csv_file [
concat [
file rootname $lib] "," $source_file]
488 lassign [
GetHogFiles -list_files ".sim" $proj_list_dir $repo_path] \
490 foreach lib $listSimLibraries {
491 set source_files [
DictGet $listSimLibraries $lib]
492 foreach source_file $source_files {
494 [
file extension $source_file] eq ".vhd"
495 || [
file extension $source_file] eq ".vhdl"
496 || [
file extension $source_file] eq ".sv"
497 || [
file extension $source_file] eq ".v"
499 puts $csv_file [
concat [
file rootname $lib] "," $source_file]
504 Msg Info "Sigasi CSV file created: sigasi_$project.csv"
505 Msg Info "You can use the python script provided by Sigasi to convert the generated csv file into a Sigasi project."
508 https://www.sigasi.com/knowledge/how_tos/generating-sigasi-project-vivado-project/#2-generate-the-sigasi-project-files-from-the-csv-file"
512 if {$do_vhdl_ls == 1} {
514 Msg Info "Creating VHDL-LS configuration file for project $project_name..."
515 set proj_dir $repo_path/Top/$project_name
516 set proj_list_dir $repo_path/Top/$project_name/list
517 set project [
file tail $project_name]
518 lassign [
GetHogFiles -list_files {.src} $proj_list_dir $repo_path] libraries
519 set toml_file [open "vhdl_ls_$project.toml" w]
520 puts $toml_file "\[libraries\]"
521 dict for {lib source_files} $libraries {
522 puts $toml_file "[file rootname $lib].files = \["
523 foreach source_file $source_files {
525 [file extension $source_file] == ".vhd"
526 || [file extension $source_file] == ".vhdl"
528 # puts [Relative $repo_path $source_file ]
529 puts $toml_file "\'[Relative $repo_path $source_file]\',"
532 puts $toml_file "\]\n"
535 Msg Info "VHDL-LS TOML File created: vhdl_ls_$project.toml"
537 "You can copy the content of this file into your VHDL-LS configuration vhdl_ls.toml, to import all Hog libraries."
541 if {$do_cocotb == 1} {
542 source $tcl_path/utils/cocotb.tcl
543 source $tcl_path/utils/hierarchy.tcl
548 if {$do_check_yaml_ref == 1} {
549 Msg Info "Checking if \"ref\" in .gitlab-ci.yml actually matches the included yml file in Hog submodule"
554 if {$do_buttons == 1} {
555 Msg Info "Adding Hog buttons to Vivado bar (will use the vivado currently in PATH)..."
557 set cmd "vivado -mode batch -notrace -source $repo_path/Hog/Tcl/utils/add_hog_custom_button.tcl"
560 if {$do_compile_lib == 1} {
561 if {$project eq ""} {
562 Msg Error "You need to specify a simulator as first argument."
565 set simulator $project
566 Msg Info "Selecting $simulator simulator..."
568 if {$options(dst_dir) != ""} {
569 set output_dir $options(dst_dir)
571 Msg Info "No destination directory defined. Using default: SimulationLib/"
572 set output_dir "SimulationLib"
577 "vivado -mode batch -notrace -source $repo_path/Hog/Tcl/utils/compile_simlib.tcl -tclargs -simulator $simulator \
578 -output_dir $output_dir"
582 if {$do_simulation == 1} {
584 set hdl_simsets_pre [list]
585 if {$options(simset) ne ""} {
586 foreach s $options(simset) {
587 if {![regexp {^(csim|cosim):} $s]} {
588 lappend hdl_simsets_pre $s
594 set ghdl_simsets [
GetSimSets $project_name $repo_path "$hdl_simsets_pre" 1]
596 dict for {simset_name simset_dict} $ghdl_simsets {
597 if {$ghdl_import == 0} {
598 ImportGHDL $project_name $repo_path $simset_name $simset_dict $ext_path
601 LaunchGHDL $project_name $repo_path $simset_name $simset_dict $ext_path
603 set ide_simsets [
GetSimSets $project_name $repo_path $hdl_simsets_pre 0 1]
605 if {[dict size $ide_simsets] == 0} {
607 set has_hls [
expr {$options(simset) eq ""}]
609 foreach s $options(simset) {
610 if {[regexp {^(csim|cosim):} $s]} {
617 Msg Info "All simulations have been run, exiting..."
623 if {$do_version == 1} {
625 set proj_dir $repo_path/Top/$project_name
627 if {$options(describe) == 1} {
642 Msg Info "Launching command: $cmd..."
645 set ret [
catch {
exec which $ide}]
647 if {[
string match "*vitis_unified*" $ide_name]} {
649 "This is a '$ide_name' project: make sure to add both Vivado and Vitis to your PATH environment variable."
651 Msg Error "$ide not found in your system. Make sure to add $ide to your PATH environment variable."
656 if {[
string first libero $cmd] >= 0} {
659 set libero_script [open "launch-libero-hog.sh" w]
660 puts $libero_script "#!/bin/sh"
661 puts $libero_script $cmd
663 set cmd "sh launch-libero-hog.sh"
666 set ret [
catch {
exec -ignorestderr {*}$cmd >@ stdout 2>@ stderr} result]
669 Msg Error "IDE returned an error state: $result"
675 if {[
string first libero $cmd] >= 0} {
676 file delete "launch-libero-hog.sh"
687 if {[
info exists env(HOG_TCLLIB_PATH)]} {
688 lappend auto_path $env(HOG_TCLLIB_PATH)
691 "ERROR: To run Hog with Microsemi Libero SoC or Lattice Diamond, you need to define the HOG_TCLLIB_PATH variable."
696 if {[
catch {
package require cmdline} ERROR] || [
catch {
package require struct::matrix} ERROR]} {
698 "$ERROR\n Tcllib not found. If you are running this script on tclsh for debuggin purpose ONLY, you can fix this by \
703 set run_folder [
file normalize "$repo_path/Projects/$project_name/$project.runs/"]
705 set run_folder [
file normalize "$repo_path/Projects/$project_name/"]
709 set project_path [
file normalize "$repo_path/Projects/$project_name/"]
712 if {$allow_empty_proj == 0 || $project_name ne ""} {
718 set ide_name [
lindex [regexp -all -inline {\S+} $ide_name_and_ver] 0]
722 [list vivado vivado_vitis_classic vivado_vitis_unified vitis_classic vitis_unified quartus planahead libero diamond \
724 if {$ide_name ni $supported_ides} {
725 if {$ide_name eq "vitis"} {
727 "The IDE set in hog.conf ('vitis') is not supported. Did you mean 'vitis_unified' or 'vitis_classic'? Supported \
728 IDEs: [
join $supported_ides {, }]"
730 Msg Error "The IDE set in hog.conf ('$ide_name') is not supported. Supported IDEs: [
join $supported_ides {, }]"
737 ([
string tolower $ide_name] eq "vivado_vitis_classic" || [
string tolower $ide_name] eq "vitis_classic")
738 && ($options(vivado_only) != 1)
740 set globalSettings::vitis_classic 1
741 set globalSettings::vitis_unified 0
743 ([
string tolower $ide_name] eq "vivado_vitis_unified" || [
string tolower $ide_name] eq "vitis_unified")
744 && ($options(vivado_only) != 1)
746 set globalSettings::vitis_classic 0
747 set globalSettings::vitis_unified 1
748 if {[
auto_execok vitis] eq ""} {
750 "Vitis Unified IDE is required for project $project_name but 'vitis' was not found in PATH. Please source Vitis \
754 set globalSettings::vitis_classic 0
755 set globalSettings::vitis_unified 0
759 if {$ide_name eq "vitis_unified" || $ide_name eq "vitis_classic"} {
760 set options(vitis_only) 1
763 set is_vitis_ide [
expr {$globalSettings::vitis_classic == 1 || $globalSettings::vitis_unified == 1}]
764 set is_build_step [
expr {$do_synthesis == 1 || $do_implementation == 1 || $do_compile == 1}]
765 if {$is_vitis_ide && $options(vitis_only) == 1 && $is_build_step} {
770 if {$options(no_bitstream) == 1} {
775 if {$options(recreate) == 1} {
779 if {$options(synth_only) == 1} {
780 set do_implementation 0
787 if {$options(impl_only) == 1} {
788 set do_implementation 1
795 if {$options(vitis_only) == 1 || $ide_name eq "vitis_classic" || $ide_name eq "vitis_unified"} {
796 set do_implementation 0
802 if {$options(bitstream_only) == 1} {
803 set do_bitstream_only 1
805 set do_implementation 0
810 set do_bitstream_only 0
813 if {$options(no_reset) == 1} {
817 if {$options(check_syntax) == 1} {
818 set do_check_syntax 1
821 if {$options(scripts_only) == 1} {
825 if {$options(compile_only) == 1} {
830 Msg Info "Number of jobs set to $options(njobs)."
836 if {$options(vitis_only) == 1 && ($ide_name eq "vitis_unified" || $ide_name eq "vivado_vitis_unified")} {
838 set project_file [
file normalize $repo_path/Projects/$project_name/vitis_unified/_ide/settings.json]
839 Msg Info "Setting project file for Vitis Unified project $project_name to $project_file"
840 }
elseif {$options(vitis_only) == 1 && ($ide_name eq "vitis_classic" || $ide_name eq "vivado_vitis_classic")} {
842 set project_file [
file normalize $repo_path/Projects/$project_name/vitis_classic/.metadata/]
843 Msg Info "Setting project file for Vitis Classic project $project_name to $project_file"
846 set project_file [
file normalize $repo_path/Projects/$project_name/$project.ppr]
849 set project_file [
file normalize $repo_path/Projects/$project_name/$project.xpr]
852 set project_file [
file normalize $repo_path/Projects/$project_name/vitis_classic/.metadata/]
853 Msg Info "Setting project file for Vitis Classic project $project_name to $project_file"
856 set project_file [
file normalize $repo_path/Projects/$project_name/vitis_unified/_ide/settings.json]
857 Msg Info "Setting project file for Vitis Unified project $project_name to $project_file"
859 if {[
catch {
package require ::quartus::project} ERROR]} {
860 Msg Error "$ERROR\n Can not find package ::quartus::project"
864 Msg Info "Loaded package ::quartus::project"
867 set project_file "$project_path/$project.qpf"
869 set project_file [
file normalize $repo_path/Projects/$project_name/$project.prjx]
872 set project_file [
file normalize $repo_path/Projects/$project_name/$project.ldf]
874 Msg Error "Unknown IDE, can't set project file path."
878 if {[
file exists $project_file]} {
879 Msg Info "Found project file $project_file for $project_name."
884 set repo_norm [
file normalize $repo_path]
885 set rel [
string trimleft [
string range $project_file [
string length $repo_norm] end] "/"]
887 foreach start_dir [list [
file dirname [
info script]] [
pwd]] {
889 Msg Debug "FindRepoRoot([list $start_dir]) => [list $repo_candidate]"
890 if {$repo_candidate ne ""} {
891 set project_file_alt [
file join $repo_candidate $rel]
893 if {[
file exists $project_file_alt]} {
895 }
elseif {$options(vitis_only) == 1 && [
string match "*vitis_unified*" $rel]} {
896 set ide_dir [
file join $repo_candidate Projects $project_name vitis_unified _ide]
897 if {[
file exists $ide_dir]} {
901 if {$options(vitis_only) == 1 && [
string match "*vitis_unified*" $rel]} {
903 "Checking file [list $project_file_alt] exists=[
file exists $project_file_alt]; _ide dir [list $ide_dir] \
904 exists=[
file exists $ide_dir]"
906 Msg Debug "Checking [list $project_file_alt] exists=[
file exists $project_file_alt]"
909 set project_file $project_file_alt
910 set repo_path $repo_candidate
911 Msg Info "Found project file $project_file for $project_name."
918 Msg Info "Project file not found for $project_name."
922 if {$proj_found == 0 && $do_upgrade_ips == 1} {
923 Msg Error "Project $project_name not found. UPGRADE_IP requires an existing project."
925 }
elseif {($proj_found == 0 || $recreate == 1)} {
927 Msg Info "Creating (possibly replacing) the project $project_name..."
928 Msg Debug "launch.tcl: calling GetConfFiles with $repo_path/Top/$project_name"
929 lassign [
GetConfFiles $repo_path/Top/$project_name] conf sim pre post pre_rtl post_rtl
931 if {[
file exists $conf]} {
932 set globalSettings::vitis_only_pass $options(vitis_only)
933 if {$options(vivado_only) == 1} {
934 CreateProject -simlib_path $lib_path -xsa $options(xsa) -vivado_only $project_name $repo_path
935 }
elseif {$options(vitis_only) == 1} {
936 CreateProject -simlib_path $lib_path -xsa $options(xsa) -vitis_only $project_name $repo_path
938 CreateProject -simlib_path $lib_path -xsa $options(xsa) $project_name $repo_path
940 Msg Info "Done creating project $project_name."
941 if {$options(vitis_only) == 1 && ($ide_name eq "vitis_unified" || $ide_name eq "vivado_vitis_unified")} {
942 set project_file [
file join $repo_path Projects $project_name vitis_unified _ide settings.json]
945 Msg Error "Project $project_name is incomplete: no hog.conf file found, please create one..."
947 }
elseif {$proj_found == 0} {
948 Msg Error "Project $project_name not found. Please create it first using the 'CREATE' or 'C' directive."
951 Msg Info "Opening existing project file $project_file..."
952 if {$options(vitis_only) == 1 && ($ide_name eq "vitis_unified" || $ide_name eq "vivado_vitis_unified")} {
953 set vitis_workspace [
file normalize $repo_path/Projects/$project_name/vitis_unified/]
954 Msg Info "Setting Vitis Unified workspace to $vitis_workspace"
956 file mkdir "$repo_path/Projects/$project_name/$project.gen/sources_1"
959 set vitis_workspace [
file normalize $repo_path/Projects/$project_name/vitis_classic/]
960 Msg Info "Setting workspace to $vitis_workspace"
962 set vitis_workspace [
file normalize $repo_path/Projects/$project_name/vitis_unified/]
963 Msg Info "Setting workspace to $vitis_workspace"
969 if {$do_upgrade_ips == 1} {
971 Msg Error "The UPGRADE_IP directive is only supported for Vivado projects."
980 if {$do_check_syntax == 1} {
981 if {$ide_name eq "vitis_unified" || $ide_name eq "vitis_classic"} {
982 Msg Info "Skipping syntax check for $project_name: pure Vitis project has no HDL syntax to check"
984 Msg Info "Checking syntax for project $project_name..."
991 lassign [
GetConfFiles $repo_path/Top/$project_name] conf sim pre post pre_rtl post_rtl
995 if {$do_vitis_build == 1} {
998 set conf_file_path [
file normalize "$repo_path/Top/$project_name/hog.conf"]
999 if {[
file exists $conf_file_path]} {
1000 set proj_properties [
ReadConf $conf_file_path]
1001 set hls_components [dict filter $proj_properties key {hls:*}]
1002 if {[dict size $hls_components] > 0} {
1003 Msg Info "Found [dict size $hls_components] HLS component(s), launching HLS build..."
1007 set has_apps [
expr {[dict size [dict filter $proj_properties key {app:*}]] > 0}]
1015 Msg Error "Vitis build is not supported for $ide_name (only Vitis Classic and Vitis Unified are supported)"
1021 if {$do_synthesis == 1} {
1022 LaunchSynthesis $do_reset $do_create $run_folder $project_name $repo_path $ext_path $options(njobs)
1025 if {$do_implementation == 1} {
1026 LaunchImplementation $do_reset $do_create $run_folder $project_name $repo_path $options(njobs) $do_bitstream
1029 if {$do_bitstream_only == 1 && [
IsXilinx]} {
1031 }
elseif {$do_bitstream_only == 1 && ![
IsXilinx]} {
1032 Msg Error "Bitstream only option is not supported for this IDE."
1035 if {$do_bitstream == 1 && ![
IsXilinx]} {
1039 if {$do_simulation == 1} {
1041 set hdl_simsets [list]
1042 set hls_simsets [list]
1043 if {$options(simset) ne ""} {
1044 foreach s $options(simset) {
1045 if {[regexp {^(csim|cosim):} $s]} {
1046 lappend hls_simsets $s
1048 lappend hdl_simsets $s
1052 set run_hdl [
expr {[llength $hdl_simsets] > 0 || $options(simset) eq ""}]
1053 set run_hls [
expr {[llength $hls_simsets] > 0 || $options(simset) eq ""}]
1057 set simsets [
GetSimSets $project_name $repo_path $hdl_simsets]
1058 if {[dict size $simsets] > 0} {
1059 LaunchSimulation $project_name $lib_path $simsets $repo_path $scripts_only $compile_only
1070 if {$do_check_list_files} {
1071 Msg Info "Running list file checker..."
1078 set argv0 check_list_files
1079 if {$ext_path ne ""} {
1080 set argv [list "-ext_path" "$ext_path" "-outDir" "$dst_dir" "-pedantic"]
1082 set argv [list "-outDir" "$dst_dir" "-pedantic"]
1085 source $tcl_path/utils/check_list_files.tcl
1090 Msg Info "All done."