diff options
author | gatecat <gatecat@ds0.me> | 2022-12-07 10:27:58 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2022-12-07 10:27:58 +0100 |
commit | 603b60da8dcadf23eec8609ffc128f8f191c1122 (patch) | |
tree | 11ee560444efa1bd2ec56994cb50641290c73662 /common/kernel | |
parent | d1afd6c0f1f8452d7461bbf33c84dbfd59236d03 (diff) | |
download | nextpnr-603b60da8dcadf23eec8609ffc128f8f191c1122.tar.gz nextpnr-603b60da8dcadf23eec8609ffc128f8f191c1122.tar.bz2 nextpnr-603b60da8dcadf23eec8609ffc128f8f191c1122.zip |
api: add explain_invalid option to isBelLocationValid
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'common/kernel')
-rw-r--r-- | common/kernel/arch_api.h | 2 | ||||
-rw-r--r-- | common/kernel/arch_pybindings_shared.h | 4 | ||||
-rw-r--r-- | common/kernel/base_arch.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/common/kernel/arch_api.h b/common/kernel/arch_api.h index 94a88338..56c5cf0a 100644 --- a/common/kernel/arch_api.h +++ b/common/kernel/arch_api.h @@ -135,7 +135,7 @@ template <typename R> struct ArchAPI : BaseCtx virtual BelBucketId getBelBucketByName(IdString name) const = 0; virtual BelBucketId getBelBucketForBel(BelId bel) const = 0; virtual BelBucketId getBelBucketForCellType(IdString cell_type) const = 0; - virtual bool isBelLocationValid(BelId bel) const = 0; + virtual bool isBelLocationValid(BelId bel, bool explain_invalid = false) const = 0; virtual typename R::CellTypeRangeT getCellTypes() const = 0; virtual typename R::BelBucketRangeT getBelBuckets() const = 0; virtual typename R::BucketBelRangeT getBelsInBucket(BelBucketId bucket) const = 0; diff --git a/common/kernel/arch_pybindings_shared.h b/common/kernel/arch_pybindings_shared.h index d78d240c..ac0eda07 100644 --- a/common/kernel/arch_pybindings_shared.h +++ b/common/kernel/arch_pybindings_shared.h @@ -127,8 +127,8 @@ fn_wrapper_0a<Context, decltype(&Context::archId), &Context::archId, conv_to_str fn_wrapper_2a_v<Context, decltype(&Context::writeSVG), &Context::writeSVG, pass_through<std::string>, pass_through<std::string>>::def_wrap(ctx_cls, "writeSVG"); -fn_wrapper_1a<Context, decltype(&Context::isBelLocationValid), &Context::isBelLocationValid, pass_through<bool>, - conv_from_str<BelId>>::def_wrap(ctx_cls, "isBelLocationValid"); +fn_wrapper_2a<Context, decltype(&Context::isBelLocationValid), &Context::isBelLocationValid, pass_through<bool>, + conv_from_str<BelId>, pass_through<bool>>::def_wrap(ctx_cls, "isBelLocationValid"); // const\_range\<BelBucketId\> getBelBuckets() const fn_wrapper_0a<Context, decltype(&Context::getBelBuckets), &Context::getBelBuckets, diff --git a/common/kernel/base_arch.h b/common/kernel/base_arch.h index 53e28652..609d9378 100644 --- a/common/kernel/base_arch.h +++ b/common/kernel/base_arch.h @@ -357,7 +357,7 @@ template <typename R> struct BaseArch : ArchAPI<R> { return getBelBucketByName(cell_type); }; - virtual bool isBelLocationValid(BelId bel) const override { return true; } + virtual bool isBelLocationValid(BelId bel, bool explain_invalid = false) const override { return true; } virtual typename R::CellTypeRangeT getCellTypes() const override { NPNR_ASSERT(cell_types_initialised); |