diff --git a/common/nextpnr.h b/common/nextpnr.h index 43c092f8..58bff892 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -1070,15 +1070,15 @@ template struct ArchAPI : BaseCtx // Basic config virtual IdString archId() const = 0; virtual std::string getChipName() const = 0; - virtual typename R::ArchArgsType archArgs() const = 0; - virtual IdString archArgsToId(typename R::ArchArgsType args) const = 0; + virtual typename R::ArchArgsT archArgs() const = 0; + virtual IdString archArgsToId(typename R::ArchArgsT args) const = 0; virtual int getGridDimX() const = 0; virtual int getGridDimY() const = 0; virtual int getTileBelDimZ(int x, int y) const = 0; virtual int getTilePipDimZ(int x, int y) const = 0; virtual char getNameDelimiter() const = 0; // Bel methods - virtual typename R::AllBelsRange getBels() const = 0; + virtual typename R::AllBelsRangeT getBels() const = 0; virtual IdStringList getBelName(BelId bel) const = 0; virtual BelId getBelByName(IdStringList name) const = 0; virtual uint32_t getBelChecksum(BelId bel) const = 0; @@ -1086,25 +1086,25 @@ template struct ArchAPI : BaseCtx virtual void unbindBel(BelId bel) = 0; virtual Loc getBelLocation(BelId bel) const = 0; virtual BelId getBelByLocation(Loc loc) const = 0; - virtual typename R::TileBelsRange getBelsByTile(int x, int y) const = 0; + virtual typename R::TileBelsRangeT getBelsByTile(int x, int y) const = 0; virtual bool getBelGlobalBuf(BelId bel) const = 0; virtual bool checkBelAvail(BelId bel) const = 0; virtual CellInfo *getBoundBelCell(BelId bel) const = 0; virtual CellInfo *getConflictingBelCell(BelId bel) const = 0; virtual IdString getBelType(BelId bel) const = 0; - virtual typename R::BelAttrsRange getBelAttrs(BelId bel) const = 0; + virtual typename R::BelAttrsRangeT getBelAttrs(BelId bel) const = 0; virtual WireId getBelPinWire(BelId bel, IdString pin) const = 0; virtual PortType getBelPinType(BelId bel, IdString pin) const = 0; - virtual typename R::BelPinsRange getBelPins(BelId bel) const = 0; + virtual typename R::BelPinsRangeT getBelPins(BelId bel) const = 0; // Wire methods - virtual typename R::AllWiresRange getWires() const = 0; + virtual typename R::AllWiresRangeT getWires() const = 0; virtual WireId getWireByName(IdStringList name) const = 0; virtual IdStringList getWireName(WireId wire) const = 0; virtual IdString getWireType(WireId wire) const = 0; - virtual typename R::WireAttrsRange getWireAttrs(WireId) const = 0; - virtual typename R::DownhillPipRange getPipsDownhill(WireId wire) const = 0; - virtual typename R::UphillPipRange getPipsUphill(WireId wire) const = 0; - virtual typename R::WireBelPinRange getWireBelPins(WireId wire) const = 0; + virtual typename R::WireAttrsRangeT getWireAttrs(WireId) const = 0; + virtual typename R::DownhillPipRangeT getPipsDownhill(WireId wire) const = 0; + virtual typename R::UphillPipRangeT getPipsUphill(WireId wire) const = 0; + virtual typename R::WireBelPinRangeT getWireBelPins(WireId wire) const = 0; virtual uint32_t getWireChecksum(WireId wire) const = 0; virtual void bindWire(WireId wire, NetInfo *net, PlaceStrength strength) = 0; virtual void unbindWire(WireId wire) = 0; @@ -1114,11 +1114,11 @@ template struct ArchAPI : BaseCtx virtual NetInfo *getConflictingWireNet(WireId wire) const = 0; virtual DelayInfo getWireDelay(WireId wire) const = 0; // Pip methods - virtual typename R::AllPipsRange getPips() const = 0; + virtual typename R::AllPipsRangeT getPips() const = 0; virtual PipId getPipByName(IdStringList name) const = 0; virtual IdStringList getPipName(PipId pip) const = 0; virtual IdString getPipType(PipId pip) const = 0; - virtual typename R::PipAttrsRange getPipAttrs(PipId) const = 0; + virtual typename R::PipAttrsRangeT getPipAttrs(PipId) const = 0; virtual uint32_t getPipChecksum(PipId pip) const = 0; virtual void bindPip(PipId pip, NetInfo *net, PlaceStrength strength) = 0; virtual void unbindPip(PipId pip) = 0; @@ -1133,11 +1133,11 @@ template struct ArchAPI : BaseCtx // Group methods virtual GroupId getGroupByName(IdStringList name) const = 0; virtual IdStringList getGroupName(GroupId group) const = 0; - virtual typename R::AllGroupsRange getGroups() const = 0; - virtual typename R::GroupBelsRange getGroupBels(GroupId group) const = 0; - virtual typename R::GroupWiresRange getGroupWires(GroupId group) const = 0; - virtual typename R::GroupPipsRange getGroupPips(GroupId group) const = 0; - virtual typename R::GroupGroupsRange getGroupGroups(GroupId group) const = 0; + virtual typename R::AllGroupsRangeT getGroups() const = 0; + virtual typename R::GroupBelsRangeT getGroupBels(GroupId group) const = 0; + virtual typename R::GroupWiresRangeT getGroupWires(GroupId group) const = 0; + virtual typename R::GroupPipsRangeT getGroupPips(GroupId group) const = 0; + virtual typename R::GroupGroupsRangeT getGroupGroups(GroupId group) const = 0; // Delay Methods virtual delay_t predictDelay(const NetInfo *net_info, const PortRef &sink) const = 0; virtual delay_t getDelayEpsilon() const = 0; @@ -1149,7 +1149,7 @@ template struct ArchAPI : BaseCtx virtual delay_t estimateDelay(WireId src, WireId dst) const = 0; virtual ArcBounds getRouteBoundingBox(WireId src, WireId dst) const = 0; // Decal methods - virtual typename R::DecalGfxRange getDecalGraphics(DecalId decal) const = 0; + virtual typename R::DecalGfxRangeT getDecalGraphics(DecalId decal) const = 0; virtual DecalXY getBelDecal(BelId bel) const = 0; virtual DecalXY getWireDecal(WireId wire) const = 0; virtual DecalXY getPipDecal(PipId pip) const = 0; @@ -1166,9 +1166,9 @@ template struct ArchAPI : BaseCtx virtual BelBucketId getBelBucketForCellType(IdString cell_type) const = 0; virtual bool isValidBelForCell(CellInfo *cell, BelId bel) const = 0; virtual bool isBelLocationValid(BelId bel) const = 0; - virtual typename R::CellTypeRange getCellTypes() const = 0; - virtual typename R::BelBucketRange getBelBuckets() const = 0; - virtual typename R::BucketBelRange getBelsInBucket(BelBucketId bucket) const = 0; + virtual typename R::CellTypeRangeT getCellTypes() const = 0; + virtual typename R::BelBucketRangeT getBelBuckets() const = 0; + virtual typename R::BucketBelRangeT getBelsInBucket(BelBucketId bucket) const = 0; // Flow methods virtual bool pack() = 0; virtual bool place() = 0; @@ -1183,7 +1183,7 @@ template struct BaseArch : ArchAPI // Basic config virtual IdString archId() const override { return this->id(STRINGIFY(ARCHNAME)); } - virtual IdString archArgsToId(typename R::ArchArgsType args) const { return IdString(); } + virtual IdString archArgsToId(typename R::ArchArgsT args) const { return IdString(); } virtual int getTilePipDimZ(int x, int y) const override { return 1; } virtual char getNameDelimiter() const override { return ' '; } @@ -1218,16 +1218,16 @@ template struct BaseArch : ArchAPI return fnd == base_bel2cell.end() ? nullptr : fnd->second; } virtual CellInfo *getConflictingBelCell(BelId bel) const override { return getBoundBelCell(bel); } - virtual typename R::BelAttrsRange getBelAttrs(BelId bel) const override + virtual typename R::BelAttrsRangeT getBelAttrs(BelId bel) const override { - return empty_if_possible(); + return empty_if_possible(); } // Wire methods virtual IdString getWireType(WireId wire) const override { return IdString(); } - virtual typename R::WireAttrsRange getWireAttrs(WireId) const override + virtual typename R::WireAttrsRangeT getWireAttrs(WireId) const override { - return empty_if_possible(); + return empty_if_possible(); } virtual uint32_t getWireChecksum(WireId wire) const override { return uint32_t(std::hash()(wire)); } @@ -1273,9 +1273,9 @@ template struct BaseArch : ArchAPI // Pip methods virtual IdString getPipType(PipId pip) const { return IdString(); } - virtual typename R::PipAttrsRange getPipAttrs(PipId) const override + virtual typename R::PipAttrsRangeT getPipAttrs(PipId) const override { - return empty_if_possible(); + return empty_if_possible(); } virtual uint32_t getPipChecksum(PipId pip) const override { return uint32_t(std::hash()(pip)); } virtual void bindPip(PipId pip, NetInfo *net, PlaceStrength strength) override @@ -1318,18 +1318,24 @@ template struct BaseArch : ArchAPI // Group methods virtual GroupId getGroupByName(IdStringList name) const override { return GroupId(); }; virtual IdStringList getGroupName(GroupId group) const override { return IdStringList(); }; - virtual typename R::AllGroupsRange getGroups() const override + virtual typename R::AllGroupsRangeT getGroups() const override { - return empty_if_possible(); + return empty_if_possible(); } // Default implementation of these assumes no groups so never called - virtual typename R::GroupBelsRange getGroupBels(GroupId group) const override { NPNR_ASSERT_FALSE("unreachable"); }; - virtual typename R::GroupWiresRange getGroupWires(GroupId group) const override + virtual typename R::GroupBelsRangeT getGroupBels(GroupId group) const override { NPNR_ASSERT_FALSE("unreachable"); }; - virtual typename R::GroupPipsRange getGroupPips(GroupId group) const override { NPNR_ASSERT_FALSE("unreachable"); }; - virtual typename R::GroupGroupsRange getGroupGroups(GroupId group) const override + virtual typename R::GroupWiresRangeT getGroupWires(GroupId group) const override + { + NPNR_ASSERT_FALSE("unreachable"); + }; + virtual typename R::GroupPipsRangeT getGroupPips(GroupId group) const override + { + NPNR_ASSERT_FALSE("unreachable"); + }; + virtual typename R::GroupGroupsRangeT getGroupGroups(GroupId group) const override { NPNR_ASSERT_FALSE("unreachable"); }; @@ -1341,7 +1347,7 @@ template struct BaseArch : ArchAPI } // Decal methods - virtual typename R::DecalGfxRange getDecalGraphics(DecalId decal) const override + virtual typename R::DecalGfxRangeT getDecalGraphics(DecalId decal) const override { NPNR_ASSERT_FALSE("unreachable"); }; @@ -1381,20 +1387,20 @@ template struct BaseArch : ArchAPI }; virtual bool isValidBelForCell(CellInfo *cell, BelId bel) const override { return true; } virtual bool isBelLocationValid(BelId bel) const override { return true; } - virtual typename R::CellTypeRange getCellTypes() const override + virtual typename R::CellTypeRangeT getCellTypes() const override { NPNR_ASSERT(cell_types_initialised); - return return_if_match &, typename R::CellTypeRange>(cell_types); + return return_if_match &, typename R::CellTypeRangeT>(cell_types); } - virtual typename R::BelBucketRange getBelBuckets() const override + virtual typename R::BelBucketRangeT getBelBuckets() const override { NPNR_ASSERT(bel_buckets_initialised); - return return_if_match &, typename R::BelBucketRange>(bel_buckets); + return return_if_match &, typename R::BelBucketRangeT>(bel_buckets); } - virtual typename R::BucketBelRange getBelsInBucket(BelBucketId bucket) const override + virtual typename R::BucketBelRangeT getBelsInBucket(BelBucketId bucket) const override { NPNR_ASSERT(bel_buckets_initialised); - return return_if_match &, typename R::BucketBelRange>(bucket_bels.at(bucket)); + return return_if_match &, typename R::BucketBelRangeT>(bucket_bels.at(bucket)); } // Flow methods diff --git a/ecp5/arch.h b/ecp5/arch.h index 87cf4037..439aa4a0 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -437,33 +437,33 @@ NEXTPNR_NAMESPACE_BEGIN struct ArchRanges { - using ArchArgsType = ArchArgs; + using ArchArgsT = ArchArgs; // Bels - using AllBelsRange = BelRange; - using TileBelsRange = BelRange; - using BelAttrsRange = std::vector>; - using BelPinsRange = std::vector; + using AllBelsRangeT = BelRange; + using TileBelsRangeT = BelRange; + using BelAttrsRangeT = std::vector>; + using BelPinsRangeT = std::vector; // Wires - using AllWiresRange = WireRange; - using DownhillPipRange = PipRange; - using UphillPipRange = PipRange; - using WireBelPinRange = BelPinRange; - using WireAttrsRange = std::vector>; + using AllWiresRangeT = WireRange; + using DownhillPipRangeT = PipRange; + using UphillPipRangeT = PipRange; + using WireBelPinRangeT = BelPinRange; + using WireAttrsRangeT = std::vector>; // Pips - using AllPipsRange = AllPipRange; - using PipAttrsRange = std::vector>; + using AllPipsRangeT = AllPipRange; + using PipAttrsRangeT = std::vector>; // Groups - using AllGroupsRange = std::vector; - using GroupBelsRange = std::vector; - using GroupWiresRange = std::vector; - using GroupPipsRange = std::vector; - using GroupGroupsRange = std::vector; + using AllGroupsRangeT = std::vector; + using GroupBelsRangeT = std::vector; + using GroupWiresRangeT = std::vector; + using GroupPipsRangeT = std::vector; + using GroupGroupsRangeT = std::vector; // Decals - using DecalGfxRange = std::vector; + using DecalGfxRangeT = std::vector; // Placement validity - using CellTypeRange = const std::vector &; - using BelBucketRange = const std::vector &; - using BucketBelRange = const std::vector &; + using CellTypeRangeT = const std::vector &; + using BelBucketRangeT = const std::vector &; + using BucketBelRangeT = const std::vector &; }; struct Arch : BaseArch diff --git a/generic/arch.h b/generic/arch.h index d153182e..09fd8e34 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -118,33 +118,33 @@ struct CellTiming struct ArchRanges { - using ArchArgsType = ArchArgs; + using ArchArgsT = ArchArgs; // Bels - using AllBelsRange = const std::vector &; - using TileBelsRange = const std::vector &; - using BelAttrsRange = const std::map &; - using BelPinsRange = std::vector; + using AllBelsRangeT = const std::vector &; + using TileBelsRangeT = const std::vector &; + using BelAttrsRangeT = const std::map &; + using BelPinsRangeT = std::vector; // Wires - using AllWiresRange = const std::vector &; - using DownhillPipRange = const std::vector &; - using UphillPipRange = const std::vector &; - using WireBelPinRange = const std::vector &; - using WireAttrsRange = const std::map &; + using AllWiresRangeT = const std::vector &; + using DownhillPipRangeT = const std::vector &; + using UphillPipRangeT = const std::vector &; + using WireBelPinRangeT = const std::vector &; + using WireAttrsRangeT = const std::map &; // Pips - using AllPipsRange = const std::vector &; - using PipAttrsRange = const std::map &; + using AllPipsRangeT = const std::vector &; + using PipAttrsRangeT = const std::map &; // Groups - using AllGroupsRange = std::vector; - using GroupBelsRange = const std::vector &; - using GroupWiresRange = const std::vector &; - using GroupPipsRange = const std::vector &; - using GroupGroupsRange = const std::vector &; + using AllGroupsRangeT = std::vector; + using GroupBelsRangeT = const std::vector &; + using GroupWiresRangeT = const std::vector &; + using GroupPipsRangeT = const std::vector &; + using GroupGroupsRangeT = const std::vector &; // Decals - using DecalGfxRange = const std::vector &; + using DecalGfxRangeT = const std::vector &; // Placement validity - using CellTypeRange = std::vector; - using BelBucketRange = std::vector; - using BucketBelRange = std::vector; + using CellTypeRangeT = std::vector; + using BelBucketRangeT = std::vector; + using BucketBelRangeT = std::vector; }; struct Arch : ArchAPI diff --git a/gowin/arch.h b/gowin/arch.h index 5c595bac..c5ef0a2e 100644 --- a/gowin/arch.h +++ b/gowin/arch.h @@ -245,33 +245,33 @@ struct CellTiming struct ArchRanges { - using ArchArgsType = ArchArgs; + using ArchArgsT = ArchArgs; // Bels - using AllBelsRange = const std::vector &; - using TileBelsRange = const std::vector &; - using BelAttrsRange = const std::map &; - using BelPinsRange = std::vector; + using AllBelsRangeT = const std::vector &; + using TileBelsRangeT = const std::vector &; + using BelAttrsRangeT = const std::map &; + using BelPinsRangeT = std::vector; // Wires - using AllWiresRange = const std::vector &; - using DownhillPipRange = const std::vector &; - using UphillPipRange = const std::vector &; - using WireBelPinRange = const std::vector &; - using WireAttrsRange = const std::map &; + using AllWiresRangeT = const std::vector &; + using DownhillPipRangeT = const std::vector &; + using UphillPipRangeT = const std::vector &; + using WireBelPinRangeT = const std::vector &; + using WireAttrsRangeT = const std::map &; // Pips - using AllPipsRange = const std::vector &; - using PipAttrsRange = const std::map &; + using AllPipsRangeT = const std::vector &; + using PipAttrsRangeT = const std::map &; // Groups - using AllGroupsRange = std::vector; - using GroupBelsRange = const std::vector &; - using GroupWiresRange = const std::vector &; - using GroupPipsRange = const std::vector &; - using GroupGroupsRange = const std::vector &; + using AllGroupsRangeT = std::vector; + using GroupBelsRangeT = const std::vector &; + using GroupWiresRangeT = const std::vector &; + using GroupPipsRangeT = const std::vector &; + using GroupGroupsRangeT = const std::vector &; // Decals - using DecalGfxRange = const std::vector &; + using DecalGfxRangeT = const std::vector &; // Placement validity - using CellTypeRange = std::vector; - using BelBucketRange = std::vector; - using BucketBelRange = std::vector; + using CellTypeRangeT = std::vector; + using BelBucketRangeT = std::vector; + using BucketBelRangeT = std::vector; }; struct Arch : BaseArch diff --git a/ice40/arch.h b/ice40/arch.h index dd771c0f..85182a60 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -376,33 +376,33 @@ struct ArchArgs struct ArchRanges { - using ArchArgsType = ArchArgs; + using ArchArgsT = ArchArgs; // Bels - using AllBelsRange = BelRange; - using TileBelsRange = BelRange; - using BelAttrsRange = std::vector>; - using BelPinsRange = std::vector; + using AllBelsRangeT = BelRange; + using TileBelsRangeT = BelRange; + using BelAttrsRangeT = std::vector>; + using BelPinsRangeT = std::vector; // Wires - using AllWiresRange = WireRange; - using DownhillPipRange = PipRange; - using UphillPipRange = PipRange; - using WireBelPinRange = BelPinRange; - using WireAttrsRange = std::vector>; + using AllWiresRangeT = WireRange; + using DownhillPipRangeT = PipRange; + using UphillPipRangeT = PipRange; + using WireBelPinRangeT = BelPinRange; + using WireAttrsRangeT = std::vector>; // Pips - using AllPipsRange = AllPipRange; - using PipAttrsRange = std::vector>; + using AllPipsRangeT = AllPipRange; + using PipAttrsRangeT = std::vector>; // Groups - using AllGroupsRange = std::vector; - using GroupBelsRange = std::vector; - using GroupWiresRange = std::vector; - using GroupPipsRange = std::vector; - using GroupGroupsRange = std::vector; + using AllGroupsRangeT = std::vector; + using GroupBelsRangeT = std::vector; + using GroupWiresRangeT = std::vector; + using GroupPipsRangeT = std::vector; + using GroupGroupsRangeT = std::vector; // Decals - using DecalGfxRange = std::vector; + using DecalGfxRangeT = std::vector; // Placement validity - using CellTypeRange = const std::vector &; - using BelBucketRange = const std::vector &; - using BucketBelRange = const std::vector &; + using CellTypeRangeT = const std::vector &; + using BelBucketRangeT = const std::vector &; + using BucketBelRangeT = const std::vector &; }; struct Arch : BaseArch diff --git a/nexus/arch.h b/nexus/arch.h index f835a6b3..34ab1d94 100644 --- a/nexus/arch.h +++ b/nexus/arch.h @@ -857,33 +857,33 @@ struct ArchArgs struct ArchRanges { - using ArchArgsType = ArchArgs; + using ArchArgsT = ArchArgs; // Bels - using AllBelsRange = BelRange; - using TileBelsRange = std::vector; - using BelAttrsRange = std::vector>; - using BelPinsRange = std::vector; + using AllBelsRangeT = BelRange; + using TileBelsRangeT = std::vector; + using BelAttrsRangeT = std::vector>; + using BelPinsRangeT = std::vector; // Wires - using AllWiresRange = WireRange; - using DownhillPipRange = UpDownhillPipRange; - using UphillPipRange = UpDownhillPipRange; - using WireBelPinRange = BelPinRange; - using WireAttrsRange = std::vector>; + using AllWiresRangeT = WireRange; + using DownhillPipRangeT = UpDownhillPipRange; + using UphillPipRangeT = UpDownhillPipRange; + using WireBelPinRangeT = BelPinRange; + using WireAttrsRangeT = std::vector>; // Pips - using AllPipsRange = AllPipRange; - using PipAttrsRange = std::vector>; + using AllPipsRangeT = AllPipRange; + using PipAttrsRangeT = std::vector>; // Groups - using AllGroupsRange = std::vector; - using GroupBelsRange = std::vector; - using GroupWiresRange = std::vector; - using GroupPipsRange = std::vector; - using GroupGroupsRange = std::vector; + using AllGroupsRangeT = std::vector; + using GroupBelsRangeT = std::vector; + using GroupWiresRangeT = std::vector; + using GroupPipsRangeT = std::vector; + using GroupGroupsRangeT = std::vector; // Decals - using DecalGfxRange = std::vector; + using DecalGfxRangeT = std::vector; // Placement validity - using CellTypeRange = const std::vector &; - using BelBucketRange = const std::vector &; - using BucketBelRange = const std::vector &; + using CellTypeRangeT = const std::vector &; + using BelBucketRangeT = const std::vector &; + using BucketBelRangeT = const std::vector &; }; struct Arch : BaseArch