diff options
author | David Shah <dave@ds0.me> | 2020-04-07 09:44:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-07 09:44:22 +0100 |
commit | 571ad7d604ac430b58bae61eeada85e75bc11a66 (patch) | |
tree | 45cccc093213b7662d77314a3777544be80d7aed | |
parent | 70ccab47656af40ac60fb91559b73426b589fd7b (diff) | |
parent | ec1eea9990152608c32614655ff315222fa11201 (diff) | |
download | nextpnr-571ad7d604ac430b58bae61eeada85e75bc11a66.tar.gz nextpnr-571ad7d604ac430b58bae61eeada85e75bc11a66.tar.bz2 nextpnr-571ad7d604ac430b58bae61eeada85e75bc11a66.zip |
Merge pull request #421 from garytwong/fix-lpf-locate-assertion-failure
Fix assertion failure on invalid LOCATE input.
-rw-r--r-- | ecp5/lpf.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ecp5/lpf.cc b/ecp5/lpf.cc index ceb1d7ae..e626cc54 100644 --- a/ecp5/lpf.cc +++ b/ecp5/lpf.cc @@ -101,6 +101,8 @@ bool Arch::applyLPF(std::string filename, std::istream &in) if (words.at(3) != "SITE") log_error("expected 'SITE' after 'LOCATE COMP %s' (on line %d)\n", cell.c_str(), lineno); auto fnd_cell = cells.find(id(cell)); + if (words.size() > 5) + log_error("unexpected input following LOCATE clause (on line %d)\n", lineno); if (fnd_cell != cells.end()) { fnd_cell->second->attrs[id("LOC")] = strip_quotes(words.at(4)); } |