17 set tcl_path [
file normalize "[
file dirname [
info script]]/.."]
18 source $tcl_path/hog.tcl
22 if {[
info exists env(HOG_TCLLIB_PATH)]} {
23 lappend auto_path $env(HOG_TCLLIB_PATH)
25 puts "ERROR: To run Hog with Microsemi Libero SoC, you need to define the HOG_TCLLIB_PATH variable."
32 Msg Error "Pre-module scripts are not supported in Quartus mode!"
42 set proj_dir [get_property DIRECTORY [current_project]]
43 set project [
file tail $proj_dir]
44 set proj_file $proj_dir/$project.prr
46 set proj_file [get_property parent.project_path [current_project]]
48 set proj_dir [
file normalize [
file dirname $proj_file]]
49 set proj_name [
file rootname [
file tail $proj_file]]
51 set proj_dir [
file normalize "[
pwd]/.."]
52 set proj_name [
file tail $proj_dir]
53 set project $proj_name
56 set proj_file $old_path/[
file tail $old_path].xpr
57 Msg CriticalWarning "You seem to be running locally on tclsh, so this is a debug, the project file will be set to $proj_file and was derived from the path you launched this script from: $old_path. If you want this script to work properly in debug mode, please launch it from the top folder of one project, for example Repo/Projects/fpga1/ or Repo/Top/fpga1/"
60 set group_name [
GetGroupName $proj_dir "$tcl_path/../.."]
63 set maxThreads [
GetMaxThreads [
file normalize $tcl_path/../../Top/$group_name/$proj_name]]
65 if {$maxThreads != 1} {
66 Msg CriticalWarning "Multithreading enabled. Bitfile will not be deterministic. Number of threads: $maxThreads"
68 Msg Info "Disabling multithreading to assure deterministic bitfile"
73 set_param general.maxThreads $maxThreads
82 set user_pre_implementation_file "./Top/$group_name/$proj_name/pre-implementation.tcl"
83 if {[
file exists $user_pre_implementation_file]} {
84 Msg Status "Sourcing user pre-implementation file $user_pre_implementation_file"
85 source $user_pre_implementation_file