Commit b0c3382
Fix incorrect IO tile corner detection in nextpnr-aegis
The previous corner detection used `x != y` / `x == y` which only
excluded the (0,0) and (W-1,H-1) diagonal corners. The corners
(W-1,0) and (0,H-1) were incorrectly treated as valid IO tiles,
causing IO BELs, wires, and pips to be created at positions that
don't correspond to actual IO pads in the FPGA hardware.
This mismatch between the nextpnr model and the simulator/hardware
could cause the placer to assign IO cells to non-existent pad
positions, producing a bitstream that doesn't work on the device.
Fix by adding an is_corner() helper that correctly identifies all
four grid corners, and use it in init_wires, init_bels, and init_pips.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7802d83 commit b0c3382
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
183 | 187 | | |
184 | 188 | | |
185 | 189 | | |
| |||
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
241 | | - | |
| 245 | + | |
242 | 246 | | |
243 | 247 | | |
244 | 248 | | |
| |||
269 | 273 | | |
270 | 274 | | |
271 | 275 | | |
272 | | - | |
| 276 | + | |
273 | 277 | | |
274 | 278 | | |
275 | 279 | | |
| |||
320 | 324 | | |
321 | 325 | | |
322 | 326 | | |
323 | | - | |
| 327 | + | |
324 | 328 | | |
325 | 329 | | |
326 | 330 | | |
| |||
0 commit comments