From 7cff69f9453e0c95f8eb9a12b004afa20b69501e Mon Sep 17 00:00:00 2001 From: "D. Shah" Date: Tue, 2 Feb 2021 14:48:29 +0000 Subject: generic: Use IdStringList for all arch object names Signed-off-by: D. Shah --- generic/arch_pybindings.cc | 62 ++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 30 deletions(-) (limited to 'generic/arch_pybindings.cc') diff --git a/generic/arch_pybindings.cc b/generic/arch_pybindings.cc index 23f2c05c..4fc76c96 100644 --- a/generic/arch_pybindings.cc +++ b/generic/arch_pybindings.cc @@ -35,6 +35,7 @@ template <> struct string_converter std::string to_str(Context *ctx, const IdString &id) { return id.str(ctx); } }; + } // namespace PythonConversion void arch_wrap_python(py::module &m) @@ -152,37 +153,37 @@ void arch_wrap_python(py::module &m) pass_through>::def_wrap(ctx_cls, "addClock"); // Generic arch construction API - fn_wrapper_4a_v, + fn_wrapper_4a_v, conv_from_str, pass_through, pass_through>::def_wrap(ctx_cls, "addWire", "name"_a, "type"_a, "x"_a, "y"_a); - fn_wrapper_6a_v, - conv_from_str, conv_from_str, conv_from_str, pass_through, - pass_through>::def_wrap(ctx_cls, "addPip", "name"_a, "type"_a, "srcWire"_a, "dstWire"_a, - "delay"_a, "loc"_a); + fn_wrapper_6a_v, + conv_from_str, conv_from_str, conv_from_str, + pass_through, pass_through>::def_wrap(ctx_cls, "addPip", "name"_a, "type"_a, + "srcWire"_a, "dstWire"_a, "delay"_a, "loc"_a); - fn_wrapper_4a_v, + fn_wrapper_4a_v, conv_from_str, pass_through, pass_through>::def_wrap(ctx_cls, "addBel", "name"_a, "type"_a, "loc"_a, "gb"_a); - fn_wrapper_3a_v, - conv_from_str, conv_from_str>::def_wrap(ctx_cls, "addBelInput", "bel"_a, - "name"_a, "wire"_a); - fn_wrapper_3a_v, - conv_from_str, conv_from_str>::def_wrap(ctx_cls, "addBelOutput", "bel"_a, - "name"_a, "wire"_a); - fn_wrapper_3a_v, - conv_from_str, conv_from_str>::def_wrap(ctx_cls, "addBelInout", "bel"_a, - "name"_a, "wire"_a); - - fn_wrapper_2a_v, - conv_from_str>::def_wrap(ctx_cls, "addGroupBel", "group"_a, "bel"_a); - fn_wrapper_2a_v, - conv_from_str>::def_wrap(ctx_cls, "addGroupWire", "group"_a, "wire"_a); - fn_wrapper_2a_v, - conv_from_str>::def_wrap(ctx_cls, "addGroupPip", "group"_a, "pip"_a); - fn_wrapper_2a_v, - conv_from_str>::def_wrap(ctx_cls, "addGroupGroup", "group"_a, "grp"_a); + fn_wrapper_3a_v, + conv_from_str, conv_from_str>::def_wrap(ctx_cls, "addBelInput", "bel"_a, + "name"_a, "wire"_a); + fn_wrapper_3a_v, + conv_from_str, conv_from_str>::def_wrap(ctx_cls, "addBelOutput", "bel"_a, + "name"_a, "wire"_a); + fn_wrapper_3a_v, + conv_from_str, conv_from_str>::def_wrap(ctx_cls, "addBelInout", "bel"_a, + "name"_a, "wire"_a); + + fn_wrapper_2a_v, + conv_from_str>::def_wrap(ctx_cls, "addGroupBel", "group"_a, "bel"_a); + fn_wrapper_2a_v, + conv_from_str>::def_wrap(ctx_cls, "addGroupWire", "group"_a, "wire"_a); + fn_wrapper_2a_v, + conv_from_str>::def_wrap(ctx_cls, "addGroupPip", "group"_a, "pip"_a); + fn_wrapper_2a_v, + conv_from_str>::def_wrap(ctx_cls, "addGroupGroup", "group"_a, "grp"_a); fn_wrapper_2a_v, pass_through>::def_wrap(ctx_cls, "addDecalGraphic", (py::arg("decal"), "graphic")); @@ -211,16 +212,17 @@ void arch_wrap_python(py::module &m) pass_through>::def_wrap(ctx_cls, "setDelayScaling", "scale"_a, "offset"_a); fn_wrapper_2a_v, conv_from_str>::def_wrap(ctx_cls, "addCellTimingClock", "cell"_a, - "port"_a); + conv_from_str, conv_from_str>::def_wrap(ctx_cls, "addCellTimingClock", + "cell"_a, "port"_a); fn_wrapper_4a_v, conv_from_str, conv_from_str, + conv_from_str, conv_from_str, conv_from_str, pass_through>::def_wrap(ctx_cls, "addCellTimingDelay", "cell"_a, "fromPort"_a, "toPort"_a, "delay"_a); fn_wrapper_5a_v, conv_from_str, conv_from_str, pass_through, - pass_through>::def_wrap(ctx_cls, "addCellTimingSetupHold", "cell"_a, "port"_a, "clock"_a, - "setup"_a, "hold"_a); + conv_from_str, conv_from_str, conv_from_str, + pass_through, pass_through>::def_wrap(ctx_cls, "addCellTimingSetupHold", + "cell"_a, "port"_a, "clock"_a, + "setup"_a, "hold"_a); fn_wrapper_4a_v, conv_from_str, conv_from_str, pass_through>::def_wrap(ctx_cls, "addCellTimingClockToOut", "cell"_a, "port"_a, -- cgit v1.2.3