From e54aa836a4b56462497e354b3a94472c49312c68 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sat, 3 Oct 2020 15:00:45 +0100 Subject: [PATCH] nexus: Updates Signed-off-by: David Shah --- nexus/arch_pybindings.cc | 4 ---- nexus/constids.inc | 2 ++ nexus/pack.cc | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/nexus/arch_pybindings.cc b/nexus/arch_pybindings.cc index 17c097a7..8bee7713 100644 --- a/nexus/arch_pybindings.cc +++ b/nexus/arch_pybindings.cc @@ -53,10 +53,6 @@ void arch_wrap_python(py::module &m) typedef std::unordered_map HierarchyMap; typedef std::unordered_map AliasMap; - auto belpin_cls = py::class_>(m, "BelPin"); - readonly_wrapper>::def_wrap(belpin_cls, "bel"); - readonly_wrapper>::def_wrap(belpin_cls, "pin"); - typedef UpDownhillPipRange PipRange; typedef WireBelPinRange BelPinRange; diff --git a/nexus/constids.inc b/nexus/constids.inc index 38df628e..d37857a6 100644 --- a/nexus/constids.inc +++ b/nexus/constids.inc @@ -69,6 +69,8 @@ X(INIT1) X(INV) X(BB) +X(VHI) +X(VLO) X(FD1P3BX) X(FD1P3DX) diff --git a/nexus/pack.cc b/nexus/pack.cc index 35d67fb0..46295597 100644 --- a/nexus/pack.cc +++ b/nexus/pack.cc @@ -208,6 +208,20 @@ struct NexusPacker lut_rules[id_LUT4].new_type = id_OXIDE_COMB; lut_rules[id_LUT4].port_xform[id_Z] = id_F; lut_rules[id_LUT4].parse_params.emplace_back(id_INIT, id_INIT, 16, 0); + + lut_rules[id_INV].new_type = id_OXIDE_COMB; + lut_rules[id_INV].port_xform[id_Z] = id_F; + lut_rules[id_INV].port_xform[id_A] = id_A; + lut_rules[id_INV].set_params.emplace_back(id_INIT, 0x5555); + + lut_rules[id_VHI].new_type = id_OXIDE_COMB; + lut_rules[id_VHI].port_xform[id_Z] = id_F; + lut_rules[id_VHI].set_params.emplace_back(id_INIT, 0xFFFF); + + lut_rules[id_VLO].new_type = id_OXIDE_COMB; + lut_rules[id_VLO].port_xform[id_Z] = id_F; + lut_rules[id_VLO].set_params.emplace_back(id_INIT, 0x0000); + generic_xform(lut_rules); } @@ -308,4 +322,4 @@ void Arch::assignCellInfo(CellInfo *cell) } } -NEXTPNR_NAMESPACE_END \ No newline at end of file +NEXTPNR_NAMESPACE_END