chipsalliance / fpga-interchange-schema

https://fpga-interchange-schema.readthedocs.io/
Apache License 2.0
51 stars 20 forks source link

PinDelay should use StringIdx for bel pins, not BelPinIdx #61

Open gatecat opened 3 years ago

gatecat commented 3 years ago

Looking at PinDelay, it currently refers to bel pins via BelPinIdx: https://github.com/SymbiFlow/fpga-interchange-schema/blob/78abf3f30770ccc6d0e1f5dbfeaef2666f55acf6/interchange/DeviceResources.capnp#L635

BelPinIdx is not unique per bel, but per site, and as a bel pin mapping rule that PinDelay is associated with can refer to more than one bel in a site: https://github.com/SymbiFlow/fpga-interchange-schema/blob/78abf3f30770ccc6d0e1f5dbfeaef2666f55acf6/interchange/DeviceResources.capnp#L388 but BelPinIdx can only ever apply to a single bel in a site.

To avoid a lot more duplication of rules than we have currently, which is also likely to slow down the place and route, I think the delay should use StringIdx names for bel pins, like the bel-cell mapping rules themselves: https://github.com/SymbiFlow/fpga-interchange-schema/blob/78abf3f30770ccc6d0e1f5dbfeaef2666f55acf6/interchange/DeviceResources.capnp#L382