29 namespace eval globalSettings {
42 variable LIBERO_MANDATORY_VARIABLES
45 variable SIM_PROPERTIES
46 variable HOG_EXTERNAL_PATH
48 variable TARGET_SIMULATOR
50 variable pre_synth_file
51 variable post_synth_file
52 variable pre_impl_file
53 variable post_impl_file
55 variable post_bit_file
56 variable quartus_post_module_file
64 variable synth_top_module
73 variable quartus_post_module
81 set_msg_config -suppress -regexp -string {".*The IP file '.*' has been moved from its original location, as a result the outputs for this IP will now be generated in '.*'. Alternatively a copy of the IP can be imported into the project using one of the 'import_ip' or 'import_files' commands..*"}
82 set_msg_config -suppress -regexp -string {".*File '.*.xci' referenced by design '.*' could not be found..*"}
85 create_project -force [
file tail $globalSettings::DESIGN] $globalSettings::build_dir -part $globalSettings::PART
86 file mkdir "$globalSettings::build_dir/[
file tail $globalSettings::DESIGN].gen/sources_1"
87 if { [
IsVersal $globalSettings::PART] } {
88 Msg Info "This project uses a Versal device."
92 set obj [get_projects [
file tail $globalSettings::DESIGN]]
93 set_property "target_language" "VHDL" $obj
96 set_property "simulator_language" "Mixed" $obj
98 set_property "compxlib.${simulator}_compiled_library_dir" $globalSettings::simlib_path $obj
100 set_property "default_lib" "xil_defaultlib" $obj
102 set_param project.enableVHDL2008 1
103 set_property "enable_vhdl_2008" 1 $obj
105 set_property source_mgmt_mode All [current_project]
107 Msg Debug "Setting PART = $globalSettings::PART"
108 set_property PART $globalSettings::PART [current_project]
114 package require ::quartus::project
116 if {[
string equal $globalSettings::FAMILY "quartus_only"]} {
117 Msg Error "You must specify a device Family for Quartus"
119 file mkdir $globalSettings::build_dir
120 cd $globalSettings::build_dir
121 if {[is_project_open]} {
125 file delete {*}[glob -nocomplain $globalSettings::DESIGN.q*]
127 project_new -family $globalSettings::FAMILY -overwrite -part $globalSettings::PART $globalSettings::DESIGN
128 set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
133 if {[
file exists $globalSettings::build_dir]} {
134 file delete -force $globalSettings::build_dir
136 new_project -location $globalSettings::build_dir -name [
file tail $globalSettings::DESIGN] -die $globalSettings::DIE -package $globalSettings::PACKAGE -family $globalSettings::FAMILY -hdl VHDL
138 puts "Creating project for $globalSettings::DESIGN part $globalSettings::PART"
139 puts "Configuring project settings:"
140 puts " - simulator_language: Mixed"
141 puts " - target_language: VHDL"
142 puts " - simulator: QuestaSim"
143 puts "Adding IP directory \"$globalSettings::user_ip_repo\" to the project "
148 proc AddProjectFiles {} {
153 if {[
string equal [get_filesets -quiet sources_1] ""]} {
154 create_fileset -srcset sources_1
156 set sources [get_filesets sources_1]
168 if {[
string equal [get_filesets -quiet constrs_1] ""]} {
169 create_fileset -constrset constrs_1
173 set constraints [get_filesets constrs_1]
180 if {[
file isdirectory $globalSettings::list_path]} {
181 set list_files [glob -directory $globalSettings::list_path "*"]
183 Msg Error "No list directory found at $globalSettings::list_path"
187 source $globalSettings::tcl_path/utils/cmdline.tcl
191 AddHogFiles {*}[
GetHogFiles -list_files {.src,.sim,.ext} -ext_path $globalSettings::HOG_EXTERNAL_PATH $globalSettings::list_path $globalSettings::repo_path]
197 AddHogFiles {*}[
GetHogFiles -list_files {.con} -ext_path $globalSettings::HOG_EXTERNAL_PATH $globalSettings::list_path $globalSettings::repo_path]
211 proc CreateReportStrategy {obj} {
214 if {[
string equal [get_property -quiet report_strategy $obj] ""]} {
216 Msg Info "No report strategy needed for implementation"
219 set_property set_report_strategy_name 1 $obj
220 set_property report_strategy {Vivado Implementation Default Reports} $obj
221 set_property set_report_strategy_name 0 $obj
223 set reports [get_report_configs -of_objects $obj]
225 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] ""] } {
226 create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
228 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
234 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] ""] } {
235 create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
237 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
243 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] ""] } {
244 create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
246 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
252 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary] ""] } {
253 create_report_config -report_name impl_1_route_report_timing_summary -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
255 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary]
257 Msg Info "Report timing created successfully"
261 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_utilization] ""] } {
262 create_report_config -report_name impl_1_route_report_utilization -report_type report_utilization:1.0 -steps route_design -runs impl_1
264 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_utilization]
266 Msg Info "Report utilization created successfully"
271 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] ""] } {
272 create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
274 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
276 set_property -name "options.max_paths" -value "10" -objects $obj
277 set_property -name "options.warn_on_violation" -value "1" -objects $obj
282 Msg Info "Won't create any report strategy, not in Vivado"
292 proc ConfigureSynthesis {} {
296 if {[
string equal [get_runs -quiet synth_1] ""]} {
297 create_run -name synth_1 -part $globalSettings::PART -constrset constrs_1
302 set obj [get_runs synth_1]
303 set_property "part" $globalSettings::PART $obj
307 if {$globalSettings::pre_synth_file ne ""} {
311 if {[get_filesets -quiet utils_1] != ""} {
312 AddFile $globalSettings::pre_synth [get_filesets -quiet utils_1]
314 set_property STEPS.SYNTH_DESIGN.TCL.PRE $globalSettings::pre_synth $obj
318 set_global_assignment -name PRE_FLOW_SCRIPT_FILE quartus_sh:$globalSettings::pre_synth
321 configure_tool -name {SYNTHESIZE} -params SYNPLIFY_TCL_FILE:$globalSettings::pre_synth
324 Msg Debug "Setting $globalSettings::pre_synth to be run before synthesis"
328 if {$globalSettings::post_synth_file ne ""} {
332 if {[get_filesets -quiet utils_1] != ""} {
333 AddFile $globalSettings::post_synth [get_filesets -quiet utils_1]
335 set_property STEPS.SYNTH_DESIGN.TCL.POST $globalSettings::post_synth $obj
339 set_global_assignment -name POST_MODULE_SCRIPT_FILE quartus_sh:$globalSettings::quartus_post_module
342 Msg Debug "Setting $globalSettings::post_synth to be run after synthesis"
349 current_run -synthesis $obj
352 if {[
string equal [get_property -quiet report_strategy $obj] ""]} {
354 Msg Debug "No report strategy needed for synthesis"
358 set_property set_report_strategy_name 1 $obj
359 set_property report_strategy {Vivado Synthesis Default Reports} $obj
360 set_property set_report_strategy_name 0 $obj
362 if { [
string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] ""] } {
363 create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
365 set reports [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
372 Msg info "Reporting strategy for synthesis"
381 proc ConfigureImplementation {} {
385 if {[
string equal [get_runs -quiet impl_1] ""]} {
386 create_run -name impl_1 -part $globalSettings::PART -constrset constrs_1 -parent_run synth_1
389 set obj [get_runs impl_1]
390 set_property "part" $globalSettings::PART $obj
392 set_property "steps.[
BinaryStepName $globalSettings::PART].args.readback_file" "0" $obj
393 set_property "steps.[
BinaryStepName $globalSettings::PART].args.verbose" "0" $obj
402 if {$globalSettings::pre_impl_file ne ""} {
406 if {[get_filesets -quiet utils_1] != ""} {
407 AddFile $globalSettings::pre_impl [get_filesets -quiet utils_1]
409 set_property STEPS.INIT_DESIGN.TCL.POST $globalSettings::pre_impl $obj
416 Msg Debug "Setting $globalSettings::pre_impl to be run after implementation"
421 if {$globalSettings::post_impl_file ne ""} {
425 if {[get_filesets -quiet utils_1] != ""} {
426 AddFile $globalSettings::post_impl [get_filesets -quiet utils_1]
428 set_property STEPS.ROUTE_DESIGN.TCL.POST $globalSettings::post_impl $obj
432 set_global_assignment -name POST_MODULE_SCRIPT_FILE quartus_sh:$globalSettings::quartus_post_module
434 Msg Debug "Setting $globalSettings::post_impl to be run after implementation"
438 if {$globalSettings::pre_bit_file ne ""} {
442 if {[get_filesets -quiet utils_1] != ""} {
443 AddFile $globalSettings::pre_bit [get_filesets -quiet utils_1]
445 set_property STEPS.[
BinaryStepName $globalSettings::PART].TCL.PRE $globalSettings::pre_bit $obj
452 Msg Debug "Setting $globalSettings::pre_bit to be run after bitfile generation"
456 if {$globalSettings::post_bit_file ne ""} {
460 if {[get_filesets -quiet utils_1] != ""} {
461 AddFile $globalSettings::post_bit [get_filesets -quiet utils_1]
463 set_property STEPS.[
BinaryStepName $globalSettings::PART].TCL.POST $globalSettings::post_bit $obj
467 set_global_assignment -name POST_MODULE_SCRIPT_FILE quartus_sh:$globalSettings::quartus_post_module
469 Msg Debug "Setting $globalSettings::post_bit to be run after bitfile generation"
478 proc ConfigureSimulation {} {
483 Msg Debug "Setting load_glbl parameter to true for every fileset..."
484 foreach simset [get_filesets -quiet] {
485 if {[get_property FILESET_TYPE $simset] != "SimulationSrcs" } {
489 set_property -name {xsim.elaborate.load_glbl} -value {true} -objects [get_filesets $simset]
492 if {[dict exists $globalSettings::SIM_PROPERTIES $simset]} {
493 Msg Info "Setting properties for simulation set: $simset..."
494 set sim_props [dict get $globalSettings::SIM_PROPERTIES $simset]
495 dict for {prop_name prop_val} $sim_props {
496 set prop_name [string toupper $prop_name]
497 if { $prop_name == "ACTIVE" && $prop_val == 1 } {
498 Msg Info "Setting $simset as active simulation set..."
499 current_fileset -simset [ get_filesets $simset ]
501 Msg Debug "Setting $prop_name = $prop_val"
502 if {[IsInList [string toupper $prop_name] [VIVADO_PATH_PROPERTIES] 1]} {
503 # Check that the file exists before setting these properties
504 if {[file exists $globalSettings::repo_path/$prop_val]} {
505 set_property $prop_name $globalSettings::repo_path/$prop_val [get_filesets $simset]
507 Msg Warning "Impossible to set property $prop_name to $prop_val. File is missing"
510 set_property $prop_name $prop_val [get_filesets $simset]
515 if {[dict exists $globalSettings::SIM_PROPERTIES sim]} {
516 Msg Info "Setting properties for simulation set: sim..."
517 set sim_props [dict get $globalSettings::SIM_PROPERTIES sim]
518 dict for {prop_name prop_val} $sim_props {
519 Msg Debug "Setting $prop_name = $prop_val"
520 set_property $prop_name $prop_val [get_filesets $simset]
524 if {[dict exists $globalSettings::SIM_PROPERTIES hog]} {
525 set hog_sim_props [dict get $globalSettings::SIM_PROPERTIES hog]
526 dict for {prop_name prop_val} $hog_sim_props {
527 if { $prop_name == "HOG_SIMPASS_STR"} {
528 Msg Info "Setting simulation pass string as '$prop_val'"
529 set ::env(HOG_SIMPASS_STR) $prop_val
531 Msg Debug "Simulation pass string not set, relying on simulator exit code."
542 Msg info "Configuring simulation"
548 proc ConfigureProperties {} {
550 cd $globalSettings::repo_path
554 if {[
info exists globalSettings::PROPERTIES]} {
555 if {[dict exists $globalSettings::PROPERTIES main]} {
556 Msg Info "Setting project-wide properties..."
557 set proj_props [dict get $globalSettings::PROPERTIES main]
558 dict for {prop_name prop_val} $proj_props {
560 if { [ string tolower $prop_name ] != "ip_repo_paths" } {
561 if {[ string tolower $prop_name] != "part"} {
562 # Part is already set
563 Msg Debug "Setting $prop_name = $prop_val"
564 set_property $prop_name $prop_val [current_project]
567 set ip_repo_list [regsub -all {\s+} $prop_val " $globalSettings::repo_path/"]
568 set ip_repo_list $globalSettings::repo_path/$ip_repo_list
570 Msg Info "Setting $ip_repo_list as user IP repository..."
572 set_property ip_repo_paths "$ip_repo_list" [current_fileset]
574 set_property ip_repo_paths "$ip_repo_list" [current_project]
581 foreach run [get_runs -quiet] {
582 if {[dict exists $globalSettings::PROPERTIES $run]} {
583 Msg Info "Setting properties for run: $run..."
584 set run_props [dict get $globalSettings::PROPERTIES $run]
586 set stragety_str "STRATEGY strategy Strategy"
587 Msg Debug "Setting Strategy and Flow for run $run (if specified in hog.conf)"
588 foreach s $stragety_str {
589 if {[dict exists $run_props $s]} {
590 set prop [dict get $run_props $s]
591 set_property $s $prop $run
592 set run_props [dict remove $run_props $s]
593 Msg Warning "A strategy for run $run has been defined inside hog.conf. This prevents Hog to compare the project properties. Please regenerate your hog.conf file using the dedicated Hog button."
594 Msg Info "Setting $s = $prop"
598 dict for {prop_name prop_val} $run_props {
599 Msg Debug "Setting $prop_name = $prop_val"
600 if {[string trim $prop_val] == ""} {
601 Msg Warning "Property $prop_name has empty value. Skipping..."
604 if {[IsInList [string toupper $prop_name] [VIVADO_PATH_PROPERTIES] 1]} {
605 # Check that the file exists before setting these properties
606 if {[file exists $globalSettings::repo_path/$prop_val]} {
607 set_property $prop_name $globalSettings::repo_path/$prop_val $run
609 Msg Warning "Impossible to set property $prop_name to $prop_val. File is missing"
612 set_property $prop_name $prop_val $run
624 if {[
info exists globalSettings::PROPERTIES]} {
626 if {[dict exists $globalSettings::PROPERTIES main]} {
627 Msg Info "Setting device properties..."
628 set dev_props [dict get $globalSettings::PROPERTIES main]
629 dict for {prop_name prop_val} $dev_props {
630 if { !([string toupper $prop_name] in $globalSettings::LIBERO_MANDATORY_VARIABLES) } {
631 Msg Debug "Setting $prop_name = $prop_val"
632 set_device -[string tolower $prop_name] $prop_val
637 if {[dict exists $globalSettings::PROPERTIES project]} {
638 Msg Info "Setting project-wide properties..."
639 set dev_props [dict get $globalSettings::PROPERTIES project]
640 dict for {prop_name prop_val} $dev_props {
641 Msg Debug "Setting $prop_name = $prop_val"
642 project_settings -[string tolower $prop_name] $prop_val
646 if {[dict exists $globalSettings::PROPERTIES synth]} {
647 Msg Info "Setting Synthesis properties..."
648 set synth_props [dict get $globalSettings::PROPERTIES synth]
649 dict for {prop_name prop_val} $synth_props {
650 Msg Debug "Setting $prop_name = $prop_val"
651 configure_tool -name {SYNTHESIZE} -params "[string toupper $prop_name]:$prop_val"
655 if {[dict exists $globalSettings::PROPERTIES impl]} {
656 Msg Info "Setting Implementation properties..."
657 set impl_props [dict get $globalSettings::PROPERTIES impl]
658 dict for {prop_name prop_val} $impl_props {
659 Msg Debug "Setting $prop_name = $prop_val"
660 configure_tool -name {PLACEROUTE} -params "[string toupper $prop_name]:$prop_val"
665 if {[dict exists $globalSettings::PROPERTIES bitstream]} {
666 Msg Info "Setting Bitstream properties..."
667 set impl_props [dict get $globalSettings::PROPERTIES impl]
668 dict for {prop_name prop_val} $impl_props {
669 Msg Debug "Setting $prop_name = $prop_val"
670 configure_tool -name {GENERATEPROGRAMMINGFILE} -params "[string toupper $prop_name]:$prop_val"
674 configure_tool -name {VERIFYTIMING} -params {FORMAT:TEXT}
677 Msg info "Configuring Properties"
686 current_run -implementation [get_runs impl_1]
693 Msg Info "Running report_ip_status, before upgrading and handling IPs..."
697 if {$globalSettings::HOG_IP_PATH != ""} {
698 set ip_repo_path $globalSettings::HOG_IP_PATH
699 Msg Info "HOG_IP_PATH is set, will pull/push synthesised IPs from/to $ip_repo_path."
701 HandleIP pull [get_property IP_FILE $ip] $ip_repo_path $globalSettings::repo_path [get_property IP_OUTPUT_DIR $ip]
704 Msg Info "HOG_IP_PATH not set, will not push/pull synthesised IPs."
708 proc SetGlobalVar {var {default_value HOG_NONE}} {
710 if {[
info exists ::$var]} {
711 Msg Debug "Setting $var to [subst $[subst ::$var]]"
713 set globalSettings::$var [subst $[subst ::$var]]
714 }
elseif {$default_value == "HOG_NONE"} {
715 Msg Error "Mandatory variable $var was not defined. Please define it in hog.conf or in project tcl script."
717 Msg Info "Setting $var to default value: \"$default_value\""
719 set globalSettings::$var $default_value
725 proc CreateProject args {
730 if {[
catch {
package require cmdline} ERROR]} {
731 puts "ERROR: If you are running this script on tclsh, you can fix this by installing 'tcllib'"
735 {simlib_path.arg "" "Path of simulation libs"}
736 {verbose "If set, launch the script in verbose mode."}
739 set usage "Create Vivado/ISE/Quartus/Libero project.\nUsage: CreateProject \[OPTIONS\] <project> <repository path>\n Options:"
741 if {[
catch {
array set options [
cmdline::getoptions args $parameters $usage]}] || [
llength $args] < 2 ||[
lindex $args 0] eq""} {
746 set globalSettings::DESIGN [
lindex $args 0]
747 if {[
file exists [
lindex $args 1]]} {
748 set globalSettings::repo_path [
file normalize [
lindex $args 1]]
750 Msg Error "The second argument, [
lindex $args 1], should be the repository path."
752 set globalSettings::tcl_path $globalSettings::repo_path/Hog/Tcl
755 if { $options(verbose) == 1 } {
756 variable ::DEBUG_MODE 1
760 if {$options(simlib_path)!= ""} {
762 set globalSettings::simlib_path "$options(simlib_path)"
764 set globalSettings::simlib_path "$globalSettings::repo_path/$options(simlib_path)"
766 Msg Info "Simulation library path set to $options(simlib_path)"
768 set globalSettings::simlib_path "$globalSettings::repo_path/SimulationLib"
769 Msg Info "Simulation library path set to default $globalSettings::repo_path/SimulationLib"
774 set proj_dir [
file normalize $globalSettings::repo_path/Top/$globalSettings::DESIGN]
775 lassign [
GetConfFiles $proj_dir] conf_file sim_file pre_file post_file
778 if {[
file exists $conf_file]} {
779 Msg Info "Parsing configuration file $conf_file..."
785 if {$conf_version != "0.0.0"} {
788 set a_v [
split $actual_version "."]
789 set c_v [
split $conf_version "."]
791 if { [
llength $a_v] < 2} {
792 Msg Error "Couldn't parse IDE version: $actual_version."
793 }
elseif {[
llength $a_v] == 2} {
796 if { [
llength $c_v] < 2} {
797 Msg Error "Wrong version format in hog.conf: $conf_version."
798 }
elseif {[
llength $c_v] == 2} {
804 Msg Info "Project version and $ide version match: $conf_version."
805 }
elseif {$comp == 1} {
806 Msg CriticalWarning "The $ide version in use is $actual_version, that is newer than $conf_version, as specified in the first line of $conf_file, if you want update this project to version $actual_version, please update the configuration file."
808 Msg Error "The $ide version in use is $actual_version, that is older than $conf_version as specified in $conf_file. The project will not be created.\nIf you absolutely want to create this project that was meant for version $conf_version with $ide version $actual_version, you can change the version from the first line of $conf_file.\nThis is HIGHLY discouraged as there could be unrecognised properties in the configuration file and IPs created with a newer $ide version cannot be downgraded."
811 Msg CriticalWarning "No version found in the first line of $conf_file. It is HIGHLY recommended to replace the first line of $conf_file with: \#$ide $actual_version"
813 if {[dict exists $globalSettings::PROPERTIES main]} {
814 set main [dict get $globalSettings::PROPERTIES main]
815 dict for {p v} $main {
816 # notice the dollar in front of p: creates new variables and fill them with the value
817 Msg Info "Main property $p set to $v"
822 Msg Error "No main section found in $conf_file, make sure it has a section called \[main\] containing the mandatory properties."
825 if {[
file exists $sim_file]} {
826 Msg Info "Parsing simulation configuration file $sim_file..."
832 Msg Error "$conf_file was not found in your project directory, please create one."
853 if {[
info exists env(HOG_EXTERNAL_PATH)]} {
854 set globalSettings::HOG_EXTERNAL_PATH $env(HOG_EXTERNAL_PATH)
856 set globalSettings::HOG_EXTERNAL_PATH ""
861 set build_dir_name "Projects"
862 set globalSettings::group_name [
file dirname $globalSettings::DESIGN]
863 set globalSettings::pre_synth_file "pre-synthesis.tcl"
864 set globalSettings::post_synth_file "post-synthesis.tcl"
865 set globalSettings::pre_impl_file "pre-implementation.tcl"
866 set globalSettings::post_impl_file "post-implementation.tcl"
867 set globalSettings::pre_bit_file "pre-bitstream.tcl"
868 set globalSettings::post_bit_file "post-bitstream.tcl"
869 set globalSettings::quartus_post_module_file "quartus-post-module.tcl"
870 set globalSettings::top_path "$globalSettings::repo_path/Top/$globalSettings::DESIGN"
871 set globalSettings::list_path "$globalSettings::top_path/list"
872 set globalSettings::build_dir "$globalSettings::repo_path/$build_dir_name/$globalSettings::DESIGN"
873 set globalSettings::DESIGN [
file tail $globalSettings::DESIGN]
874 set globalSettings::top_name [
file tail $globalSettings::DESIGN]
875 set globalSettings::top_name [
file rootname $globalSettings::top_name]
876 set globalSettings::synth_top_module "top_$globalSettings::top_name"
877 set globalSettings::user_ip_repo ""
879 set globalSettings::pre_synth [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::pre_synth_file"]
880 set globalSettings::post_synth [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::post_synth_file"]
881 set globalSettings::pre_impl [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::pre_impl_file"]
882 set globalSettings::post_impl [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::post_impl_file"]
883 set globalSettings::pre_bit [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::pre_bit_file"]
884 set globalSettings::post_bit [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::post_bit_file"]
885 set globalSettings::quartus_post_module [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::quartus_post_module_file"]
886 set globalSettings::LIBERO_MANDATORY_VARIABLES {"FAMILY" "PACKAGE" "DIE" }
888 set user_hog_file "$globalSettings::repo_path/Top/hog.tcl"
889 if {[
file exists $user_hog_file]} {
890 Msg Info "Sourcing user hog.tcl file..."
891 source $user_hog_file
894 if {[
file exists $pre_file]} {
895 Msg Info "Found pre-creation Tcl script $pre_file, executing it..."
899 if {[
info exists env(HOG_IP_PATH)]} {
900 set globalSettings::HOG_IP_PATH $env(HOG_IP_PATH)
902 set globalSettings::HOG_IP_PATH ""
917 set fileName_old [
file normalize "./hogTmp/.hogQsys.md5"]
918 set fileDir [
file normalize "$globalSettings::build_dir/.hog/"]
920 set fileName_new [
file normalize "$fileDir/.hogQsys.md5"]
921 if {[
file exists $fileName_new]} {
922 file delete $fileName_new
924 if {[
file exists $fileName_old]} {
925 file rename -force $fileName_old $fileName_new
926 file delete -force -- "./hogTmp"
930 if {[
file exists $post_file]} {
931 Msg Info "Found post-creation Tcl script $post_file, executing it..."
935 build_design_hierarchy
941 lassign [
GetHogFiles -ext_path "$globalSettings::HOG_EXTERNAL_PATH" "$globalSettings::repo_path/Top/$globalSettings::group_name/$globalSettings::DESIGN/list/" $globalSettings::repo_path] listLibraries listProperties listFilesets
944 cd $globalSettings::build_dir
950 cd $globalSettings::repo_path
953 lassign [
GetRepoVersions [
file normalize $globalSettings::repo_path/Top/$globalSettings::group_name/$globalSettings::DESIGN] $globalSettings::repo_path $globalSettings::HOG_EXTERNAL_PATH] commit version hog_hash hog_ver top_hash top_ver libs hashes vers cons_ver cons_hash ext_names ext_hashes xml_hash xml_ver user_ip_repos user_ip_hashes user_ip_vers
958 set commit $this_commit
961 if {$xml_hash != ""} {
969 WriteGenerics "create" $globalSettings::repo_path $globalSettings::group_name/$globalSettings::DESIGN $date $timee $commit $version $top_hash $top_ver $hog_hash $hog_ver $cons_ver $cons_hash $libs $vers $hashes $ext_names $ext_hashes $user_ip_repos $user_ip_vers $user_ip_hashes $flavour $xml_ver $xml_hash
973 Msg Info "Project $globalSettings::DESIGN created successfully in [
Relative $globalSettings::repo_path $globalSettings::build_dir]."