aboutsummaryrefslogtreecommitdiffstats
path: root/common/pybindings.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-09-15 19:30:56 +0100
committerDavid Shah <dave@ds0.me>2019-09-15 19:30:56 +0100
commit5cd2b55f1f0ad729e95f344a5e8f4c8d00400669 (patch)
tree29843555f3d713e77efda46913c50ed90c93deb3 /common/pybindings.cc
parentd5e4986e1bf6e79b81beb1bc8a1086dd01931ea5 (diff)
downloadnextpnr-5cd2b55f1f0ad729e95f344a5e8f4c8d00400669.tar.gz
nextpnr-5cd2b55f1f0ad729e95f344a5e8f4c8d00400669.tar.bz2
nextpnr-5cd2b55f1f0ad729e95f344a5e8f4c8d00400669.zip
python: Adding helper functions for netlist modification
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'common/pybindings.cc')
-rw-r--r--common/pybindings.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/pybindings.cc b/common/pybindings.cc
index 3f2cb811..03979233 100644
--- a/common/pybindings.cc
+++ b/common/pybindings.cc
@@ -160,6 +160,22 @@ BOOST_PYTHON_MODULE(MODULE_NAME)
readonly_wrapper<CellInfo &, decltype(&CellInfo::pins), &CellInfo::pins, wrap_context<PinMap &>>::def_wrap(ci_cls,
"pins");
+ fn_wrapper_1a_v<CellInfo &, decltype(&CellInfo::addInput), &CellInfo::addInput, conv_from_str<IdString>>::def_wrap(
+ ci_cls, "addInput");
+ fn_wrapper_1a_v<CellInfo &, decltype(&CellInfo::addOutput), &CellInfo::addOutput,
+ conv_from_str<IdString>>::def_wrap(ci_cls, "addOutput");
+ fn_wrapper_1a_v<CellInfo &, decltype(&CellInfo::addInout), &CellInfo::addInout, conv_from_str<IdString>>::def_wrap(
+ ci_cls, "addInout");
+
+ fn_wrapper_2a_v<CellInfo &, decltype(&CellInfo::setParam), &CellInfo::setParam, conv_from_str<IdString>,
+ conv_from_str<Property>>::def_wrap(ci_cls, "setParam");
+ fn_wrapper_1a_v<CellInfo &, decltype(&CellInfo::unsetParam), &CellInfo::unsetParam,
+ conv_from_str<IdString>>::def_wrap(ci_cls, "unsetParam");
+ fn_wrapper_2a_v<CellInfo &, decltype(&CellInfo::setAttr), &CellInfo::setAttr, conv_from_str<IdString>,
+ conv_from_str<Property>>::def_wrap(ci_cls, "setAttr");
+ fn_wrapper_1a_v<CellInfo &, decltype(&CellInfo::unsetAttr), &CellInfo::unsetAttr,
+ conv_from_str<IdString>>::def_wrap(ci_cls, "unsetAttr");
+
auto pi_cls = class_<ContextualWrapper<PortInfo &>>("PortInfo", no_init);
readwrite_wrapper<PortInfo &, decltype(&PortInfo::name), &PortInfo::name, conv_to_str<IdString>,
conv_from_str<IdString>>::def_wrap(pi_cls, "name");