@@ -131,11 +131,33 @@ proc write_ioi_ppips_db {filename tile} {
131
131
132
132
foreach pip [get_pips -of_objects $tile ] {
133
133
set dst_wire [get_wires -downhill -of_objects $pip ]
134
+ set nodes [get_nodes -of_objects $dst_wire ]
135
+ set uphill_pips [get_pips -uphill -of_objects $nodes ]
136
+
134
137
if [string match " *DATAOUT*" $dst_wire ] {
135
138
continue
136
- } elseif {[get_pips -uphill -of_objects [get_nodes -of_objects $dst_wire ]] == $pip } {
139
+ } elseif {$uphill_pips == $pip } {
140
+ # if there is only one uphill pip, then output always
141
+ # TODO: This really does not get us the ppips,
142
+ # but those pips which only have a single uphill pip.
143
+ # There are both false positives and false negatives
144
+ # with this approach: This also captures switchbox pips which
145
+ # only have one uphill pip but still can be turned on or off.
146
+ # example: LIOI3.IOI_ILOGIC0_CE1.IOI_IMUX5_1
147
+ # It also does not capture ppips with two uphill pips,
148
+ # like RIOI.RIOI_OLOGIC0_OQ and RIOI.ODELAY0_DATAOUT in Kintex7,
149
+ # which both are connected to RIOIO_O0. In Artix7 this one
150
+ # is only connected to _OQ.
137
151
set src_wire [get_wires -uphill -of_objects $pip ]
138
152
puts $fp " ${tile_type} .[ regsub {.*/} $dst_wire ""] .[ regsub {.*/} $src_wire ""] always"
153
+ } elseif {[lsearch -exact $uphill_pips $pip ]} {
154
+ # In Kintex7, two wires are permanently connected to RIOI_O[01]
155
+ if {[string match " *RIOI_O[ 01] " $dst_wire ] && [llength $uphill_pips ] == 2} {
156
+ foreach uphill_pip $uphill_pips {
157
+ set src_wire [get_wires -uphill -of_objects $uphill_pip ]
158
+ puts $fp " ${tile_type} .[ regsub {.*/} $dst_wire ""] .[ regsub {.*/} $src_wire ""] always"
159
+ }
160
+ }
139
161
}
140
162
}
141
163
0 commit comments