aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYRabbit <rabbit@yrabbit.cyou>2023-01-30 18:59:09 +1000
committerYRabbit <rabbit@yrabbit.cyou>2023-01-30 18:59:09 +1000
commit2829a7d70af7a4cc32173cced2ebd5cb5e46cb93 (patch)
tree01342e7f504ce94de0ee5342fee6b17f6094d2a4
parent6a1212a1e14d19bda114317e9f544b534cbf2841 (diff)
downloadnextpnr-2829a7d70af7a4cc32173cced2ebd5cb5e46cb93.tar.gz
nextpnr-2829a7d70af7a4cc32173cced2ebd5cb5e46cb93.tar.bz2
nextpnr-2829a7d70af7a4cc32173cced2ebd5cb5e46cb93.zip
gowin: Proper use of the C++ mechanisms
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
-rw-r--r--gowin/arch.cc2
-rw-r--r--gowin/arch.h16
2 files changed, 8 insertions, 10 deletions
diff --git a/gowin/arch.cc b/gowin/arch.cc
index 5ef83fbb..1574eee3 100644
--- a/gowin/arch.cc
+++ b/gowin/arch.cc
@@ -2108,7 +2108,7 @@ bool Arch::is_GCLKT_iob(const CellInfo *cell)
return false;
}
-void Arch::bind_pll_to_bel(CellInfo *ci, int loc)
+void Arch::bind_pll_to_bel(CellInfo *ci, PLL loc)
{
BelId bel;
switch (ci->type.hash()) {
diff --git a/gowin/arch.h b/gowin/arch.h
index 6f76d577..822cdfc1 100644
--- a/gowin/arch.h
+++ b/gowin/arch.h
@@ -283,6 +283,12 @@ struct ArchRanges : BaseArchRanges
using GroupGroupsRangeT = const std::vector<GroupId> &;
};
+enum class PLL // fixed PLL locations
+{
+ left,
+ right
+};
+
struct Arch : BaseArch<ArchRanges>
{
std::string family;
@@ -482,7 +488,7 @@ struct Arch : BaseArch<ArchRanges>
void add_rpll_ports(DatabasePOD const *db, BelsPOD const *bel, IdString belname, int row, int col);
void fix_pll_nets(Context *ctx);
bool is_GCLKT_iob(const CellInfo *cell);
- void bind_pll_to_bel(CellInfo *ci, int loc);
+ void bind_pll_to_bel(CellInfo *ci, PLL loc);
GowinGlobalRouter globals_router;
void mark_gowin_globals(Context *ctx);
@@ -531,14 +537,6 @@ enum
};
}
-namespace PLL { // fixed PLL locations
-enum
-{
- left = 0,
- right = 1
-};
-}
-
NEXTPNR_NAMESPACE_END
#endif /* GOWIN_ARCH_H */