diff options
author | David Shah <davey1576@gmail.com> | 2018-07-22 17:07:38 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-07-22 17:07:38 +0200 |
commit | 987fdc1b29d9cb7478df49c72f68ce5f3f9f740c (patch) | |
tree | fc405e99fe588df25bdd776913733df91b67eaac /ecp5/arch.h | |
parent | 38431bd420ff2dcbaa9581571e6d0302dcfe2379 (diff) | |
download | nextpnr-987fdc1b29d9cb7478df49c72f68ce5f3f9f740c.tar.gz nextpnr-987fdc1b29d9cb7478df49c72f68ce5f3f9f740c.tar.bz2 nextpnr-987fdc1b29d9cb7478df49c72f68ce5f3f9f740c.zip |
ecp5: Adding new Bel pin API
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5/arch.h')
-rw-r--r-- | ecp5/arch.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/ecp5/arch.h b/ecp5/arch.h index 13b2c3b8..b6aec856 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -50,6 +50,7 @@ NPNR_PACKED_STRUCT(struct BelWirePOD { LocationPOD rel_wire_loc; int32_t wire_index; PortPin port; + int32_t type; }); NPNR_PACKED_STRUCT(struct BelInfoPOD { @@ -87,6 +88,9 @@ NPNR_PACKED_STRUCT(struct WireInfoPOD { int32_t num_bels_downhill; BelPortPOD bel_uphill; RelPtr<BelPortPOD> bels_downhill; + + int32_t num_bel_pins; + RelPtr<BelPortPOD> bel_pins; }); NPNR_PACKED_STRUCT(struct LocationTypePOD { @@ -486,7 +490,7 @@ struct Arch : BaseCtx WireId getBelPinWire(BelId bel, PortPin pin) const; - BelPin getBelPinUphill(WireId wire) const + BelPin getBelPinUphill(WireId wire) const NPNR_DEPRECATED { BelPin ret; NPNR_ASSERT(wire != WireId()); @@ -500,7 +504,7 @@ struct Arch : BaseCtx return ret; } - BelPinRange getBelPinsDownhill(WireId wire) const + BelPinRange getBelPinsDownhill(WireId wire) const NPNR_DEPRECATED { BelPinRange range; NPNR_ASSERT(wire != WireId()); @@ -511,6 +515,19 @@ struct Arch : BaseCtx return range; } + BelPinRange getWireBelPins(WireId wire) const + { + BelPinRange range; + NPNR_ASSERT(wire != WireId()); + range.b.ptr = locInfo(wire)->wire_data[wire.index].bel_pins.get(); + range.b.wire_loc = wire.location; + range.e.ptr = range.b.ptr + locInfo(wire)->wire_data[wire.index].num_bel_pins; + range.e.wire_loc = wire.location; + return range; + } + + std::vector<PortPin> getBelPins(BelId bel) const; + // ------------------------------------------------- WireId getWireByName(IdString name) const; @@ -581,6 +598,7 @@ struct Arch : BaseCtx DelayInfo getWireDelay(WireId wire) const { DelayInfo delay; + delay.delay = 0; return delay; } @@ -739,6 +757,8 @@ struct Arch : BaseCtx BelId getPackagePinBel(const std::string &pin) const; std::string getBelPackagePin(BelId bel) const; + PortType getBelPinType(BelId bel, PortPin pin) const; + // ------------------------------------------------- GroupId getGroupByName(IdString name) const { return GroupId(); } |