From 467d26d9e698d49c7fd723005b26e454ddcc8998 Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 13 Jul 2020 17:30:24 +0100 Subject: ecp5: Add a warning for unknown LPF IOBUF attrs Signed-off-by: David Shah --- ecp5/lpf.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ecp5/lpf.cc b/ecp5/lpf.cc index 18c81237..8b972380 100644 --- a/ecp5/lpf.cc +++ b/ecp5/lpf.cc @@ -31,6 +31,11 @@ static const std::unordered_set sysconfig_keys = { "COMPRESS_CONFIG", "CONFIG_MODE", "INBUF", }; +static const std::unordered_set 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 =...' (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; } } -- cgit v1.2.3