18 set tcl_path [
file normalize "[
file dirname [
info script]]/.."]
19 source $tcl_path/hog.tcl
23 if {[
info exists env(HOG_TCLLIB_PATH)]} {
24 lappend auto_path $env(HOG_TCLLIB_PATH)
26 puts "ERROR: To run Hog with Microsemi Libero SoC, you need to define the HOG_TCLLIB_PATH variable."
33 Msg Error "Pre-module scripts are not supported in Quartus mode!"
43 set proj_dir [get_property DIRECTORY [current_project]]
44 set project [
file tail $proj_dir]
45 set proj_file $proj_dir/$project.prr
47 set proj_file [get_property parent.project_path [current_project]]
49 set proj_dir [
file normalize [
file dirname $proj_file]]
50 set proj_name [
file rootname [
file tail $proj_file]]
52 set proj_dir [
file normalize "[
pwd]/.."]
53 set proj_name [
file tail $proj_dir]
54 set project $proj_name
57 set proj_file $old_path/[
file tail $old_path].xpr
58 Msg CriticalWarning "You seem to be running locally on tclsh, so this is a debug message. \
59 The project file will be set to $proj_file and was derived from the path you launched this script from: $old_path. \
60 If you want this script to work properly in debug mode, please launch it from the top folder of one project, \
61 for example Repo/Projects/fpga1/ or Repo/Top/fpga1/"
64 set group_name [
GetGroupName $proj_dir "$tcl_path/../.."]
67 set maxThreads [
GetMaxThreads [
file normalize $tcl_path/../../Top/$group_name/$proj_name]]
69 if {$maxThreads != 1} {
70 Msg Warning "Multithreading enabled. Bitfile will not be deterministic. Number of threads: $maxThreads"
72 Msg Info "Disabling multithreading to assure deterministic bitfile"
77 set_param general.maxThreads $maxThreads
86 set user_pre_implementation_file "./Top/$group_name/$proj_name/pre-implementation.tcl"
87 if {[
file exists $user_pre_implementation_file]} {
88 Msg Status "Sourcing user pre-implementation file $user_pre_implementation_file"
89 source $user_pre_implementation_file