diff options
author | gatecat <gatecat@ds0.me> | 2022-06-23 18:48:31 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2022-07-08 14:30:57 +0200 |
commit | 09e388f453d9cf998391495349c88e5478b62e34 (patch) | |
tree | 004f2b14ed5a3b0584c4998d9f0a5598cc52ab28 /common/kernel/arch_pybindings_shared.h | |
parent | 86396c41d64d2583ec1dffca4298e83d927f0762 (diff) | |
download | nextpnr-09e388f453d9cf998391495349c88e5478b62e34.tar.gz nextpnr-09e388f453d9cf998391495349c88e5478b62e34.tar.bz2 nextpnr-09e388f453d9cf998391495349c88e5478b62e34.zip |
netlist: Add PseudoCell API
When implementing concepts such as partition pins or deliberately split
nets, there's a need for something that looks like a cell (starts/ends
routing with pins on nets, has timing data) but isn't mapped to a fixed
bel in the architecture, but instead can have pin mappings defined at
runtime.
The PseudoCell allows this by providing an alternate, virtual-function
based API for such cells. When a cell has `pseudo_cell` used, instead of
calling functions such as getBelPinWire, getBelLocation or getCellDelay
in the Arch API; such data is provided by the cell itself, fully
flexible at runtime regardless of arch, via methods on the PseudoCell
implementation.
Diffstat (limited to 'common/kernel/arch_pybindings_shared.h')
-rw-r--r-- | common/kernel/arch_pybindings_shared.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/kernel/arch_pybindings_shared.h b/common/kernel/arch_pybindings_shared.h index bfb58f11..d78d240c 100644 --- a/common/kernel/arch_pybindings_shared.h +++ b/common/kernel/arch_pybindings_shared.h @@ -150,4 +150,10 @@ fn_wrapper_1a<Context, decltype(&Context::getDelayFromNS), &Context::getDelayFro pass_through<double>>::def_wrap(ctx_cls, "getDelayFromNS"); fn_wrapper_1a<Context, decltype(&Context::getDelayNS), &Context::getDelayNS, pass_through<double>, - pass_through<delay_t>>::def_wrap(ctx_cls, "getDelayNS");
\ No newline at end of file + pass_through<delay_t>>::def_wrap(ctx_cls, "getDelayNS"); + +fn_wrapper_3a_v<Context, decltype(&Context::createRegionPlug), &Context::createRegionPlug, conv_from_str<IdString>, + conv_from_str<IdString>, pass_through<Loc>>::def_wrap(ctx_cls, "createRegionPlug"); +fn_wrapper_4a_v<Context, decltype(&Context::addPlugPin), &Context::addPlugPin, conv_from_str<IdString>, + conv_from_str<IdString>, pass_through<PortType>, conv_from_str<WireId>>::def_wrap(ctx_cls, + "addPlugPin"); |