Fix NEXTPNR_NAMESPACE

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-06-12 14:31:26 +02:00
parent d62e341d5a
commit 426fb75bb5
7 changed files with 30 additions and 6 deletions

View File

@ -19,7 +19,11 @@
#include "arch_place.h"
NEXTPNR_NAMESPACE_BEGIN
bool isValidBelForCell(Design *design, CellInfo *cell, BelId bel)
{
return true;
}
NEXTPNR_NAMESPACE_END

View File

@ -22,6 +22,8 @@
#include "nextpnr.h"
NEXTPNR_NAMESPACE_BEGIN
// Architecure-specific placement functions
// Whether or not a given cell can be placed at a given Bel
@ -29,4 +31,6 @@
// such as conflicting set/reset signals, etc
bool isValidBelForCell(Design *design, CellInfo *cell, BelId bel);
NEXTPNR_NAMESPACE_END
#endif

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -22,6 +22,10 @@
#include "nextpnr.h"
NEXTPNR_NAMESPACE_BEGIN
void pack_design(Design *design);
NEXTPNR_NAMESPACE_END
#endif // ROUTE_H