YosysHQ / nextpnr

nextpnr portable FPGA place and route tool
ISC License
1.24k stars 236 forks source link

On iCE40, use SB_IO PIN_TYPE to avoid unnecessary placement constraint on buffers #1305

Open whitequark opened 3 months ago

whitequark commented 3 months ago

Right now it appears that regardless of PIN_TYPE, the CLOCK_ENABLE and {INPUT,OUTPUT}_CLOCK in a pin pair with z=0,1 must match. This is mostly fine for clocks but gets extremely annoying for CLOCK_ENABLE, and worse, the constraint still has to be preserved if you use the pin as a comb input/output.

Nextpnr could take this into account and ignore the nets tied to CLOCK_ENABLE/*_CLOCK if the PIN_TYPE instructs it so.

gatecat commented 1 month ago

I believe this should be implemented via this function already - can you provide an example where this isn't working?

whitequark commented 1 month ago

@wanda-phi Do you recall where we hit this?

Actually, I remember now, it was in the Glasgow RGMII applet. I'd have to change the code a little to create a reproducer but it shouldn't be too hard.

wanda-phi commented 1 month ago

wasn't that hyperram, actually?

whitequark commented 1 month ago

Oh it would have been!