icetime PCF parsing: handle -pullup and -pullup_resistor in set_io constraints

This commit is contained in:
Maik Merten 2022-03-05 17:33:14 +01:00
parent 8fa85d5ee3
commit 5b5c7ce599
1 changed files with 10 additions and 0 deletions

View File

@ -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);
}