aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/archdefs.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-08-08 17:01:18 +0200
committerClifford Wolf <clifford@clifford.at>2018-08-08 17:01:18 +0200
commite03ae50e21abdcb05a887c467b97968b1cbdb460 (patch)
treed169d5f0373f74185f0e2f89970b70b545c6ca3d /ice40/archdefs.h
parent8553573d2485ac2ec60d1c49949c254e02d35490 (diff)
downloadnextpnr-e03ae50e21abdcb05a887c467b97968b1cbdb460.tar.gz
nextpnr-e03ae50e21abdcb05a887c467b97968b1cbdb460.tar.bz2
nextpnr-e03ae50e21abdcb05a887c467b97968b1cbdb460.zip
Get rid of PortPin and BelType (ice40, generic, docs)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/archdefs.h')
-rw-r--r--ice40/archdefs.h41
1 files changed, 8 insertions, 33 deletions
diff --git a/ice40/archdefs.h b/ice40/archdefs.h
index 7125ba16..360617fd 100644
--- a/ice40/archdefs.h
+++ b/ice40/archdefs.h
@@ -48,34 +48,17 @@ struct DelayInfo
// -----------------------------------------------------------------------
-enum BelType : int32_t
+enum ConstIds
{
- TYPE_NONE,
- TYPE_ICESTORM_LC,
- TYPE_ICESTORM_RAM,
- TYPE_SB_IO,
- TYPE_SB_GB,
- TYPE_ICESTORM_PLL,
- TYPE_SB_WARMBOOT,
- TYPE_ICESTORM_DSP,
- TYPE_ICESTORM_HFOSC,
- TYPE_ICESTORM_LFOSC,
- TYPE_SB_I2C,
- TYPE_SB_SPI,
- TYPE_IO_I3C,
- TYPE_SB_LEDDA_IP,
- TYPE_SB_RGBA_DRV,
- TYPE_ICESTORM_SPRAM,
+ ID_NONE
+#define X(t) , ID_##t
+#include "constids.inc"
+#undef X
};
-enum PortPin : int32_t
-{
- PIN_NONE,
-#define X(t) PIN_##t,
-#include "portpins.inc"
+#define X(t) static constexpr auto id_##t = IdString(ID_##t);
+#include "constids.inc"
#undef X
- PIN_MAXIDX
-};
struct BelId
{
@@ -151,7 +134,7 @@ struct NetInfo;
struct ArchCellInfo
{
- BelType belType = TYPE_NONE;
+ IdString belType;
union
{
struct
@@ -186,14 +169,6 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PipId>
std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &pip) const noexcept { return hash<int>()(pip.index); }
};
-template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelType> : hash<int>
-{
-};
-
-template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PortPin> : hash<int>
-{
-};
-
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX GroupId>
{
std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX GroupId &group) const noexcept