diff options
Diffstat (limited to 'ice40/chip.h')
-rw-r--r-- | ice40/chip.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/ice40/chip.h b/ice40/chip.h index 097fb286..96416c04 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -24,6 +24,8 @@ #error Include "chip.h" via "nextpnr.h" only. #endif +NEXTPNR_NAMESPACE_BEGIN + struct DelayInfo { float delay = 0; @@ -210,32 +212,36 @@ struct BelPin PortPin pin; }; +NEXTPNR_NAMESPACE_END + namespace std { -template <> struct hash<BelId> +template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelId> { - std::size_t operator()(const BelId &bel) const noexcept + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const noexcept { return bel.index; } }; -template <> struct hash<WireId> +template <> struct hash<NEXTPNR_NAMESPACE_PREFIX WireId> { - std::size_t operator()(const WireId &wire) const noexcept + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const noexcept { return wire.index; } }; -template <> struct hash<PipId> +template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PipId> { - std::size_t operator()(const PipId &wire) const noexcept + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &wire) const noexcept { return wire.index; } }; } // namespace std +NEXTPNR_NAMESPACE_BEGIN + // ----------------------------------------------------------------------- struct BelIterator @@ -679,4 +685,6 @@ struct Chip std::vector<GraphicElement> getFrameGraphics() const; }; +NEXTPNR_NAMESPACE_END + #endif |