aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-12 14:31:26 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-12 14:31:26 +0200
commit426fb75bb5c48d32d36bfbeaa89ec2c5eb8860c0 (patch)
tree24d1bc7ff70151c4a95cf947e2be337e4e3c0332 /ice40
parentd62e341d5a3183d6fdb7168afb978068a396e9a4 (diff)
downloadnextpnr-426fb75bb5c48d32d36bfbeaa89ec2c5eb8860c0.tar.gz
nextpnr-426fb75bb5c48d32d36bfbeaa89ec2c5eb8860c0.tar.bz2
nextpnr-426fb75bb5c48d32d36bfbeaa89ec2c5eb8860c0.zip
Fix NEXTPNR_NAMESPACE
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40')
-rw-r--r--ice40/arch_place.cc4
-rw-r--r--ice40/arch_place.h4
-rw-r--r--ice40/chip.h12
-rw-r--r--ice40/pack.cc4
-rw-r--r--ice40/pack.h4
5 files changed, 22 insertions, 6 deletions
diff --git a/ice40/arch_place.cc b/ice40/arch_place.cc
index 2367d981..dbc8036c 100644
--- a/ice40/arch_place.cc
+++ b/ice40/arch_place.cc
@@ -19,6 +19,8 @@
#include "arch_place.h"
+NEXTPNR_NAMESPACE_BEGIN
+
static bool logicCellsCompatible(const std::vector<const CellInfo *> &cells)
{
bool dffs_exist = false, dffs_neg = false;
@@ -87,3 +89,5 @@ bool isValidBelForCell(Design *design, CellInfo *cell, BelId bel)
return true;
}
}
+
+NEXTPNR_NAMESPACE_END
diff --git a/ice40/arch_place.h b/ice40/arch_place.h
index 8f8ce806..a505f4db 100644
--- a/ice40/arch_place.h
+++ b/ice40/arch_place.h
@@ -23,9 +23,13 @@
#include "nextpnr.h"
// Architecure-specific placement functions
+NEXTPNR_NAMESPACE_BEGIN
+
// Whether or not a given cell can be placed at a given Bel
// This is not intended for Bel type checks, but finer-grained constraints
// such as conflicting set/reset signals, etc
bool isValidBelForCell(Design *design, CellInfo *cell, BelId bel);
+NEXTPNR_NAMESPACE_END
+
#endif
diff --git a/ice40/chip.h b/ice40/chip.h
index e48a4973..96416c04 100644
--- a/ice40/chip.h
+++ b/ice40/chip.h
@@ -215,25 +215,25 @@ struct BelPin
NEXTPNR_NAMESPACE_END
namespace std {
-template <> struct hash<NEXTPNR_NAMESPACE::BelId>
+template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelId>
{
- std::size_t operator()(const NEXTPNR_NAMESPACE::BelId &bel) const noexcept
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const noexcept
{
return bel.index;
}
};
-template <> struct hash<NEXTPNR_NAMESPACE::WireId>
+template <> struct hash<NEXTPNR_NAMESPACE_PREFIX WireId>
{
- std::size_t operator()(const NEXTPNR_NAMESPACE::WireId &wire) const noexcept
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const noexcept
{
return wire.index;
}
};
-template <> struct hash<NEXTPNR_NAMESPACE::PipId>
+template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PipId>
{
- std::size_t operator()(const NEXTPNR_NAMESPACE::PipId &wire) const noexcept
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &wire) const noexcept
{
return wire.index;
}
diff --git a/ice40/pack.cc b/ice40/pack.cc
index ff421c17..a6e17378 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -25,6 +25,8 @@
#include <unordered_set>
+NEXTPNR_NAMESPACE_BEGIN
+
// Pack LUTs and LUT-FF pairs
static void pack_lut_lutffs(Design *design)
{
@@ -120,3 +122,5 @@ void pack_design(Design *design)
pack_lut_lutffs(design);
pack_nonlut_ffs(design);
}
+
+NEXTPNR_NAMESPACE_END
diff --git a/ice40/pack.h b/ice40/pack.h
index 87a390ff..4a92a7ab 100644
--- a/ice40/pack.h
+++ b/ice40/pack.h
@@ -22,6 +22,10 @@
#include "nextpnr.h"
+NEXTPNR_NAMESPACE_BEGIN
+
void pack_design(Design *design);
+NEXTPNR_NAMESPACE_END
+
#endif // ROUTE_H