diff options
Diffstat (limited to 'ice40')
| -rw-r--r-- | ice40/chip.h | 13 | ||||
| -rw-r--r-- | ice40/main.cc | 6 |
2 files changed, 17 insertions, 2 deletions
diff --git a/ice40/chip.h b/ice40/chip.h index d107b6aa..05ef2754 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -173,12 +173,23 @@ struct BelIterator { int cursor; - void operator++() { cursor++; } + BelIterator operator++() { cursor++; return *this; } + BelIterator operator++(int) { + BelIterator prior(*this); + cursor++; + return prior; + } + bool operator!=(const BelIterator &other) const { return cursor != other.cursor; } + bool operator==(const BelIterator &other) const + { + return cursor == other.cursor; + } + BelId operator*() const { BelId ret; diff --git a/ice40/main.cc b/ice40/main.cc index c65013eb..68089ffb 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -26,6 +26,8 @@ #include "mainwindow.h" #include "pybindings.h" #include "version.h" +#include "log.h" +#include "place.h" void svg_dump_el(const GraphicElement &el) { @@ -53,7 +55,7 @@ int main(int argc, char *argv[]) int rc = 0; std::string str; - log_files.push_back(stderr); + log_files.push_back(stdout); po::options_description options("Allowed options"); options.add_options()("help,h", "show help"); @@ -242,6 +244,7 @@ int main(int argc, char *argv[]) std::istream *f = new std::ifstream(filename); parse_json_file(f, filename, &design); + place_design(&design); } if (vm.count("run")) { @@ -251,6 +254,7 @@ int main(int argc, char *argv[]) execute_python_file(filename.c_str()); } + if (vm.count("gui")) { QApplication a(argc, argv); MainWindow w; |
