From 7922b3bfc4ef93b8f67194c05e1a236b4c83c3da Mon Sep 17 00:00:00 2001 From: gatecat Date: Fri, 19 Feb 2021 10:39:57 +0000 Subject: Replace DelayInfo with DelayPair/DelayQuad This replaces the arch-specific DelayInfo structure with new DelayPair (min/max only) and DelayQuad (min/max for both rise and fall) structures that form part of common code. This further reduces the amount of arch-specific code; and also provides useful data structures for timing analysis which will need to delay with pairs/quads of delays as it is improved. While there may be a small performance cost to arches that didn't separate the rise/fall cases (arches that aren't currently separating the min/max cases just need to be fixed...) in DelayInfo, my expectation is that inlining will mean this doesn't make much difference. Signed-off-by: gatecat --- generic/arch_pybindings.cc | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'generic/arch_pybindings.cc') diff --git a/generic/arch_pybindings.cc b/generic/arch_pybindings.cc index 35ec3b33..50544dc1 100644 --- a/generic/arch_pybindings.cc +++ b/generic/arch_pybindings.cc @@ -60,8 +60,6 @@ void arch_wrap_python(py::module &m) py::class_(m, "BelPin").def_readwrite("bel", &BelPin::bel).def_readwrite("pin", &BelPin::pin); - py::class_(m, "DelayInfo").def("maxDelay", &DelayInfo::maxDelay).def("minDelay", &DelayInfo::minDelay); - fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getBelType"); fn_wrapper_1a, @@ -126,10 +124,10 @@ void arch_wrap_python(py::module &m) conv_from_str>::def_wrap(ctx_cls, "getPipSrcWire"); fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getPipDstWire"); - fn_wrapper_1a, + fn_wrapper_1a, conv_from_str>::def_wrap(ctx_cls, "getPipDelay"); - fn_wrapper_1a, + fn_wrapper_1a, pass_through>::def_wrap(ctx_cls, "getDelayFromNS"); fn_wrapper_0a>::def_wrap( @@ -159,8 +157,8 @@ void arch_wrap_python(py::module &m) "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); + pass_through, pass_through>::def_wrap(ctx_cls, "addPip", "name"_a, "type"_a, + "srcWire"_a, "dstWire"_a, "delay"_a, "loc"_a); fn_wrapper_5a_v, conv_from_str, pass_through, pass_through, @@ -215,16 +213,16 @@ void arch_wrap_python(py::module &m) "port"_a); fn_wrapper_4a_v, conv_from_str, conv_from_str, - pass_through>::def_wrap(ctx_cls, "addCellTimingDelay", "cell"_a, "fromPort"_a, - "toPort"_a, "delay"_a); + 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, - "clock"_a, "clktoq"_a); + pass_through>::def_wrap(ctx_cls, "addCellTimingClockToOut", "cell"_a, "port"_a, "clock"_a, + "clktoq"_a); fn_wrapper_2a_v, conv_from_str>::def_wrap(ctx_cls, "clearCellBelPinMap", "cell"_a, -- cgit v1.2.3