aboutsummaryrefslogtreecommitdiffstats
path: root/common/pybindings.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-09-19 20:15:42 +0100
committerGitHub <noreply@github.com>2019-09-19 20:15:42 +0100
commitcb71b488ecaf34ea2d55bb2bfe5b1b6ebfd06a6e (patch)
tree51512791d33754c31145182976c4dd8478591d99 /common/pybindings.cc
parentf8b3c13a538501369c13ca4053371c3d8ead32ae (diff)
parent6bb098b4761ba6d5fbbda07b3dcb88356ece6ce1 (diff)
downloadnextpnr-cb71b488ecaf34ea2d55bb2bfe5b1b6ebfd06a6e.tar.gz
nextpnr-cb71b488ecaf34ea2d55bb2bfe5b1b6ebfd06a6e.tar.bz2
nextpnr-cb71b488ecaf34ea2d55bb2bfe5b1b6ebfd06a6e.zip
Merge pull request #332 from YosysHQ/dave/python-refactor
Improving Python API and adding docs for it
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");