1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-05-01 22:15:52 +00:00

api: add explain_invalid option to isBelLocationValid

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat
2022-12-07 10:27:58 +01:00
parent d1afd6c0f1
commit 603b60da8d
26 changed files with 37 additions and 30 deletions

View File

@@ -698,11 +698,15 @@ return the same value regardless if other cells are placed within the fabric.
*BaseArch default: returns `cell_type == getBelType(bel)`*
### bool isBelLocationValid(BelId bel) const
### bool isBelLocationValid(BelId bel, bool explain_invalid = false) const
Returns true if a bel in the current configuration is legal (for example,
a flipflop's clock signal is correctly shared with all bels in a slice.)
If and only if `explain_invalid` is set to true, then a message using
`log_nonfatal_error` should be printed explaining why the placement is invalid
to the end user.
*BaseArch default: returns true*
### static const std::string defaultPlacer

View File

@@ -64,7 +64,7 @@ X(F)
```c++
bool checkBelAvail(BelId bel) const;
bool isValidBelForCellType(IdString cell_type, BelId bel) const;
bool isBelLocationValid(BelId bel) const;
bool isBelLocationValid(BelId bel, bool explain_invalid = false) const;
bool checkWireAvail(WireId wire) const;
bool checkPipAvail(PipId pip) const;
bool checkPipAvailForNet(PipId pip, NetInfo *net) const;