diff options
author | tux3 <barrdetwix@gmail.com> | 2019-05-31 10:44:05 +0200 |
---|---|---|
committer | tux3 <barrdetwix@gmail.com> | 2019-05-31 10:44:05 +0200 |
commit | eb2c50b135eed62b6a6a7f5a50202310ae60ed55 (patch) | |
tree | 460ee1bf98fe161b9ba32d0bf9f3a9ba560381c7 | |
parent | 150004e393d325aca75577360bdd7b4aba341070 (diff) | |
download | nextpnr-eb2c50b135eed62b6a6a7f5a50202310ae60ed55.tar.gz nextpnr-eb2c50b135eed62b6a6a7f5a50202310ae60ed55.tar.bz2 nextpnr-eb2c50b135eed62b6a6a7f5a50202310ae60ed55.zip |
ice40: Warn that trailing PCF settings are ignored
-rw-r--r-- | ice40/pcf.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ice40/pcf.cc b/ice40/pcf.cc index a8273dd6..15132800 100644 --- a/ice40/pcf.cc +++ b/ice40/pcf.cc @@ -77,8 +77,11 @@ bool apply_pcf(Context *ctx, std::string filename, std::istream &in) } args_end++; } - if (args_end >= words.size() - 1) + if (args_end > words.size() - 2) log_error("expected PCF syntax 'set_io cell pin' (on line %d)\n", lineno); + else if (args_end < words.size() - 2 && !nowarn) + log_warning("Ignoring trailing PCF settings (on line %d)\n", lineno); + std::string cell = words.at(args_end); std::string pin = words.at(args_end + 1); auto fnd_cell = ctx->cells.find(ctx->id(cell)); |