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!"
41 set work_path [get_property DIRECTORY [get_runs impl_1]]
44 set work_path $old_path
47 set proj_name [
file tail [
file normalize $work_path/../../]]
48 set proj_dir [
file normalize "$work_path/../.."]
50 set proj_dir [
file normalize "[
pwd]/.."]
51 set proj_name [
file tail $proj_dir]
52 set project $proj_name
55 set proj_name [
file tail [
file normalize $old_path/../..]]
56 Msg CriticalWarning "You seem to be running locally on tclsh, so this is a debug message. \
57 The project file will be set to $proj_file and was derived from the path you launched this script from: $old_path. \
58 If you want this script to work properly in debug mode, please launch it from the top folder of one project, \
59 for example Repo/Projects/fpga1/ or Repo/Top/fpga1/"
62 set group_name [
GetGroupName $proj_dir "$tcl_path/../.."]
68 set maxThreads [
GetMaxThreads [
file normalize $tcl_path/../../Top/$group_name/$proj_name]]
69 if {$maxThreads != 1} {
70 Msg CriticalWarning "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
85 set user_pre_bitstream_file "./Top/$group_name/$proj_name/pre-bitstream.tcl"
86 if {[
file exists $user_pre_bitstream_file]} {
87 Msg Info "Sourcing user pre-bitstream file $user_pre_bitstream_file"
88 source $user_pre_bitstream_file