aboutsummaryrefslogtreecommitdiffstats
path: root/nexus/arch.h
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-10-22 16:02:58 +0100
committerDavid Shah <dave@ds0.me>2020-11-30 08:45:28 +0000
commitf8dca82a713d2d90d29c70357c5c276bed5d7862 (patch)
tree31299885e38b431f9a0d83999003742bd96a69bf /nexus/arch.h
parentf749038959b589467ce0605cf60f68f18d7573cd (diff)
downloadnextpnr-f8dca82a713d2d90d29c70357c5c276bed5d7862.tar.gz
nextpnr-f8dca82a713d2d90d29c70357c5c276bed5d7862.tar.bz2
nextpnr-f8dca82a713d2d90d29c70357c5c276bed5d7862.zip
nexus: Basic support for differential IO types
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'nexus/arch.h')
-rw-r--r--nexus/arch.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/nexus/arch.h b/nexus/arch.h
index 5924732b..85278272 100644
--- a/nexus/arch.h
+++ b/nexus/arch.h
@@ -813,6 +813,30 @@ enum CellPinMux
PINMUX_INV = 3,
};
+// This represents the various kinds of IO pins
+enum IOStyle
+{
+ IOBANK_WR = 0x1, // needs wide range IO bank
+ IOBANK_HP = 0x2, // needs high perf IO bank
+
+ IOMODE_REF = 0x10, // IO is referenced
+ IOMODE_DIFF = 0x20, // IO is true differential
+ IOMODE_PSEUDO_DIFF = 0x40, // IO is pseduo differential
+
+ IOSTYLE_SE_WR = 0x01, // single ended, wide range
+ IOSTYLE_SE_HP = 0x02, // single ended, high perf
+ IOSTYLE_PD_WR = 0x41, // pseudo diff, wide range
+
+ IOSTYLE_REF_HP = 0x12, // referenced high perf
+ IOSTYLE_DIFF_HP = 0x22, // differential high perf
+};
+
+struct IOTypeData
+{
+ IOStyle style;
+ int vcco; // required Vcco in 10mV
+};
+
// -----------------------------------------------------------------------
const int bba_version =
@@ -1456,6 +1480,13 @@ struct Arch : BaseCtx
std::string get_pad_functions(const PadInfoPOD *pad) const;
// -------------------------------------------------
+ // Data about different IO standard, mostly used by bitgen
+ static const std::unordered_map<std::string, IOTypeData> io_types;
+ int get_io_type_vcc(const std::string &io_type) const;
+ bool is_io_type_diff(const std::string &io_type) const;
+ bool is_io_type_ref(const std::string &io_type) const;
+
+ // -------------------------------------------------
// List of IO constraints, used by PDC parser
std::unordered_map<IdString, std::unordered_map<IdString, Property>> io_attr;