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
76 set VIVADO_PATH_PROPERTIES {
77 "TCL.PRE" "TCL.POST" "RQS_FILES"
85 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..*"}
86 set_msg_config -suppress -regexp -string {".*File '.*.xci' referenced by design '.*' could not be found..*"}
89 create_project -force [
file tail $globalSettings::DESIGN] $globalSettings::build_dir -part $globalSettings::PART
90 file mkdir "$globalSettings::build_dir/[
file tail $globalSettings::DESIGN].gen/sources_1"
91 if { [
IsVersal $globalSettings::PART] } {
92 Msg Info "This project uses a Versal device."
96 set obj [get_projects [
file tail $globalSettings::DESIGN]]
97 set_property "target_language" "VHDL" $obj
100 set_property "simulator_language" "Mixed" $obj
102 set_property "compxlib.${simulator}_compiled_library_dir" $globalSettings::simlib_path $obj
104 set_property "default_lib" "xil_defaultlib" $obj
106 set_param project.enableVHDL2008 1
107 set_property "enable_vhdl_2008" 1 $obj
109 set_property source_mgmt_mode All [current_project]
111 Msg Debug "Setting PART = $globalSettings::PART"
112 set_property PART $globalSettings::PART [current_project]
118 package require ::quartus::project
120 if {[
string equal $globalSettings::FAMILY "quartus_only"]} {
121 Msg Error "You must specify a device Family for Quartus"
123 file mkdir $globalSettings::build_dir
124 cd $globalSettings::build_dir
125 if {[is_project_open]} {
129 file delete {*}[glob -nocomplain $globalSettings::DESIGN.q*]
131 project_new -family $globalSettings::FAMILY -overwrite -part $globalSettings::PART $globalSettings::DESIGN
132 set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
137 if {[
file exists $globalSettings::build_dir]} {
138 file delete -force $globalSettings::build_dir
140 new_project -location $globalSettings::build_dir -name [
file tail $globalSettings::DESIGN] -die $globalSettings::DIE -package $globalSettings::PACKAGE -family $globalSettings::FAMILY -hdl VHDL
142 puts "Creating project for $globalSettings::DESIGN part $globalSettings::PART"
143 puts "Configuring project settings:"
144 puts " - simulator_language: Mixed"
145 puts " - target_language: VHDL"
146 puts " - simulator: QuestaSim"
147 puts "Adding IP directory \"$globalSettings::user_ip_repo\" to the project "
152 proc AddProjectFiles {} {
157 if {[
string equal [get_filesets -quiet sources_1] ""]} {
158 create_fileset -srcset sources_1
160 set sources [get_filesets sources_1]
172 if {[
string equal [get_filesets -quiet constrs_1] ""]} {
173 create_fileset -constrset constrs_1
177 set constraints [get_filesets constrs_1]
184 if {[
file isdirectory $globalSettings::list_path]} {
185 set list_files [glob -directory $globalSettings::list_path "*"]
187 Msg Error "No list directory found at $globalSettings::list_path"
191 source $globalSettings::tcl_path/utils/cmdline.tcl
195 AddHogFiles {*}[
GetHogFiles -list_files {.src,.sim,.ext} -ext_path $globalSettings::HOG_EXTERNAL_PATH $globalSettings::list_path $globalSettings::repo_path]
201 AddHogFiles {*}[
GetHogFiles -list_files {.con} -ext_path $globalSettings::HOG_EXTERNAL_PATH $globalSettings::list_path $globalSettings::repo_path]
215 proc CreateReportStrategy {obj} {
218 if {[
string equal [get_property -quiet report_strategy $obj] ""]} {
220 Msg Info "No report strategy needed for implementation"
223 set_property set_report_strategy_name 1 $obj
224 set_property report_strategy {Vivado Implementation Default Reports} $obj
225 set_property set_report_strategy_name 0 $obj
227 set reports [get_report_configs -of_objects $obj]
229 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] ""] } {
230 create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
232 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
238 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] ""] } {
239 create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
241 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
247 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] ""] } {
248 create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
250 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
256 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary] ""] } {
257 create_report_config -report_name impl_1_route_report_timing_summary -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
259 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary]
261 Msg Info "Report timing created successfully"
265 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_utilization] ""] } {
266 create_report_config -report_name impl_1_route_report_utilization -report_type report_utilization:1.0 -steps route_design -runs impl_1
268 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_utilization]
270 Msg Info "Report utilization created successfully"
275 if { [
string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] ""] } {
276 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
278 set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
280 set_property -name "options.max_paths" -value "10" -objects $obj
281 set_property -name "options.warn_on_violation" -value "1" -objects $obj
286 Msg Info "Won't create any report strategy, not in Vivado"
296 proc ConfigureSynthesis {} {
300 if {[
string equal [get_runs -quiet synth_1] ""]} {
301 create_run -name synth_1 -part $globalSettings::PART -constrset constrs_1
306 set obj [get_runs synth_1]
307 set_property "part" $globalSettings::PART $obj
311 if {$globalSettings::pre_synth_file ne ""} {
315 if {[get_filesets -quiet utils_1] != ""} {
316 AddFile $globalSettings::pre_synth [get_filesets -quiet utils_1]
318 set_property STEPS.SYNTH_DESIGN.TCL.PRE $globalSettings::pre_synth $obj
322 set_global_assignment -name PRE_FLOW_SCRIPT_FILE quartus_sh:$globalSettings::pre_synth
325 configure_tool -name {SYNTHESIZE} -params SYNPLIFY_TCL_FILE:$globalSettings::pre_synth
328 Msg Debug "Setting $globalSettings::pre_synth to be run before synthesis"
332 if {$globalSettings::post_synth_file ne ""} {
336 if {[get_filesets -quiet utils_1] != ""} {
337 AddFile $globalSettings::post_synth [get_filesets -quiet utils_1]
339 set_property STEPS.SYNTH_DESIGN.TCL.POST $globalSettings::post_synth $obj
343 set_global_assignment -name POST_MODULE_SCRIPT_FILE quartus_sh:$globalSettings::quartus_post_module
346 Msg Debug "Setting $globalSettings::post_synth to be run after synthesis"
353 current_run -synthesis $obj
356 if {[
string equal [get_property -quiet report_strategy $obj] ""]} {
358 Msg Debug "No report strategy needed for synthesis"
362 set_property set_report_strategy_name 1 $obj
363 set_property report_strategy {Vivado Synthesis Default Reports} $obj
364 set_property set_report_strategy_name 0 $obj
366 if { [
string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] ""] } {
367 create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
369 set reports [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
376 Msg info "Reporting strategy for synthesis"
385 proc ConfigureImplementation {} {
389 if {[
string equal [get_runs -quiet impl_1] ""]} {
390 create_run -name impl_1 -part $globalSettings::PART -constrset constrs_1 -parent_run synth_1
393 set obj [get_runs impl_1]
394 set_property "part" $globalSettings::PART $obj
396 set_property "steps.[
BinaryStepName $globalSettings::PART].args.readback_file" "0" $obj
397 set_property "steps.[
BinaryStepName $globalSettings::PART].args.verbose" "0" $obj
406 if {$globalSettings::pre_impl_file ne ""} {
410 if {[get_filesets -quiet utils_1] != ""} {
411 AddFile $globalSettings::pre_impl [get_filesets -quiet utils_1]
413 set_property STEPS.INIT_DESIGN.TCL.POST $globalSettings::pre_impl $obj
420 Msg Debug "Setting $globalSettings::pre_impl to be run after implementation"
425 if {$globalSettings::post_impl_file ne ""} {
429 if {[get_filesets -quiet utils_1] != ""} {
430 AddFile $globalSettings::post_impl [get_filesets -quiet utils_1]
432 set_property STEPS.ROUTE_DESIGN.TCL.POST $globalSettings::post_impl $obj
436 set_global_assignment -name POST_MODULE_SCRIPT_FILE quartus_sh:$globalSettings::quartus_post_module
438 Msg Debug "Setting $globalSettings::post_impl to be run after implementation"
442 if {$globalSettings::pre_bit_file ne ""} {
446 if {[get_filesets -quiet utils_1] != ""} {
447 AddFile $globalSettings::pre_bit [get_filesets -quiet utils_1]
449 set_property STEPS.[
BinaryStepName $globalSettings::PART].TCL.PRE $globalSettings::pre_bit $obj
456 Msg Debug "Setting $globalSettings::pre_bit to be run after bitfile generation"
460 if {$globalSettings::post_bit_file ne ""} {
464 if {[get_filesets -quiet utils_1] != ""} {
465 AddFile $globalSettings::post_bit [get_filesets -quiet utils_1]
467 set_property STEPS.[
BinaryStepName $globalSettings::PART].TCL.POST $globalSettings::post_bit $obj
471 set_global_assignment -name POST_MODULE_SCRIPT_FILE quartus_sh:$globalSettings::quartus_post_module
473 Msg Debug "Setting $globalSettings::post_bit to be run after bitfile generation"
482 proc ConfigureSimulation {} {
487 Msg Debug "Setting load_glbl parameter to true for every fileset..."
488 foreach simset [get_filesets -quiet] {
489 if {[get_property FILESET_TYPE $simset] != "SimulationSrcs" } {
493 set_property -name {xsim.elaborate.load_glbl} -value {true} -objects [get_filesets $simset]
496 if {[dict exists $globalSettings::SIM_PROPERTIES $simset]} {
497 Msg Info "Setting properties for simulation set: $simset..."
498 set sim_props [dict get $globalSettings::SIM_PROPERTIES $simset]
499 dict for {prop_name prop_val} $sim_props {
500 set prop_name [string toupper $prop_name]
501 if { $prop_name == "ACTIVE" && $prop_val == 1 } {
502 Msg Info "Setting $simset as active simulation set..."
503 current_fileset -simset [ get_filesets $simset ]
505 Msg Debug "Setting $prop_name = $prop_val"
506 set_property $prop_name $prop_val [get_filesets $simset]
510 if {[dict exists $globalSettings::SIM_PROPERTIES sim]} {
511 Msg Info "Setting properties for simulation set: sim..."
512 set sim_props [dict get $globalSettings::SIM_PROPERTIES sim]
513 dict for {prop_name prop_val} $sim_props {
514 Msg Debug "Setting $prop_name = $prop_val"
515 set_property $prop_name $prop_val [get_filesets $simset]
519 if {[dict exists $globalSettings::SIM_PROPERTIES hog]} {
520 set hog_sim_props [dict get $globalSettings::SIM_PROPERTIES hog]
521 dict for {prop_name prop_val} $hog_sim_props {
522 if { $prop_name == "HOG_SIMPASS_STR"} {
523 Msg Info "Setting simulation pass string as '$prop_val'"
524 set ::env(HOG_SIMPASS_STR) $prop_val
526 Msg Debug "Simulation pass string not set, relying on simulator exit code."
537 Msg info "Configuring simulation"
543 proc ConfigureProperties {} {
545 cd $globalSettings::repo_path
549 if {[
info exists globalSettings::PROPERTIES]} {
550 if {[dict exists $globalSettings::PROPERTIES main]} {
551 Msg Info "Setting project-wide properties..."
552 set proj_props [dict get $globalSettings::PROPERTIES main]
553 dict for {prop_name prop_val} $proj_props {
555 if { [ string tolower $prop_name ] != "ip_repo_paths" } {
556 if {[ string tolower $prop_name] != "part"} {
557 # Part is already set
558 Msg Debug "Setting $prop_name = $prop_val"
559 set_property $prop_name $prop_val [current_project]
562 set ip_repo_list [regsub -all {\s+} $prop_val " $globalSettings::repo_path/"]
563 set ip_repo_list $globalSettings::repo_path/$ip_repo_list
565 Msg Info "Setting $ip_repo_list as user IP repository..."
567 set_property ip_repo_paths "$ip_repo_list" [current_fileset]
569 set_property ip_repo_paths "$ip_repo_list" [current_project]
576 foreach run [get_runs -quiet] {
577 if {[dict exists $globalSettings::PROPERTIES $run]} {
578 Msg Info "Setting properties for run: $run..."
579 set run_props [dict get $globalSettings::PROPERTIES $run]
581 set stragety_str "STRATEGY strategy Strategy"
582 Msg Debug "Setting Strategy and Flow for run $run (if specified in hog.conf)"
583 foreach s $stragety_str {
584 if {[dict exists $run_props $s]} {
585 set prop [dict get $run_props $s]
586 set_property $s $prop $run
587 set run_props [dict remove $run_props $s]
588 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."
589 Msg Info "Setting $s = $prop"
593 dict for {prop_name prop_val} $run_props {
594 Msg Debug "Setting $prop_name = $prop_val"
595 if {[string trim $prop_val] == ""} {
596 Msg Warning "Property $prop_name has empty value. Skipping..."
599 if {[string first "TCL.PRE" $prop_name] != -1 || [string first "TCL.POST" $prop_name] != -1 || $prop_name == "RQS_FILES" } {
600 set_property $prop_name $globalSettings::repo_path/$prop_val $run
602 set_property $prop_name $prop_val $run
614 if {[
info exists globalSettings::PROPERTIES]} {
616 if {[dict exists $globalSettings::PROPERTIES main]} {
617 Msg Info "Setting device properties..."
618 set dev_props [dict get $globalSettings::PROPERTIES main]
619 dict for {prop_name prop_val} $dev_props {
620 if { !([string toupper $prop_name] in $globalSettings::LIBERO_MANDATORY_VARIABLES) } {
621 Msg Debug "Setting $prop_name = $prop_val"
622 set_device -[string tolower $prop_name] $prop_val
627 if {[dict exists $globalSettings::PROPERTIES project]} {
628 Msg Info "Setting project-wide properties..."
629 set dev_props [dict get $globalSettings::PROPERTIES project]
630 dict for {prop_name prop_val} $dev_props {
631 Msg Debug "Setting $prop_name = $prop_val"
632 project_settings -[string tolower $prop_name] $prop_val
636 if {[dict exists $globalSettings::PROPERTIES synth]} {
637 Msg Info "Setting Synthesis properties..."
638 set synth_props [dict get $globalSettings::PROPERTIES synth]
639 dict for {prop_name prop_val} $synth_props {
640 Msg Debug "Setting $prop_name = $prop_val"
641 configure_tool -name {SYNTHESIZE} -params "[string toupper $prop_name]:$prop_val"
645 if {[dict exists $globalSettings::PROPERTIES impl]} {
646 Msg Info "Setting Implementation properties..."
647 set impl_props [dict get $globalSettings::PROPERTIES impl]
648 dict for {prop_name prop_val} $impl_props {
649 Msg Debug "Setting $prop_name = $prop_val"
650 configure_tool -name {PLACEROUTE} -params "[string toupper $prop_name]:$prop_val"
655 if {[dict exists $globalSettings::PROPERTIES bitstream]} {
656 Msg Info "Setting Bitstream 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 {GENERATEPROGRAMMINGFILE} -params "[string toupper $prop_name]:$prop_val"
664 configure_tool -name {VERIFYTIMING} -params {FORMAT:TEXT}
667 Msg info "Configuring Properties"
676 current_run -implementation [get_runs impl_1]
683 Msg Info "Running report_ip_status, before upgrading and handling IPs..."
687 if {$globalSettings::HOG_IP_PATH != ""} {
688 set ip_repo_path $globalSettings::HOG_IP_PATH
689 Msg Info "HOG_IP_PATH is set, will pull/push synthesised IPs from/to $ip_repo_path."
691 HandleIP pull [get_property IP_FILE $ip] $ip_repo_path $globalSettings::repo_path [get_property IP_OUTPUT_DIR $ip]
694 Msg Info "HOG_IP_PATH not set, will not push/pull synthesised IPs."
698 proc SetGlobalVar {var {default_value HOG_NONE}} {
700 if {[
info exists ::$var]} {
701 Msg Debug "Setting $var to [subst $[subst ::$var]]"
703 set globalSettings::$var [subst $[subst ::$var]]
704 }
elseif {$default_value == "HOG_NONE"} {
705 Msg Error "Mandatory variable $var was not defined. Please define it in hog.conf or in project tcl script."
707 Msg Info "Setting $var to default value: \"$default_value\""
709 set globalSettings::$var $default_value
715 proc CreateProject args {
720 if {[
catch {
package require cmdline} ERROR]} {
721 puts "ERROR: If you are running this script on tclsh, you can fix this by installing 'tcllib'"
725 {simlib_path.arg "" "Path of simulation libs"}
726 {verbose "If set, launch the script in verbose mode."}
729 set usage "Create Vivado/ISE/Quartus/Libero project.\nUsage: CreateProject \[OPTIONS\] <project> <repository path>\n Options:"
731 if {[
catch {
array set options [
cmdline::getoptions args $parameters $usage]}] || [
llength $args] < 2 ||[
lindex $args 0] eq""} {
736 set globalSettings::DESIGN [
lindex $args 0]
737 if {[
file exists [
lindex $args 1]]} {
738 set globalSettings::repo_path [
file normalize [
lindex $args 1]]
740 Msg Error "The second argument, [
lindex $args 1], should be the repository path."
742 set globalSettings::tcl_path $globalSettings::repo_path/Hog/Tcl
745 if { $options(verbose) == 1 } {
746 variable ::DEBUG_MODE 1
750 if {$options(simlib_path)!= ""} {
752 set globalSettings::simlib_path "$options(simlib_path)"
754 set globalSettings::simlib_path "$globalSettings::repo_path/$options(simlib_path)"
756 Msg Info "Simulation library path set to $options(simlib_path)"
758 set globalSettings::simlib_path "$globalSettings::repo_path/SimulationLib"
759 Msg Info "Simulation library path set to default $globalSettings::repo_path/SimulationLib"
764 set proj_dir [
file normalize $globalSettings::repo_path/Top/$globalSettings::DESIGN]
765 lassign [
GetConfFiles $proj_dir] conf_file sim_file pre_file post_file
768 if {[
file exists $conf_file]} {
769 Msg Info "Parsing configuration file $conf_file..."
775 if {$conf_version != "0.0.0"} {
778 set a_v [
split $actual_version "."]
779 set c_v [
split $conf_version "."]
781 if { [
llength $a_v] < 2} {
782 Msg Error "Couldn't parse IDE version: $actual_version."
783 }
elseif {[
llength $a_v] == 2} {
786 if { [
llength $c_v] < 2} {
787 Msg Error "Wrong version format in hog.conf: $conf_version."
788 }
elseif {[
llength $c_v] == 2} {
794 Msg Info "Project version and $ide version match: $conf_version."
795 }
elseif {$comp == 1} {
796 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."
798 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."
801 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"
803 if {[dict exists $globalSettings::PROPERTIES main]} {
804 set main [dict get $globalSettings::PROPERTIES main]
805 dict for {p v} $main {
806 # notice the dollar in front of p: creates new variables and fill them with the value
807 Msg Info "Main property $p set to $v"
812 Msg Error "No main section found in $conf_file, make sure it has a section called \[main\] containing the mandatory properties."
815 if {[
file exists $sim_file]} {
816 Msg Info "Parsing simulation configuration file $sim_file..."
822 Msg Error "$conf_file was not found in your project directory, please create one."
843 if {[
info exists env(HOG_EXTERNAL_PATH)]} {
844 set globalSettings::HOG_EXTERNAL_PATH $env(HOG_EXTERNAL_PATH)
846 set globalSettings::HOG_EXTERNAL_PATH ""
851 set build_dir_name "Projects"
852 set globalSettings::group_name [
file dirname $globalSettings::DESIGN]
853 set globalSettings::pre_synth_file "pre-synthesis.tcl"
854 set globalSettings::post_synth_file "post-synthesis.tcl"
855 set globalSettings::pre_impl_file "pre-implementation.tcl"
856 set globalSettings::post_impl_file "post-implementation.tcl"
857 set globalSettings::pre_bit_file "pre-bitstream.tcl"
858 set globalSettings::post_bit_file "post-bitstream.tcl"
859 set globalSettings::quartus_post_module_file "quartus-post-module.tcl"
860 set globalSettings::top_path "$globalSettings::repo_path/Top/$globalSettings::DESIGN"
861 set globalSettings::list_path "$globalSettings::top_path/list"
862 set globalSettings::build_dir "$globalSettings::repo_path/$build_dir_name/$globalSettings::DESIGN"
863 set globalSettings::DESIGN [
file tail $globalSettings::DESIGN]
864 set globalSettings::top_name [
file tail $globalSettings::DESIGN]
865 set globalSettings::top_name [
file rootname $globalSettings::top_name]
866 set globalSettings::synth_top_module "top_$globalSettings::top_name"
867 set globalSettings::user_ip_repo ""
869 set globalSettings::pre_synth [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::pre_synth_file"]
870 set globalSettings::post_synth [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::post_synth_file"]
871 set globalSettings::pre_impl [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::pre_impl_file"]
872 set globalSettings::post_impl [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::post_impl_file"]
873 set globalSettings::pre_bit [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::pre_bit_file"]
874 set globalSettings::post_bit [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::post_bit_file"]
875 set globalSettings::quartus_post_module [
file normalize "$globalSettings::tcl_path/integrated/$globalSettings::quartus_post_module_file"]
876 set globalSettings::LIBERO_MANDATORY_VARIABLES {"FAMILY" "PACKAGE" "DIE" }
878 set user_hog_file "$globalSettings::repo_path/Top/hog.tcl"
879 if {[
file exists $user_hog_file]} {
880 Msg Info "Sourcing user hog.tcl file..."
881 source $user_hog_file
884 if {[
file exists $pre_file]} {
885 Msg Info "Found pre-creation Tcl script $pre_file, executing it..."
889 if {[
info exists env(HOG_IP_PATH)]} {
890 set globalSettings::HOG_IP_PATH $env(HOG_IP_PATH)
892 set globalSettings::HOG_IP_PATH ""
907 set fileName_old [
file normalize "./hogTmp/.hogQsys.md5"]
908 set fileDir [
file normalize "$globalSettings::build_dir/.hog/"]
910 set fileName_new [
file normalize "$fileDir/.hogQsys.md5"]
911 if {[
file exists $fileName_new]} {
912 file delete $fileName_new
914 if {[
file exists $fileName_old]} {
915 file rename -force $fileName_old $fileName_new
916 file delete -force -- "./hogTmp"
920 if {[
file exists $post_file]} {
921 Msg Info "Found post-creation Tcl script $post_file, executing it..."
925 build_design_hierarchy
931 lassign [
GetHogFiles -ext_path "$globalSettings::HOG_EXTERNAL_PATH" "$globalSettings::repo_path/Top/$globalSettings::group_name/$globalSettings::DESIGN/list/" $globalSettings::repo_path] listLibraries listProperties listFilesets
934 cd $globalSettings::build_dir
940 cd $globalSettings::repo_path
943 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
948 set commit $this_commit
951 if {$xml_hash != ""} {
959 WriteGenerics "create" $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
963 Msg Info "Project $globalSettings::DESIGN created successfully in [
Relative $globalSettings::repo_path $globalSettings::build_dir]."