diff options
author | David Shah <davey1576@gmail.com> | 2018-06-12 14:43:56 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-12 14:43:56 +0200 |
commit | 592a627e0c99ddf2cf06c286813a2d08962d8cd9 (patch) | |
tree | 5da4e6d6c4bfdb3d5a600b365ed9cb856c307de9 /ice40/chip.h | |
parent | 5a9ff4aea15fca7bcf8c86eaa1f92eb51f551e5b (diff) | |
parent | c8b815361e2435bf12786705638908aa891df44f (diff) | |
download | nextpnr-592a627e0c99ddf2cf06c286813a2d08962d8cd9.tar.gz nextpnr-592a627e0c99ddf2cf06c286813a2d08962d8cd9.tar.bz2 nextpnr-592a627e0c99ddf2cf06c286813a2d08962d8cd9.zip |
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
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 |