Skip to content

Commit

Permalink
ruckus.tcl clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed Jan 11, 2025
1 parent 3ef7796 commit ee57af8
Showing 1 changed file with 38 additions and 21 deletions.
59 changes: 38 additions & 21 deletions LCLS-II/gtyUltraScale+/ruckus.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,54 @@ source -quiet $::env(RUCKUS_DIR)/vivado_proc.tcl

loadSource -lib lcls_timing_core -dir "$::DIR_PATH/rtl"

###########################################################################
# Standard 317 MHz reference OSC
###########################################################################
if { [info exists ::env(TIMING_246MHz)] != 1 || $::env(TIMING_246MHz) == 0 } {
set path "$::DIR_PATH/coregen"

# Check the Vivado Version
if { $::env(VIVADO_VERSION) >= 2021.1} {

# Check if loading the XCI file
if { [info exists ::env(LCLS_TIMING_GTY_XCI)] != 0 && $::env(LCLS_TIMING_GTY_XCI) == 1 } {
loadIpCore -path "${path}/TimingGty_extref.xci"
loadIpCore -path "${path}/TimingGty_fixedlat.xci"
puts "Loading XCI files for LCLS Timing"

# Else loading the .DCP file
} else {
loadSource -lib lcls_timing_core -path "${path}/TimingGty_extref.dcp"
loadSource -lib lcls_timing_core -path "${path}/TimingGty_fixedlat.dcp"
}

} else {
puts "\n\nWARNING: $::DIR_PATH requires Vivado 2021.1 (or later)\n\n"
}

###########################################################################
# Standard 245.76 MHz reference OSC
###########################################################################
} else {
set path "$::DIR_PATH/coregen/smurf"
}

if { $::env(VIVADO_VERSION) >= 2021.1 && [info exists ::env(TIMING_246MHz)] != 1} {

if { [info exists ::env(LCLS_TIMING_GTY_XCI)] != 0 && $::env(LCLS_TIMING_GTY_XCI) == 1 } {
loadIpCore -path "${path}/TimingGty_extref.xci"
loadIpCore -path "${path}/TimingGty_fixedlat.xci"
puts "Loading XCI files for LCLS Timing"
} else {
loadSource -lib lcls_timing_core -path "${path}/TimingGty_extref.dcp"
loadSource -lib lcls_timing_core -path "${path}/TimingGty_fixedlat.dcp"
}
# Check the Vivado Version
if { $::env(VIVADO_VERSION) >= 2018.2} {

# Check if loading the XCI file
if { [info exists ::env(LCLS_TIMING_GTY_XCI)] != 0 && $::env(LCLS_TIMING_GTY_XCI) == 1 } {
loadIpCore -path "${path}/TimingGty_extref.xci"
loadIpCore -path "${path}/TimingGty_fixedlat.xci"
puts "Loading XCI files for LCLS Timing"

} elseif { $::env(VIVADO_VERSION) >= 2020.2 && [info exists ::env(TIMING_246MHz)] == 1 } {
# Else loading the .DCP file
} else {
loadSource -lib lcls_timing_core -path "${path}/TimingGty_extref.dcp"
loadSource -lib lcls_timing_core -path "${path}/TimingGty_fixedlat.dcp"
}

if { [info exists ::env(LCLS_TIMING_GTY_XCI)] != 0 && $::env(LCLS_TIMING_GTY_XCI) == 1 } {
loadIpCore -path "${path}/TimingGty_extref.xci"
loadIpCore -path "${path}/TimingGty_fixedlat.xci"
} else {
loadSource -lib lcls_timing_core -path "${path}/TimingGty_extref.dcp"
loadSource -lib lcls_timing_core -path "${path}/TimingGty_fixedlat.dcp"
}
} else {
puts "\n\nWARNING: $::DIR_PATH requires Vivado 2018.2 (or later)\n\n"
}

} else {
puts "\n\nWARNING: $::DIR_PATH requires Vivado 2021.1 (or later)\n\n"
}

0 comments on commit ee57af8

Please sign in to comment.