diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-06-12 15:08:01 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-06-12 15:08:01 +0200 |
commit | a139654980b2d2560667b12c886de7518ec97c40 (patch) | |
tree | 7f8d1c6f5553af3ae637e087a86988b04faa5db7 /ice40/chip.h | |
parent | 592a627e0c99ddf2cf06c286813a2d08962d8cd9 (diff) | |
download | nextpnr-a139654980b2d2560667b12c886de7518ec97c40.tar.gz nextpnr-a139654980b2d2560667b12c886de7518ec97c40.tar.bz2 nextpnr-a139654980b2d2560667b12c886de7518ec97c40.zip |
Add IdString API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/chip.h')
-rw-r--r-- | ice40/chip.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ice40/chip.h b/ice40/chip.h index 96416c04..73e8d33b 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -217,7 +217,8 @@ NEXTPNR_NAMESPACE_END namespace std { template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelId> { - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const noexcept + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const + noexcept { return bel.index; } @@ -225,7 +226,8 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelId> template <> struct hash<NEXTPNR_NAMESPACE_PREFIX WireId> { - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const noexcept + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const + noexcept { return wire.index; } @@ -233,7 +235,8 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX WireId> template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PipId> { - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &wire) const noexcept + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &wire) const + noexcept { return wire.index; } |