aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaik Merten <maikmerten@googlemail.com>2022-03-05 17:33:14 +0100
committerMaik Merten <maikmerten@googlemail.com>2022-03-05 17:33:14 +0100
commit5b5c7ce5999355f504740181b06e61a05bec4058 (patch)
tree38366f3552d3bbc0666220342a71ff88a4f8be7c
parent8fa85d5ee3dc5e4db24fa2694b09f30d07b6f21e (diff)
downloadicestorm-5b5c7ce5999355f504740181b06e61a05bec4058.tar.gz
icestorm-5b5c7ce5999355f504740181b06e61a05bec4058.tar.bz2
icestorm-5b5c7ce5999355f504740181b06e61a05bec4058.zip
icetime PCF parsing: handle -pullup and -pullup_resistor in set_io constraints
-rw-r--r--icetime/icetime.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/icetime/icetime.cc b/icetime/icetime.cc
index d730fc6..e872cbd 100644
--- a/icetime/icetime.cc
+++ b/icetime/icetime.cc
@@ -221,10 +221,20 @@ void read_pcf(const char *filename)
if (tok == nullptr || strcmp(tok, "set_io"))
continue;
+ bool skip_next = false;
std::vector<std::string> args;
while ((tok = strtok(nullptr, " \t\r\n")) != nullptr) {
+ if(skip_next) {
+ skip_next = false;
+ continue;
+ }
if (!strcmp(tok, "--warn-no-port"))
continue;
+ if (!strcmp(tok, "-pullup") || !strcmp(tok, "-pullup_resistor")) {
+ skip_next = true; // skip argument
+ continue;
+ }
+
args.push_back(tok);
}