aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-06-26 22:40:19 +0100
committerGitHub <noreply@github.com>2019-06-26 22:40:19 +0100
commite78ed1142160b62b870f0722f52f77dd8b27d903 (patch)
treef1ddda4ef76d4cc613f591c3dfb95a78669f1ee0
parent76ff7919132a58971b197a40e7fba119f0b021f5 (diff)
parenteb2c50b135eed62b6a6a7f5a50202310ae60ed55 (diff)
downloadnextpnr-e78ed1142160b62b870f0722f52f77dd8b27d903.tar.gz
nextpnr-e78ed1142160b62b870f0722f52f77dd8b27d903.tar.bz2
nextpnr-e78ed1142160b62b870f0722f52f77dd8b27d903.zip
Merge pull request #283 from tux3/warn_pcf_trailing
ice40: Warn that trailing PCF settings are ignored
-rw-r--r--ice40/pcf.cc5
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));