Add stub cluster API impl for remaining arches

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2021-05-06 12:30:58 +01:00
parent c6fa1a179a
commit 0d6be6f474
7 changed files with 34 additions and 2 deletions

View File

@ -23,6 +23,8 @@
#include "idstring.h"
#include "nextpnr_namespaces.h"
#include <vector>
NEXTPNR_NAMESPACE_BEGIN
struct CellInfo;

View File

@ -835,6 +835,19 @@ struct Arch : ArchAPI<ArchRanges>
return get_site_status(tile_status, bel_data).checkSiteRouting(getCtx(), tile_status);
}
// -------------------------------------------------
// TODO
CellInfo *getClusterRootCell(ClusterId cluster) const override { NPNR_ASSERT_FALSE("unimplemented"); }
ArcBounds getClusterBounds(ClusterId cluster) const override { NPNR_ASSERT_FALSE("unimplemented"); }
Loc getClusterOffset(const CellInfo *cell) const override { NPNR_ASSERT_FALSE("unimplemented"); }
bool isClusterStrict(const CellInfo *cell) const override { NPNR_ASSERT_FALSE("unimplemented"); }
bool getClusterPlacement(ClusterId cluster, BelId root_bel,
std::vector<std::pair<CellInfo *, BelId>> &placement) const override
{
NPNR_ASSERT_FALSE("unimplemented");
}
IdString get_bel_tiletype(BelId bel) const { return IdString(loc_info(chip_info, bel).name); }
std::unordered_map<WireId, Loc> sink_locs, source_locs;

View File

@ -98,6 +98,8 @@ struct BelBucketId
bool operator<(const BelBucketId &other) const { return name < other.name; }
};
typedef IdString ClusterId;
struct SiteExpansionLoop;
struct ArchNetInfo

View File

@ -362,6 +362,17 @@ struct Arch : ArchAPI<ArchRanges>
bool isValidBelForCellType(IdString cell_type, BelId bel) const override { return cell_type == getBelType(bel); }
bool isBelLocationValid(BelId bel) const override;
// TODO
CellInfo *getClusterRootCell(ClusterId cluster) const override { NPNR_ASSERT_FALSE("unimplemented"); }
ArcBounds getClusterBounds(ClusterId cluster) const override { NPNR_ASSERT_FALSE("unimplemented"); }
Loc getClusterOffset(const CellInfo *cell) const override { NPNR_ASSERT_FALSE("unimplemented"); }
bool isClusterStrict(const CellInfo *cell) const override { NPNR_ASSERT_FALSE("unimplemented"); }
bool getClusterPlacement(ClusterId cluster, BelId root_bel,
std::vector<std::pair<CellInfo *, BelId>> &placement) const override
{
NPNR_ASSERT_FALSE("unimplemented");
}
static const std::string defaultPlacer;
static const std::vector<std::string> availablePlacers;
static const std::string defaultRouter;

View File

@ -34,6 +34,7 @@ typedef IdStringList PipId;
typedef IdStringList GroupId;
typedef IdStringList DecalId;
typedef IdString BelBucketId;
typedef IdString ClusterId;
struct ArchNetInfo
{

View File

@ -21,6 +21,7 @@
#ifndef GOWIN_ARCHDEFS_H
#define GOWIN_ARCHDEFS_H
#include "base_clusterinfo.h"
#include "idstring.h"
#include "nextpnr_namespaces.h"
@ -56,7 +57,7 @@ struct ArchNetInfo
struct NetInfo;
struct ArchCellInfo
struct ArchCellInfo : BaseClusterInfo
{
// Is the flip-flop of this slice used
bool ff_used;

View File

@ -21,6 +21,7 @@
#ifndef MACHXO2_ARCHDEFS_H
#define MACHXO2_ARCHDEFS_H
#include "base_clusterinfo.h"
#include "idstring.h"
#include "nextpnr_namespaces.h"
@ -104,6 +105,7 @@ struct PipId
typedef IdString GroupId;
typedef IdString DecalId;
typedef IdString BelBucketId;
typedef IdString ClusterId;
struct ArchNetInfo
{
@ -111,7 +113,7 @@ struct ArchNetInfo
struct NetInfo;
struct ArchCellInfo
struct ArchCellInfo : BaseClusterInfo
{
};