1
+ # ------------------------------------------------------------------------------
2
+ # Vivado_init.tcl
3
+ # Konstantin Pavlov, pavlovconst@gmail.com
4
+ # ------------------------------------------------------------------------------
5
+
6
+ # INFO ------------------------------------------------------------------------
7
+ # Initialization script for Vivado that adds some useful tweaks and should
8
+ # improve project compile time, especially for Windows OSes
9
+ #
10
+ # Place this script to the directory
11
+ # Windows : %APPDATA%/Xilinx/Vivado/<VivadoVersion>/scripts/Vivado_init.tcl
12
+ # Linux : $HOME/.Xilinx/Vivado/<VivadoVersion>/scripts/Vivado_init.tcl
13
+ #
14
+ # and double-check that Vivado imports exactly the file from the path
15
+
16
+ # setting maximum allowed thread limit (1 to 8)
17
+ set_param synth.maxThreads 8
18
+
19
+
20
+ # setting maximum allowed thread limit (1 to 32)
21
+ set_param general.maxThreads 16
22
+
23
+
24
+ # allow_undefined_ports
25
+ set_property SEVERITY {Warning} [get_drc_checks NSTD-1]
26
+ set_property SEVERITY {Warning} [get_drc_checks UCIO-1]
27
+
28
+
29
+ # allow_wors
30
+ set_param synth.elaboration.rodinMoreOptions " rt::set_parameter compatibilityMode true"
31
+
32
+
33
+ # jtag_to_axi_master
34
+
35
+ # value should be 8 HEX digits == 32bit
36
+ proc jwr {address value} {
37
+ # set address [string range $address 2 [expr {[string length $address]-1}]]
38
+ create_hw_axi_txn -force wr_tx [get_hw_axis hw_axi_1] \
39
+ -address $address -data $value -len 1 -type write
40
+ run_hw_axi -quiet wr_tx
41
+ }
42
+
43
+ proc jrd {address} {
44
+ # set address [string range $address 2 [expr {[string length $address]-1}]]
45
+ create_hw_axi_txn -force rd_tx [get_hw_axis hw_axi_1] \
46
+ -address $address -len 1 -type read
47
+ run_hw_axi -quiet rd_tx
48
+ return 0x[get_property DATA [get_hw_axi_txn rd_tx]]
49
+ }
50
+
51
+
52
+ # compuiting time spent for the project compilation
53
+ proc el_time {} {
54
+ set hs 0
55
+ set ms 0
56
+ set ss 0
57
+ set hs_t 0
58
+ set ms_t 0
59
+ set ss_t 0
60
+
61
+ scan [get_property STATS.ELAPSED [get_runs synth_1]] " %d:%d:%d" hs ms ss
62
+ puts [ join [ list " synth: " [puts [format " %02d:%02d:%02d" $hs $ms $ss ]] ] " " ]
63
+ set hs_t [expr {$hs_t + $hs } ]
64
+ set ms_t [expr {$ms_t + $ms } ]
65
+ set ss_t [expr {$ss_t + $ss } ]
66
+
67
+ scan [get_property STATS.ELAPSED [get_runs impl_1]] " %d:%d:%d" hs ms ss
68
+ puts [ join [ list " impl: " [puts [format " %02d:%02d:%02d" $hs $ms $ss ]] ] " " ]
69
+ set hs_t [expr {$hs_t + $hs } ]
70
+ set ms_t [expr {$ms_t + $ms } ]
71
+ set ss_t [expr {$ss_t + $ss } ]
72
+
73
+ while { $ss_t >= 60 } {
74
+ set ss_t [expr $ss_t - 60]
75
+ set ms_t [expr $ms_t + 1]
76
+ }
77
+ while { $ms_t >= 60 } {
78
+ set ms_t [expr $ms_t - 60]
79
+ set hs_t [expr $hs_t + 1]
80
+ }
81
+ puts " ----------------------------------"
82
+ puts [ join [ list " TOTAL: " [format " %02d:%02d:%02d" $hs_t $ms_t $ss_t ]] " " ]
83
+ puts " "
84
+ }
0 commit comments