From 5b5c7ce5999355f504740181b06e61a05bec4058 Mon Sep 17 00:00:00 2001 From: Maik Merten Date: Sat, 5 Mar 2022 17:33:14 +0100 Subject: icetime PCF parsing: handle -pullup and -pullup_resistor in set_io constraints --- icetime/icetime.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 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); } -- cgit v1.2.3