1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-02-08 17:31:36 +00:00

Merge pull request #473 from YosysHQ/dave/lpf-param-check

ecp5: Add a warning for unknown LPF IOBUF attrs
This commit is contained in:
David Shah
2020-07-13 21:11:16 +01:00
committed by GitHub

View File

@@ -31,6 +31,11 @@ static const std::unordered_set<std::string> sysconfig_keys = {
"COMPRESS_CONFIG", "CONFIG_MODE", "INBUF",
};
static const std::unordered_set<std::string> iobuf_keys = {
"IO_TYPE", "BANK", "BANK_VCC", "VREF", "PULLMODE", "DRIVE", "SLEWRATE",
"CLAMP", "OPENDRAIN", "DIFFRESISTOR", "DIFFDRIVE", "HYSTERESIS", "TERMINATION",
};
bool Arch::applyLPF(std::string filename, std::istream &in)
{
auto isempty = [](const std::string &str) {
@@ -145,6 +150,9 @@ bool Arch::applyLPF(std::string filename, std::istream &in)
"expected syntax 'IOBUF PORT <port name> <attr>=<value>...' (on line %d)\n",
lineno);
std::string key = setting.substr(0, eqpos), value = setting.substr(eqpos + 1);
if (!iobuf_keys.count(key))
log_warning("IOBUF '%s' attribute '%s' is not recognised (on line %d)\n",
cell.c_str(), key.c_str(), lineno);
fnd_cell->second->attrs[id(key)] = value;
}
}