ecp5: Add full part name to bitstream header

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2019-08-27 14:36:20 +01:00
parent c06d7390b6
commit 9f9920f92b
3 changed files with 23 additions and 0 deletions

View File

@ -158,6 +158,26 @@ std::string Arch::getChipName() const
}
}
std::string Arch::getFullChipName() const
{
std::string name = getChipName();
name += "-";
switch (args.speed) {
case ArchArgs::SPEED_6:
name += "6";
break;
case ArchArgs::SPEED_7:
name += "7";
break;
case ArchArgs::SPEED_8:
case ArchArgs::SPEED_8_5G:
name += "8";
break;
}
name += args.package;
return name;
}
// -----------------------------------------------------------------------
IdString Arch::archArgsToId(ArchArgs args) const

View File

@ -491,6 +491,7 @@ struct Arch : BaseCtx
Arch(ArchArgs args);
std::string getChipName() const;
std::string getFullChipName() const;
IdString archId() const { return id("ecp5"); }
ArchArgs archArgs() const { return args; }

View File

@ -600,6 +600,8 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
}
}
cc.metadata.push_back("Part: " + ctx->getFullChipName());
// Clear out DCU tieoffs in base config if DCU used
for (auto &cell : ctx->cells) {
CellInfo *ci = cell.second.get();