aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/bitstream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5/bitstream.cc')
-rw-r--r--ecp5/bitstream.cc24
1 files changed, 18 insertions, 6 deletions
diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc
index 1bdb4188..54d0c0a4 100644
--- a/ecp5/bitstream.cc
+++ b/ecp5/bitstream.cc
@@ -438,8 +438,8 @@ std::vector<std::string> get_pll_tiles(Context *ctx, BelId bel)
void fix_tile_names(Context *ctx, ChipConfig &cc)
{
// Remove the V prefix/suffix on certain tiles if device is a SERDES variant
- if (ctx->args.type == ArchArgs::LFE5U_25F || ctx->args.type == ArchArgs::LFE5U_45F ||
- ctx->args.type == ArchArgs::LFE5U_85F) {
+ if (ctx->args.type == ArchArgs::LFE5U_12F || ctx->args.type == ArchArgs::LFE5U_25F ||
+ ctx->args.type == ArchArgs::LFE5U_45F || ctx->args.type == ArchArgs::LFE5U_85F) {
std::map<std::string, std::string> tiletype_xform;
for (const auto &tile : cc.tiles) {
std::string newname = tile.first;
@@ -580,6 +580,10 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
config_file >> cc;
} else {
switch (ctx->args.type) {
+ case ArchArgs::LFE5U_12F:
+ BaseConfigs::config_empty_lfe5u_25f(cc);
+ cc.chip_name = "LFE5U-12F";
+ break;
case ArchArgs::LFE5U_25F:
BaseConfigs::config_empty_lfe5u_25f(cc);
break;
@@ -927,6 +931,9 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
iovoltage_to_str(vccio).c_str(), ci->name.c_str(ctx));
}
}
+ if (ci->attrs.count(ctx->id("OPENDRAIN")))
+ cc.tiles[pio_tile].add_enum(pio + ".OPENDRAIN",
+ str_or_default(ci->attrs, ctx->id("OPENDRAIN"), "OFF"));
std::string datamux_oddr = str_or_default(ci->params, ctx->id("DATAMUX_ODDR"), "PADDO");
if (datamux_oddr != "PADDO")
cc.tiles[pic_tile].add_enum(pio + ".DATAMUX_ODDR", datamux_oddr);
@@ -1249,9 +1256,14 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
tg.config.add_enum("FEEDBK_PATH", str_or_default(ci->params, ctx->id("FEEDBK_PATH"), "CLKOP"));
tg.config.add_enum("CLKOP_TRIM_POL", str_or_default(ci->params, ctx->id("CLKOP_TRIM_POL"), "RISING"));
- tg.config.add_enum("CLKOP_TRIM_DELAY", str_or_default(ci->params, ctx->id("CLKOP_TRIM_DELAY"), "0"));
+
+ tg.config.add_enum("CLKOP_TRIM_DELAY",
+ intstr_or_default(ci->params, ctx->id("CLKOP_TRIM_DELAY"), "0"));
+
tg.config.add_enum("CLKOS_TRIM_POL", str_or_default(ci->params, ctx->id("CLKOS_TRIM_POL"), "RISING"));
- tg.config.add_enum("CLKOS_TRIM_DELAY", str_or_default(ci->params, ctx->id("CLKOS_TRIM_DELAY"), "0"));
+
+ tg.config.add_enum("CLKOS_TRIM_DELAY",
+ intstr_or_default(ci->params, ctx->id("CLKOS_TRIM_DELAY"), "0"));
tg.config.add_enum("OUTDIVIDER_MUXA", str_or_default(ci->params, ctx->id("OUTDIVIDER_MUXA"),
get_net_or_empty(ci, id_CLKOP) ? "DIVA" : "REFCLK"));
@@ -1429,8 +1441,8 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
Loc loc = ctx->getBelLocation(ci->bel);
bool u = loc.y<15, r = loc.x> 15;
std::string tiletype = fmt_str("DDRDLL_" << (u ? 'U' : 'L') << (r ? 'R' : 'L'));
- if ((ctx->args.type == ArchArgs::LFE5U_25F || ctx->args.type == ArchArgs::LFE5UM_25F ||
- ctx->args.type == ArchArgs::LFE5UM5G_25F) &&
+ if ((ctx->args.type == ArchArgs::LFE5U_12F || ctx->args.type == ArchArgs::LFE5U_25F ||
+ ctx->args.type == ArchArgs::LFE5UM_25F || ctx->args.type == ArchArgs::LFE5UM5G_25F) &&
u)
tiletype += "A";
std::string tile = ctx->getTileByType(tiletype);