Because the PLLs drive global networks, we need to account for
already existing and placed SB_GBs when trying to place/pack them.
Theses can be user instanciated SB_GBs with BEL attribute, or
SB_GB_IOs that got converted during the IO packing.
This patch assumes that:
- If a PLL is used the output A global network is always used, even
if there is no connection to the global output pin
- If a PLL with a singe output is used, then the B output global
network is still free to be used by whatever.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This is mostly for the benefit of PLL placement because the D_IN_x
ports are used for other purposes when PLL is enabled so we need to
make sure nothing is connected there already. (even an unused net is
too much)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
We do a pre-pass on all the PLLs to place them before packing.
To place them:
- First pass with all the PADs PLLs since those can only fit at one
specific BEL depending on the input connection
- Second pass with all the dual outputs CORE PLLs. Those can go
anywhere where there is no conflicts with their A & B outputs and
used IO pins
- Third pass with the single output CORE PLLs. Those have the least
constrains.
During theses passes, we also check the validity of all their connections.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
We need to take into account the global networks that are already used
and possibly locked to know what we can promote since all networks
can't drive resets / clock-enables
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
During packing we replace them by standard SB_IO cells and create the
'fake' SB_GB that matches that IO site global buffer connection.
It's done in a separate pass because we need to make sure the nextpnr iob
have been dealt first so we have our final Bel location on the SB_IO.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Those are cells that are created mainly to handle the various sources a
global network can be driven from other than a user net.
When the flag is set, this means the global network usually driven by
this BEL is in fact driven by something else and so that SB_GB BEL and
matching global network can't be used.
This is also what gets used to set the extra bits during bitstream
generation.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>