diff options
author | Wade Fife <wade.fife@ettus.com> | 2021-06-02 14:00:27 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-06-03 10:22:04 -0500 |
commit | a617ff132fef4a28370d8b10b42463a459d44f6b (patch) | |
tree | 2328485426fc35d4053081369ebc8e69c610adae | |
parent | 78315eca698333ad4dc32818e24c7bf6a740c0cb (diff) | |
download | uhd-a617ff132fef4a28370d8b10b42463a459d44f6b.tar.gz uhd-a617ff132fef4a28370d8b10b42463a459d44f6b.tar.bz2 uhd-a617ff132fef4a28370d8b10b42463a459d44f6b.zip |
fpga: tools: Add ability to run commands before route
-rw-r--r-- | fpga/usrp3/tools/scripts/viv_strategies.tcl | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fpga/usrp3/tools/scripts/viv_strategies.tcl b/fpga/usrp3/tools/scripts/viv_strategies.tcl index cbf9ea913..da7c4598a 100644 --- a/fpga/usrp3/tools/scripts/viv_strategies.tcl +++ b/fpga/usrp3/tools/scripts/viv_strategies.tcl @@ -72,13 +72,13 @@ proc ::vivado_strategies::get_impl_preset {preset} { # --------------------------------------------------- proc ::vivado_strategies::implement_design {strategy} { variable g_viv_version - + # Check strategy for validity and print vivado_strategies::check_strategy $strategy puts "BUILDER: Running implementation strategy with:" vivado_strategies::print_strategy $strategy - - # Optimize the current netlist. + + # Optimize the current netlist. # This will perform the retarget, propconst, sweep and bram_power_opt optimizations by default. if [dict get $strategy "opt_design.is_enabled"] { set opt_dir [dict get $strategy "opt_design.directive"] @@ -105,6 +105,12 @@ proc ::vivado_strategies::implement_design {strategy} { phys_opt_design -directive $pp_physopt_dir } + # Option to run commands before route + if {[dict exist $strategy "route_design.pre_hook"]} { + set pre_route_cmds [dict get $strategy "route_design.pre_hook"] + eval $pre_route_cmds + } + # Route the current design set rt_dir [dict get $strategy "route_design.directive"] puts "BUILDER: Choosing routing directive: $rt_dir" @@ -128,7 +134,7 @@ proc ::vivado_strategies::implement_design {strategy} { # --------------------------------------------------- proc ::vivado_strategies::check_strategy {strategy} { variable g_viv_version - + set strategy_options [dict keys $strategy] set required_options {\ opt_design.is_enabled \ @@ -142,7 +148,7 @@ proc ::vivado_strategies::check_strategy {strategy} { post_route_phys_opt_design.is_enabled \ post_route_phys_opt_design.directive \ } - + set invalid 0 foreach req $required_options { if [expr [lsearch $strategy_options $req] < 0] { |