Merge pull request #563 from litghost/seperate_pip_range_types
Seperate PipRange types in pybindings_shared.
This commit is contained in:
commit
efc98c517e
@ -91,9 +91,9 @@ fn_wrapper_1a<Context, decltype(&Context::getBoundPipNet), &Context::getBoundPip
|
|||||||
fn_wrapper_1a<Context, decltype(&Context::getConflictingPipNet), &Context::getConflictingPipNet,
|
fn_wrapper_1a<Context, decltype(&Context::getConflictingPipNet), &Context::getConflictingPipNet,
|
||||||
deref_and_wrap<NetInfo>, conv_from_str<PipId>>::def_wrap(ctx_cls, "getConflictingPipNet");
|
deref_and_wrap<NetInfo>, conv_from_str<PipId>>::def_wrap(ctx_cls, "getConflictingPipNet");
|
||||||
|
|
||||||
fn_wrapper_1a<Context, decltype(&Context::getPipsDownhill), &Context::getPipsDownhill, wrap_context<PipRange>,
|
fn_wrapper_1a<Context, decltype(&Context::getPipsDownhill), &Context::getPipsDownhill, wrap_context<DownhillPipRange>,
|
||||||
conv_from_str<WireId>>::def_wrap(ctx_cls, "getPipsDownhill");
|
conv_from_str<WireId>>::def_wrap(ctx_cls, "getPipsDownhill");
|
||||||
fn_wrapper_1a<Context, decltype(&Context::getPipsUphill), &Context::getPipsUphill, wrap_context<PipRange>,
|
fn_wrapper_1a<Context, decltype(&Context::getPipsUphill), &Context::getPipsUphill, wrap_context<UphillPipRange>,
|
||||||
conv_from_str<WireId>>::def_wrap(ctx_cls, "getPipsUphill");
|
conv_from_str<WireId>>::def_wrap(ctx_cls, "getPipsUphill");
|
||||||
|
|
||||||
fn_wrapper_1a<Context, decltype(&Context::getPipSrcWire), &Context::getPipSrcWire, conv_to_str<WireId>,
|
fn_wrapper_1a<Context, decltype(&Context::getPipSrcWire), &Context::getPipSrcWire, conv_to_str<WireId>,
|
||||||
|
@ -56,6 +56,9 @@ void arch_wrap_python(py::module &m)
|
|||||||
readonly_wrapper<BelPin, decltype(&BelPin::bel), &BelPin::bel, conv_to_str<BelId>>::def_wrap(belpin_cls, "bel");
|
readonly_wrapper<BelPin, decltype(&BelPin::bel), &BelPin::bel, conv_to_str<BelId>>::def_wrap(belpin_cls, "bel");
|
||||||
readonly_wrapper<BelPin, decltype(&BelPin::pin), &BelPin::pin, conv_to_str<IdString>>::def_wrap(belpin_cls, "pin");
|
readonly_wrapper<BelPin, decltype(&BelPin::pin), &BelPin::pin, conv_to_str<IdString>>::def_wrap(belpin_cls, "pin");
|
||||||
|
|
||||||
|
typedef const PipRange UphillPipRange;
|
||||||
|
typedef const PipRange DownhillPipRange;
|
||||||
|
|
||||||
#include "arch_pybindings_shared.h"
|
#include "arch_pybindings_shared.h"
|
||||||
|
|
||||||
WRAP_RANGE(m, Bel, conv_to_str<BelId>);
|
WRAP_RANGE(m, Bel, conv_to_str<BelId>);
|
||||||
|
@ -72,6 +72,9 @@ void arch_wrap_python(py::module &m)
|
|||||||
readonly_wrapper<BelPin, decltype(&BelPin::bel), &BelPin::bel, conv_to_str<BelId>>::def_wrap(belpin_cls, "bel");
|
readonly_wrapper<BelPin, decltype(&BelPin::bel), &BelPin::bel, conv_to_str<BelId>>::def_wrap(belpin_cls, "bel");
|
||||||
readonly_wrapper<BelPin, decltype(&BelPin::pin), &BelPin::pin, conv_to_str<IdString>>::def_wrap(belpin_cls, "pin");
|
readonly_wrapper<BelPin, decltype(&BelPin::pin), &BelPin::pin, conv_to_str<IdString>>::def_wrap(belpin_cls, "pin");
|
||||||
|
|
||||||
|
typedef const PipRange UphillPipRange;
|
||||||
|
typedef const PipRange DownhillPipRange;
|
||||||
|
|
||||||
#include "arch_pybindings_shared.h"
|
#include "arch_pybindings_shared.h"
|
||||||
|
|
||||||
WRAP_RANGE(m, Bel, conv_to_str<BelId>);
|
WRAP_RANGE(m, Bel, conv_to_str<BelId>);
|
||||||
@ -80,6 +83,7 @@ void arch_wrap_python(py::module &m)
|
|||||||
WRAP_RANGE(m, Pip, conv_to_str<PipId>);
|
WRAP_RANGE(m, Pip, conv_to_str<PipId>);
|
||||||
WRAP_RANGE(m, BelPin, wrap_context<BelPin>);
|
WRAP_RANGE(m, BelPin, wrap_context<BelPin>);
|
||||||
|
|
||||||
|
|
||||||
WRAP_MAP_UPTR(m, CellMap, "IdCellMap");
|
WRAP_MAP_UPTR(m, CellMap, "IdCellMap");
|
||||||
WRAP_MAP_UPTR(m, NetMap, "IdNetMap");
|
WRAP_MAP_UPTR(m, NetMap, "IdNetMap");
|
||||||
WRAP_MAP(m, HierarchyMap, wrap_context<HierarchicalCell &>, "HierarchyMap");
|
WRAP_MAP(m, HierarchyMap, wrap_context<HierarchicalCell &>, "HierarchyMap");
|
||||||
|
@ -999,7 +999,6 @@ struct Arch : BaseCtx
|
|||||||
|
|
||||||
BelId getBelByLocation(Loc loc) const
|
BelId getBelByLocation(Loc loc) const
|
||||||
{
|
{
|
||||||
BelId ret;
|
|
||||||
auto &t = tileStatus.at(loc.y * chip_info->width + loc.x);
|
auto &t = tileStatus.at(loc.y * chip_info->width + loc.x);
|
||||||
if (loc.z >= int(t.bels_by_z.size()))
|
if (loc.z >= int(t.bels_by_z.size()))
|
||||||
return BelId();
|
return BelId();
|
||||||
|
@ -51,7 +51,8 @@ void arch_wrap_python(py::module &m)
|
|||||||
typedef std::unordered_map<IdString, HierarchicalCell> HierarchyMap;
|
typedef std::unordered_map<IdString, HierarchicalCell> HierarchyMap;
|
||||||
typedef std::unordered_map<IdString, IdString> AliasMap;
|
typedef std::unordered_map<IdString, IdString> AliasMap;
|
||||||
|
|
||||||
typedef UpDownhillPipRange PipRange;
|
typedef UpDownhillPipRange UphillPipRange;
|
||||||
|
typedef UpDownhillPipRange DownhillPipRange;
|
||||||
typedef WireBelPinRange BelPinRange;
|
typedef WireBelPinRange BelPinRange;
|
||||||
|
|
||||||
#include "arch_pybindings_shared.h"
|
#include "arch_pybindings_shared.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user