diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-06-20 11:09:49 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-06-20 11:09:49 +0200 |
commit | a06d2aeb4da0c51fb50d8283367836e6dbf91b4d (patch) | |
tree | 3354f63690cb2804b1d8bcddc5d7d518b453d11b /common | |
parent | 1b3432b701152bb3454caa020ee21fe5491995ac (diff) | |
download | nextpnr-a06d2aeb4da0c51fb50d8283367836e6dbf91b4d.tar.gz nextpnr-a06d2aeb4da0c51fb50d8283367836e6dbf91b4d.tar.bz2 nextpnr-a06d2aeb4da0c51fb50d8283367836e6dbf91b4d.zip |
Add PlaceStrength
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index 6e4b87bd..c59b401e 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -162,7 +162,7 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX IdString> std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX IdString &obj) const noexcept { - return obj.index; + return std::hash<int>()(obj.index); } }; } // namespace std @@ -194,10 +194,21 @@ NEXTPNR_NAMESPACE_BEGIN struct CellInfo; +enum PlaceStrength +{ + STRENGTH_NONE = 0, + STRENGTH_WEAK = 1, + STRENGTH_STRONG = 2, + STRENGTH_FIXED = 3, + STRENGTH_LOCKED = 4, + STRENGTH_USER = 5 +}; + struct PortRef { CellInfo *cell = nullptr; IdString port; + delay_t budget; }; struct NetInfo @@ -209,6 +220,8 @@ struct NetInfo // wire -> uphill_pip std::unordered_map<WireId, PipId> wires; + + std::unordered_map<PipId, PlaceStrength> pips; }; enum PortType @@ -232,6 +245,8 @@ struct CellInfo std::unordered_map<IdString, std::string> attrs, params; BelId bel; + PlaceStrength belStrength = STRENGTH_NONE; + // cell_port -> bel_pin std::unordered_map<IdString, IdString> pins; }; |