diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2022-05-30 10:08:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 10:08:40 +0200 |
commit | eaea10ba4c318ba393d78dcfce92f88ce0286ff4 (patch) | |
tree | ed7017d16fde6c222214a25f7b5c76df993cf5d9 | |
parent | 10ed4136f74beb458c6d014fcc6b53b5d02dd6c5 (diff) | |
parent | c9ad6ca88177c950bc20d043931cd1eae6d707b1 (diff) | |
download | icestorm-eaea10ba4c318ba393d78dcfce92f88ce0286ff4.tar.gz icestorm-eaea10ba4c318ba393d78dcfce92f88ce0286ff4.tar.bz2 icestorm-eaea10ba4c318ba393d78dcfce92f88ce0286ff4.zip |
Merge pull request #291 from maikmerten/master
icetime: Parse PCF files with -pullup and -pullup_resistor in set_io directives
-rw-r--r-- | icetime/icetime.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/icetime/icetime.cc b/icetime/icetime.cc index 049c635..fef65d2 100644 --- a/icetime/icetime.cc +++ b/icetime/icetime.cc @@ -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); } |