mirror of https://github.com/YosysHQ/icestorm.git
Merge pull request #291 from maikmerten/master
icetime: Parse PCF files with -pullup and -pullup_resistor in set_io directives
This commit is contained in:
commit
eaea10ba4c
|
|
@ -222,10 +222,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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue