Skip to content
Permalink
Browse files

Add scripts to run Xilinx processes and get options from XISE file

  • Loading branch information...
mrehkopf committed Jul 5, 2019
1 parent e6e8959 commit fae5b78f5d48d67094da72f66a5fd3b1db0765bb
Showing with 187 additions and 0 deletions.
  1. +37 −0 verilog/xgenstratfile.tcl
  2. +91 −0 verilog/xgetmapopts.tcl
  3. +45 −0 verilog/xgetparopts.tcl
  4. +3 −0 verilog/xgetpartname.tcl
  5. +11 −0 verilog/xrun.tcl
@@ -0,0 +1,37 @@
set scriptdir [file dirname [file normalize [info script]]]

source $scriptdir/xgetmapopts.tcl
source $scriptdir/xgetparopts.tcl

if { [llength $argv] < 1 } {
puts stderr "Usage: $argv0 <xise project>"
exit
}
set projfile [lindex $argv 0]
set cores [lindex $argv 1]

project open $projfile

set family [string tolower [project get "Family"]]

# Force starting cost table to 1 for SmartXPlorer runs
set mapopts [getmapopts 1]
set paropts [getparopts 1]

set of [open "currentProps.stratfile" "w"]
puts $of "# custom generated SmartXplorer strategy file with current project settings."
puts $of "# Project: [lindex $argv 0]"
puts $of "{"
puts $of "\"$family\"\:"
puts $of "({\"name\"\: \"CurrentProjectNavigatorSettingsCT1\","
puts $of "\"map\"\: \"$mapopts\","
puts $of "\"par\"\: \"$paropts\"},"
puts $of "),"
puts $of "}"
close $of

set of [open "hostlistfile.txt" "w"]
for {set index 0} { $index < $cores } { incr index } {
puts $of localhost
}
close $of
@@ -0,0 +1,91 @@
proc getmapopts {{ct ""}} {
if { [project get "Perform Timing-Driven Packing and Placement" ] } {
append opts " -timing"
switch -- [project get "Map Effort Level"] {
Standard { append opts " -ol std" }
High { append opts " -ol high" }
}

switch -- [project get "Extra Effort"] {
None { }
Normal { append opts " -xe n" }
"Continue on Impossible" { append opts " -xe c" }
}
if [string equal $ct ""] {
append opts " -t " [project get "Starting Placer Cost Table (1-100) Map"]
} else {
append opts " -t $ct"
}

append opts " -register_duplication " [string tolower [project get "Register Duplication" -process Map]]

if { [project get "Combinatorial Logic Optimization"] } {
append opts " -logic_opt on"
} else {
append opts " -logic_opt off"
}
} else {
append opts " -c " [project get "CLB Pack Factor Percentage"]
}

switch -- [project get "Optimization Strategy (Cover Mode)"] {
Area { append opts " -cm area" }
Speed { append opts " -cm speed" }
Balanced { append opts " -cm balanced" }
Off { }
}

if { [project get "Generate Detailed Map Report"] } {
append opts " -detail"
}

switch -- [project get "Use RLOC Constraints"] {
"Yes" { append opts " -ir off" }
"No" { append opts " -ir all" }
"For Packing Only" { append opts " -ir place" }
}

if { [project get "Allow Logic Optimization Across Hierarchy"] } {
append opts " -ignore_keep_hierarchy"
}

switch -- [project get "Pack I/O Registers/Latches into IOBs"] {
"For Inputs and Outputs" { append opts " -pr b" }
"For Inputs Only" { append opts " -pr i" }
"For Outputs Only" { append opts " -pr o" }
Off { append opts " -pr off" }
}

if { [project get "Trim Unconnected Signals"] } {
append opts " -u"
}

if { ![string equal [project get "Other Map Command Line Options"] ""] } {
append opts " " [project get "Other Map Command Line Options"]
}

if { [project get "Ignore User Timing Constraints Map"] } {
switch -- [project get "Timing Mode Map"] {
"Performance Evaluation" { append opts " -x" }
"Non Timing Driven" { append opts " -ntd" }
}
}
if { [project get "Map Slice Logic"] } {
append opts " -bp"
}

switch -exact -- [project get "Power Reduction Map"] {
"false" -
"Off" { append opts " -power off" }
"true" -
"On" { append opts " -power on" }
"High" { append opts " -power high" }
"Extra Effort" { append opts " -power xe" }
}

if { ![string equal [project get "Power Activity File Map"] ""] } {
append opts " -activityfile " [project get "Power Activity File Map"]
}

return $opts
}
@@ -0,0 +1,45 @@
proc getparopts {{ct ""}} {
switch -- [project get "Place & Route Effort Level (Overall)"] {
Standard { append opts " -ol std" }
High { append opts " -ol high" }
}

switch -- [project get "Placer Effort Level" ] {
Standard { append opts " -pl std" }
High { append opts " -pl high" }
}

switch -- [project get "Router Effort Level" ] {
Standard { append opts " -rl std" }
High { append opts " -rl high" }
}

switch -- [project get "Extra Effort (Highest PAR level only)"] {
None { }
Normal { append opts " -xe n" }
"Continue on Impossible" { append opts " -xe c" }
}

if [string equal $ct ""] {
append opts " -t " [project get "Starting Placer Cost Table (1-100) PAR"]
} else {
append opts " -t $ct"
}

if { [project get "Ignore User Timing Constraints PAR"] } {
switch -- [project get "Timing Mode PAR"] {
"Performance Evaluation" { append opts " -x" }
"Non Timing Driven" { append opts " -ntd" }
}
}

if { [project get "Power Reduction PAR"] } {
append opts " -power on"
}

if { ![string equal [project get "Power Activity File PAR"] ""] } {
append opts " -activityfile " [project get "Power Activity File PAR"]
}

return $opts
}
@@ -0,0 +1,3 @@
project open [lindex $argv 0]

puts [project get Device][project get "Speed Grade"][project get Package]
@@ -0,0 +1,11 @@
if { [llength $argv] < 2 } {
puts stderr "Usage: $argv0 <xise project> <process name>"
exit
}

set projname [lindex $argv 0]
set process [lindex $argv 1]

project open $projname
process run $process

0 comments on commit fae5b78

Please sign in to comment.
You can’t perform that action at this time.