-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmellanox-shell-scripts.patch
147 lines (142 loc) · 6.29 KB
/
mellanox-shell-scripts.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
--- user/project/create_project.tcl 2017-08-08 11:59:21.000000000 +0300
+++ user-mod/project/create_project.tcl 2018-04-28 11:59:27.177544204 +0300
@@ -1,4 +1,11 @@
###############################################################
+### Overriding "known" issues
+### Vivado DRC reports a false positive for LUTLP-1#1 Combinatorial Loop
+### See https://www.xilinx.com/support/answers/60591.html
+###############################################################
+set_property SEVERITY {Warning} [get_drc_checks LUTLP-1]
+
+###############################################################
### Tcl Variables
###############################################################
if { $argc == 2 } {
@@ -29,6 +36,8 @@
source $tclDir/pr_utils.tcl
source $tclDir/mlx_utils.tcl
+source $tclDir/env.tcl
+
###############################################################
### Define Part, Package, Speedgrade
###############################################################
@@ -62,7 +71,22 @@
###############################################################
### Define SBU files
###############################################################
-set vlogList [glob -nocomplain $vlogDir/*.v]
+set dirs [ list {*}$ikernels . ]
+if { $num_ikernels == 1 } {
+ lappend dirs nica
+} elseif { $num_ikernels == 2 } {
+ lappend dirs nica-2
+}
+
+puts "dirs = $dirs"
+set verilogList [list]
+foreach d $dirs {
+ lappend verilogList [glob -nocomplain $vlogDir/$d/*.v]
+ puts "adding files in dir $d"
+ puts [glob -nocomplain $vlogDir/$d/*.v]
+}
+set vlogList [concat $verilogList]
+puts "vlogList: $vlogList"
set sysvlogList [glob -nocomplain $sysvlogDir/*.v]
set vhdlList [list [glob -nocomplain $vhdlDir/*.vhd] work]
set xciList [glob -nocomplain $xciDir/*/*.xci]
@@ -96,6 +120,15 @@
set_attribute module $sbu xdc $xdcList
set_attribute module $sbu synthXDC $xdcSynthList
set_attribute module $sbu synth 1
+puts "Building for ikernels: $ikernel0 $ikernel1"
+set_attribute module $sbu vlog_defines [list \
+ "BUILD_NUMBER=$build_number" \
+ "SIGMON_ENABLE=$sigmon_enable" \
+ "IKERNEL0=$ikernel0" \
+ "IKERNEL1=$ikernel1" \
+ "FIRST_SHA_UNITS=$first_sha_units" \
+ "SECOND_SHA_UNITS=$second_sha_units" \
+]
########################################################################
### Configuration/Implementation Definition - Replicate for each Run
--- user/scripts/xilinx/implement.tcl 2017-08-08 11:59:21.000000000 +0300
+++ user-mod/scripts/xilinx/implement.tcl 2018-04-28 11:24:34.980002207 +0300
@@ -394,7 +394,8 @@
if {$verbose > 1} {
set start_time [clock seconds]
puts "\tRunning report_utilization \[[clock format $start_time -format {%a %b %d %H:%M:%S %Y}]\]"
- command "report_utilization -file $reportDir/${top}_utilization_link_design.rpt" "$resultDir/temp.log"
+ command "report_utilization -hierarchical -file $reportDir/${top}_utilization_link_design.rpt" "$resultDir/temp.log"
+ command "report_utilization -hierarchical -format xml -file $reportDir/${top}_utilization_link_design.xml" "$resultDir/temp.log"
set end_time [clock seconds]
log_time report_utilization $start_time $end_time
}
--- user/scripts/xilinx/synthesize.tcl 2017-08-08 11:59:21.000000000 +0300
+++ user-mod/scripts/xilinx/synthesize.tcl 2018-04-28 11:18:44.922617910 +0300
@@ -150,7 +150,10 @@
#### Set Verilog Defines
if {$vlogDefines != ""} {
+ puts "\tSetting verilog_define to $vlogDefines."
command "set_property verilog_define \{$vlogDefines\} \[current_fileset\]"
+ } else {
+ puts "\tNo verilog_define set."
}
#### Set Include Directories
@@ -181,7 +184,8 @@
if {$verbose >= 1} {
set start_time [clock seconds]
- command "report_utilization -file $resultDir/${moduleName}_utilization_synth.rpt" "$resultDir/temp.log"
+ command "report_utilization -hierarchical -file $resultDir/${moduleName}_utilization_synth.rpt" "$resultDir/temp.log"
+ command "report_utilization -hierarchical -format xml -file $resultDir/${moduleName}_utilization_synth.xml" "$resultDir/temp.log"
set end_time [clock seconds]
log_time report_utilization $start_time $end_time 0 "Report Synthesis Utilization of $module"
}
--- user/scripts/xilinx/env.tcl 1970-01-01 02:00:00.000000000 +0200
+++ user-mod/scripts/xilinx/env.tcl 2018-04-28 11:18:44.922617910 +0300
@@ -0,0 +1,34 @@
+package require Tcl
+package require struct::set
+
+proc get_env {var default_value} {
+ puts "Getting environment variable: $var"
+ if {[info exists ::env($var)]} {
+ set value $::env($var)
+ puts "Found it. ${var}=${value}"
+ return $value
+ } else {
+ puts "Not found. Setting to default ${var}=${default_value}"
+ return $default_value
+ }
+}
+
+set build_number [ get_env BUILD_NUMBER 2989 ]
+set sigmon_enable [ get_env SIGMON_ENABLE 1 ]
+set ikernel0 [ get_env IKERNEL0 "threshold" ]
+set ikernel1 [ get_env IKERNEL1 "threshold" ]
+set num_ikernels [ get_env NUM_IKERNELS 1 ]
+set cms_heap_depth [ get_env CMS_HEAP_DEPTH 256 ]
+set first_sha_units [ get_env FIRST_SHA_UNITS 3 ]
+set second_sha_units [ get_env SECOND_SHA_UNITS 2 ]
+
+set ikernel_defs [list]
+for {set i 0} {$i < $num_ikernels} {incr i} {
+ lappend ikernel_defs "NUM_IKERNELS_GT_$i=1"
+}
+
+::struct::set include ikernels $ikernel0
+::struct::set include ikernels $ikernel1
+
+puts "Building for ikernels: $ikernel0 $ikernel1"
+
--- user/scripts/xilinx/step.tcl 2017-08-08 11:59:21.000000000 +0300
+++ user-mod/scripts/xilinx/step.tcl 2018-04-28 11:18:44.922617910 +0300
@@ -111,7 +111,8 @@
#Write out additional reports controled by verbose level
if {$verbose > 1 || [string match $phase "route_design"]} {
set start_time [clock seconds]
- command "report_utilization -file $reportDir/${instance}_utilization_${phase}.rpt" "$resultDir/temp.log"
+ command "report_utilization -hierarchical -file $reportDir/${instance}_utilization_${phase}.rpt" "$resultDir/temp.log"
+ command "report_utilization -hierarchical -format xml -file $reportDir/${instance}_utilization_${phase}.xml" "$resultDir/temp.log"
set end_time [clock seconds]
log_time report_utilization $start_time $end_time
}