aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
Diffstat (limited to 'ice40')
-rw-r--r--ice40/cells.cc3
-rw-r--r--ice40/chip.h11
2 files changed, 13 insertions, 1 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc
index b11a2a77..fb264051 100644
--- a/ice40/cells.cc
+++ b/ice40/cells.cc
@@ -147,7 +147,8 @@ void dff_to_lc(CellInfo *dff, CellInfo *lc, bool pass_thru_lut)
if (citer != config.end()) {
if ((config.end() - citer) >= 2) {
- assert(*(citer++) == 'S');
+ char c = *(citer++);
+ assert(c == 'S');
lc->params["ASYNC_SR"] = "0";
} else {
lc->params["ASYNC_SR"] = "1";
diff --git a/ice40/chip.h b/ice40/chip.h
index 9d647756..d3eb7c70 100644
--- a/ice40/chip.h
+++ b/ice40/chip.h
@@ -743,4 +743,15 @@ struct Chip
NEXTPNR_NAMESPACE_END
+namespace std {
+template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelType>
+{
+ std::size_t operator()(NEXTPNR_NAMESPACE_PREFIX BelType bt) const
+ noexcept
+ {
+ return std::hash<int>()(int(bt));
+ }
+};
+} // namespace std
+
#endif