Add PlaceStrength

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-06-20 11:09:49 +02:00
parent 1b3432b701
commit a06d2aeb4d

View File

@ -162,7 +162,7 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX IdString>
std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX IdString &obj) const std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX IdString &obj) const
noexcept noexcept
{ {
return obj.index; return std::hash<int>()(obj.index);
} }
}; };
} // namespace std } // namespace std
@ -194,10 +194,21 @@ NEXTPNR_NAMESPACE_BEGIN
struct CellInfo; struct CellInfo;
enum PlaceStrength
{
STRENGTH_NONE = 0,
STRENGTH_WEAK = 1,
STRENGTH_STRONG = 2,
STRENGTH_FIXED = 3,
STRENGTH_LOCKED = 4,
STRENGTH_USER = 5
};
struct PortRef struct PortRef
{ {
CellInfo *cell = nullptr; CellInfo *cell = nullptr;
IdString port; IdString port;
delay_t budget;
}; };
struct NetInfo struct NetInfo
@ -209,6 +220,8 @@ struct NetInfo
// wire -> uphill_pip // wire -> uphill_pip
std::unordered_map<WireId, PipId> wires; std::unordered_map<WireId, PipId> wires;
std::unordered_map<PipId, PlaceStrength> pips;
}; };
enum PortType enum PortType
@ -232,6 +245,8 @@ struct CellInfo
std::unordered_map<IdString, std::string> attrs, params; std::unordered_map<IdString, std::string> attrs, params;
BelId bel; BelId bel;
PlaceStrength belStrength = STRENGTH_NONE;
// cell_port -> bel_pin // cell_port -> bel_pin
std::unordered_map<IdString, IdString> pins; std::unordered_map<IdString, IdString> pins;
}; };