From bfc47e9cd4512a503266c3f9cbe8841ed6136580 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 10 Jul 2018 13:58:20 +0200 Subject: Added ICE40_HX1K_ONLY check in gui and main --- ice40/main.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index 87a32ded..ff823cbe 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -98,12 +98,16 @@ int main(int argc, char *argv[]) options.add_options()("seed", po::value(), "seed value for random number generator"); options.add_options()("version,V", "show version"); options.add_options()("tmfuzz", "run path delay estimate fuzzer"); +#ifdef ICE40_HX1K_ONLY + options.add_options()("hx1k", "set device type to iCE40HX1K"); +#else options.add_options()("lp384", "set device type to iCE40LP384"); options.add_options()("lp1k", "set device type to iCE40LP1K"); options.add_options()("lp8k", "set device type to iCE40LP8K"); options.add_options()("hx1k", "set device type to iCE40HX1K"); options.add_options()("hx8k", "set device type to iCE40HX8K"); options.add_options()("up5k", "set device type to iCE40UP5K"); +#endif options.add_options()("freq", po::value(), "set target frequency for design in MHz"); options.add_options()("no-tmdriv", "disable timing-driven placement"); options.add_options()("package", po::value(), "set device package"); -- cgit v1.2.3 From 7df67c91b38433e8a1002f8e9f53926aafaa4d1b Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 11 Jul 2018 18:04:09 +0200 Subject: Add ctx->route() API Signed-off-by: Clifford Wolf --- ice40/main.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index ff823cbe..f586a079 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -43,7 +43,6 @@ #include "pcf.h" #include "place_legaliser.h" #include "place_sa.h" -#include "route.h" #include "timing.h" #include "version.h" @@ -339,7 +338,7 @@ int main(int argc, char *argv[]) for (int i = 0; i < int(src_wires.size()) && i < int(dst_wires.size()); i++) { delay_t actual_delay; WireId src = src_wires[i], dst = dst_wires[i]; - if (!get_actual_route_delay(&ctx, src, dst, actual_delay)) + if (!ctx.getActualRouteDelay(src, dst, actual_delay)) continue; printf("%s %s %.3f %.3f %d %d %d %d %d %d\n", ctx.getWireName(src).c_str(&ctx), ctx.getWireName(dst).c_str(&ctx), ctx.getDelayNS(actual_delay), @@ -376,7 +375,7 @@ int main(int argc, char *argv[]) if (!place_design_sa(&ctx) && !ctx.force) log_error("Placing design failed.\n"); ctx.check(); - if (!route_design(&ctx) && !ctx.force) + if (!ctx.route() && !ctx.force) log_error("Routing design failed.\n"); } } -- cgit v1.2.3 From 7daa8524c8ab8c9ff5400d5074b80573b0d39a14 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 11 Jul 2018 18:15:08 +0200 Subject: Add ctx->place() API Signed-off-by: Clifford Wolf --- ice40/main.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index f586a079..2427ea6c 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -42,7 +42,6 @@ #include "pack.h" #include "pcf.h" #include "place_legaliser.h" -#include "place_sa.h" #include "timing.h" #include "version.h" @@ -372,7 +371,7 @@ int main(int argc, char *argv[]) if (vm.count("no-tmdriv")) ctx.timing_driven = false; if (!vm.count("pack-only")) { - if (!place_design_sa(&ctx) && !ctx.force) + if (!ctx.place() && !ctx.force) log_error("Placing design failed.\n"); ctx.check(); if (!ctx.route() && !ctx.force) -- cgit v1.2.3 From b8a42ff53b1fbb6e03d169d14e58180a750f4cad Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 12 Jul 2018 22:04:13 +0200 Subject: Updates from clang-format Signed-off-by: Clifford Wolf --- ice40/main.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index 2427ea6c..5fa58921 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -128,18 +128,16 @@ int main(int argc, char *argv[]) if (vm.count("help") || argc == 1) { help: - std::cout << boost::filesystem::basename(argv[0]) - << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; std::cout << "\n"; std::cout << options << "\n"; return argc != 1; } if (vm.count("version")) { - std::cout << boost::filesystem::basename(argv[0]) - << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; return 1; } -- cgit v1.2.3 From 499951cb65ff31fe15aa360a6b44371b13815d66 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Thu, 12 Jul 2018 21:30:36 +0100 Subject: Remove legacy graphics API For now we do not optimize the OpenGL renderer against the new decal API, but this can be done in the future. --- ice40/main.cc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index 5fa58921..32864703 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -47,20 +47,22 @@ USING_NEXTPNR_NAMESPACE -void svg_dump_el(const GraphicElement &el) +void svg_dump_decal(const Context &ctx, const DecalXY &decal) { - float scale = 10.0, offset = 10.0; - std::string style = "stroke=\"black\" stroke-width=\"0.1\" fill=\"none\""; - - if (el.type == GraphicElement::G_BOX) { - std::cout << "\n"; - } + const float scale = 10.0, offset = 10.0; + const std::string style = "stroke=\"black\" stroke-width=\"0.1\" fill=\"none\""; + + for (auto &el : ctx.getDecalGraphics(decal.decal)) { + if (el.type == GraphicElement::G_BOX) { + std::cout << "\n"; + } - if (el.type == GraphicElement::G_LINE) { - std::cout << "\n"; + if (el.type == GraphicElement::G_LINE) { + std::cout << "\n"; + } } } @@ -291,12 +293,10 @@ int main(int argc, char *argv[]) "xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n"; for (auto bel : ctx.getBels()) { std::cout << "\n"; - for (auto &el : ctx.getBelGraphics(bel)) - svg_dump_el(el); + svg_dump_decal(ctx, ctx.getBelDecal(bel)); } std::cout << "\n"; - for (auto &el : ctx.getFrameGraphics()) - svg_dump_el(el); + svg_dump_decal(ctx, ctx.getFrameDecal()); std::cout << "\n"; } -- cgit v1.2.3 From 8e54ac15421be441ece2a85ff0d61e850a99b2e9 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 13 Jul 2018 09:14:48 +0200 Subject: Use command line parameters settings for GUI as well. --- ice40/main.cc | 155 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 82 insertions(+), 73 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index 32864703..ae988da9 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -47,21 +47,22 @@ USING_NEXTPNR_NAMESPACE -void svg_dump_decal(const Context &ctx, const DecalXY &decal) +void svg_dump_decal(const Context *ctx, const DecalXY &decal) { const float scale = 10.0, offset = 10.0; const std::string style = "stroke=\"black\" stroke-width=\"0.1\" fill=\"none\""; - for (auto &el : ctx.getDecalGraphics(decal.decal)) { + for (auto &el : ctx->getDecalGraphics(decal.decal)) { if (el.type == GraphicElement::G_BOX) { - std::cout << "\n"; + std::cout << "\n"; } if (el.type == GraphicElement::G_LINE) { - std::cout << "\n"; + std::cout << "\n"; } } } @@ -130,16 +131,18 @@ int main(int argc, char *argv[]) if (vm.count("help") || argc == 1) { help: - std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) + << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; std::cout << "\n"; std::cout << options << "\n"; return argc != 1; } if (vm.count("version")) { - std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) + << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; return 1; } @@ -269,110 +272,126 @@ int main(int argc, char *argv[]) return 1; } - Context ctx(chipArgs); + std::unique_ptr ctx = std::unique_ptr(new Context(chipArgs)); if (vm.count("verbose")) { - ctx.verbose = true; + ctx->verbose = true; } if (vm.count("debug")) { - ctx.verbose = true; - ctx.debug = true; + ctx->verbose = true; + ctx->debug = true; } if (vm.count("force")) { - ctx.force = true; + ctx->force = true; } if (vm.count("seed")) { - ctx.rngseed(vm["seed"].as()); + ctx->rngseed(vm["seed"].as()); } if (vm.count("svg")) { std::cout << "\n"; - for (auto bel : ctx.getBels()) { - std::cout << "\n"; - svg_dump_decal(ctx, ctx.getBelDecal(bel)); + for (auto bel : ctx->getBels()) { + std::cout << "\n"; + svg_dump_decal(ctx.get(), ctx->getBelDecal(bel)); } std::cout << "\n"; - svg_dump_decal(ctx, ctx.getFrameDecal()); + svg_dump_decal(ctx.get(), ctx->getFrameDecal()); std::cout << "\n"; } if (vm.count("tmfuzz")) { std::vector src_wires, dst_wires; - /*for (auto w : ctx.getWires()) + /*for (auto w : ctx->getWires()) src_wires.push_back(w);*/ - for (auto b : ctx.getBels()) { - if (ctx.getBelType(b) == TYPE_ICESTORM_LC) { - src_wires.push_back(ctx.getWireBelPin(b, PIN_O)); + for (auto b : ctx->getBels()) { + if (ctx->getBelType(b) == TYPE_ICESTORM_LC) { + src_wires.push_back(ctx->getWireBelPin(b, PIN_O)); } - if (ctx.getBelType(b) == TYPE_SB_IO) { - src_wires.push_back(ctx.getWireBelPin(b, PIN_D_IN_0)); + if (ctx->getBelType(b) == TYPE_SB_IO) { + src_wires.push_back(ctx->getWireBelPin(b, PIN_D_IN_0)); } } - for (auto b : ctx.getBels()) { - if (ctx.getBelType(b) == TYPE_ICESTORM_LC) { - dst_wires.push_back(ctx.getWireBelPin(b, PIN_I0)); - dst_wires.push_back(ctx.getWireBelPin(b, PIN_I1)); - dst_wires.push_back(ctx.getWireBelPin(b, PIN_I2)); - dst_wires.push_back(ctx.getWireBelPin(b, PIN_I3)); - dst_wires.push_back(ctx.getWireBelPin(b, PIN_CEN)); - dst_wires.push_back(ctx.getWireBelPin(b, PIN_CIN)); + for (auto b : ctx->getBels()) { + if (ctx->getBelType(b) == TYPE_ICESTORM_LC) { + dst_wires.push_back(ctx->getWireBelPin(b, PIN_I0)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_I1)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_I2)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_I3)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_CEN)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_CIN)); } - if (ctx.getBelType(b) == TYPE_SB_IO) { - dst_wires.push_back(ctx.getWireBelPin(b, PIN_D_OUT_0)); - dst_wires.push_back(ctx.getWireBelPin(b, PIN_OUTPUT_ENABLE)); + if (ctx->getBelType(b) == TYPE_SB_IO) { + dst_wires.push_back(ctx->getWireBelPin(b, PIN_D_OUT_0)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_OUTPUT_ENABLE)); } } - ctx.shuffle(src_wires); - ctx.shuffle(dst_wires); + ctx->shuffle(src_wires); + ctx->shuffle(dst_wires); for (int i = 0; i < int(src_wires.size()) && i < int(dst_wires.size()); i++) { delay_t actual_delay; WireId src = src_wires[i], dst = dst_wires[i]; - if (!ctx.getActualRouteDelay(src, dst, actual_delay)) + if (!ctx->getActualRouteDelay(src, dst, actual_delay)) continue; - printf("%s %s %.3f %.3f %d %d %d %d %d %d\n", ctx.getWireName(src).c_str(&ctx), - ctx.getWireName(dst).c_str(&ctx), ctx.getDelayNS(actual_delay), - ctx.getDelayNS(ctx.estimateDelay(src, dst)), ctx.chip_info->wire_data[src.index].x, - ctx.chip_info->wire_data[src.index].y, ctx.chip_info->wire_data[src.index].type, - ctx.chip_info->wire_data[dst.index].x, ctx.chip_info->wire_data[dst.index].y, - ctx.chip_info->wire_data[dst.index].type); + printf("%s %s %.3f %.3f %d %d %d %d %d %d\n", ctx->getWireName(src).c_str(ctx.get()), + ctx->getWireName(dst).c_str(ctx.get()), ctx->getDelayNS(actual_delay), + ctx->getDelayNS(ctx->estimateDelay(src, dst)), ctx->chip_info->wire_data[src.index].x, + ctx->chip_info->wire_data[src.index].y, ctx->chip_info->wire_data[src.index].type, + ctx->chip_info->wire_data[dst.index].x, ctx->chip_info->wire_data[dst.index].y, + ctx->chip_info->wire_data[dst.index].type); } } + if (vm.count("freq")) + ctx->target_freq = vm["freq"].as() * 1e6; + ctx->timing_driven = true; + if (vm.count("no-tmdriv")) + ctx->timing_driven = false; +#ifndef NO_GUI + if (vm.count("gui")) { + Application a(argc, argv); + MainWindow w(std::move(ctx)); + if (vm.count("json")) { + std::string filename = vm["json"].as(); + std::string pcf = ""; + if (vm.count("pcf")) + pcf = vm["pcf"].as(); + w.load_json(filename, pcf); + } + w.show(); + + return a.exec(); + } +#endif if (vm.count("json")) { std::string filename = vm["json"].as(); std::ifstream f(filename); - if (!parse_json_file(f, filename, &ctx)) + if (!parse_json_file(f, filename, ctx.get())) log_error("Loading design failed.\n"); if (vm.count("pcf")) { std::ifstream pcf(vm["pcf"].as()); - if (!apply_pcf(&ctx, pcf)) + if (!apply_pcf(ctx.get(), pcf)) log_error("Loading PCF failed.\n"); } - if (!pack_design(&ctx) && !ctx.force) + if (!pack_design(ctx.get()) && !ctx->force) log_error("Packing design failed.\n"); - if (vm.count("freq")) - ctx.target_freq = vm["freq"].as() * 1e6; - assign_budget(&ctx); - ctx.check(); - print_utilisation(&ctx); - ctx.timing_driven = true; - if (vm.count("no-tmdriv")) - ctx.timing_driven = false; + assign_budget(ctx.get()); + ctx->check(); + print_utilisation(ctx.get()); if (!vm.count("pack-only")) { - if (!ctx.place() && !ctx.force) + if (!ctx->place() && !ctx->force) log_error("Placing design failed.\n"); - ctx.check(); - if (!ctx.route() && !ctx.force) + ctx->check(); + if (!ctx->route() && !ctx->force) log_error("Routing design failed.\n"); } } @@ -380,13 +399,13 @@ int main(int argc, char *argv[]) if (vm.count("asc")) { std::string filename = vm["asc"].as(); std::ofstream f(filename); - write_asc(&ctx, f); + write_asc(ctx.get(), f); } #ifndef NO_PYTHON if (vm.count("run")) { init_python(argv[0], true); - python_export_global("ctx", ctx); + python_export_global("ctx", *ctx.get()); std::vector files = vm["run"].as>(); for (auto filename : files) @@ -395,16 +414,6 @@ int main(int argc, char *argv[]) deinit_python(); } #endif - -#ifndef NO_GUI - if (vm.count("gui")) { - Application a(argc, argv); - MainWindow w; - w.show(); - - rc = a.exec(); - } -#endif return rc; } catch (log_execution_error_exception) { #if defined(_MSC_VER) -- cgit v1.2.3 From b5498c8a5366f8ae6c1e6e850a55b49753b0d6a6 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 13 Jul 2018 12:02:49 +0200 Subject: Fixed initial title and actions after new --- ice40/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index ae988da9..53cd7164 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -357,7 +357,7 @@ int main(int argc, char *argv[]) #ifndef NO_GUI if (vm.count("gui")) { Application a(argc, argv); - MainWindow w(std::move(ctx)); + MainWindow w(std::move(ctx), chipArgs); if (vm.count("json")) { std::string filename = vm["json"].as(); std::string pcf = ""; -- cgit v1.2.3 From c05bea12e0af7ec847043c832133cbfddfb278b1 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 13 Jul 2018 15:16:44 +0200 Subject: Add ctx->pack() API Signed-off-by: Clifford Wolf --- ice40/main.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index 53cd7164..e77bdd34 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -39,7 +39,6 @@ #include "jsonparse.h" #include "log.h" #include "nextpnr.h" -#include "pack.h" #include "pcf.h" #include "place_legaliser.h" #include "timing.h" @@ -382,7 +381,7 @@ int main(int argc, char *argv[]) log_error("Loading PCF failed.\n"); } - if (!pack_design(ctx.get()) && !ctx->force) + if (!ctx->pack() && !ctx->force) log_error("Packing design failed.\n"); assign_budget(ctx.get()); ctx->check(); -- cgit v1.2.3 From a8c84e90a39c54174dd24b5b76bd17aed8311481 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Fri, 13 Jul 2018 20:53:52 +0100 Subject: Make GUI nice and smooth. --- ice40/main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index e77bdd34..d38c786c 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -51,7 +51,8 @@ void svg_dump_decal(const Context *ctx, const DecalXY &decal) const float scale = 10.0, offset = 10.0; const std::string style = "stroke=\"black\" stroke-width=\"0.1\" fill=\"none\""; - for (auto &el : ctx->getDecalGraphics(decal.decal)) { + auto &&proxy = ctx->rproxy(); + for (auto &el : proxy.getDecalGraphics(decal.decal)) { if (el.type == GraphicElement::G_BOX) { std::cout << " Date: Sat, 14 Jul 2018 12:02:28 +0100 Subject: Remove legacy access to state via Arch --- ice40/main.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index d38c786c..fdfe1f25 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -304,31 +304,32 @@ int main(int argc, char *argv[]) } if (vm.count("tmfuzz")) { + auto &&proxy = ctx->rproxy(); std::vector src_wires, dst_wires; /*for (auto w : ctx->getWires()) src_wires.push_back(w);*/ for (auto b : ctx->getBels()) { if (ctx->getBelType(b) == TYPE_ICESTORM_LC) { - src_wires.push_back(ctx->getWireBelPin(b, PIN_O)); + src_wires.push_back(proxy.getWireBelPin(b, PIN_O)); } if (ctx->getBelType(b) == TYPE_SB_IO) { - src_wires.push_back(ctx->getWireBelPin(b, PIN_D_IN_0)); + src_wires.push_back(proxy.getWireBelPin(b, PIN_D_IN_0)); } } for (auto b : ctx->getBels()) { if (ctx->getBelType(b) == TYPE_ICESTORM_LC) { - dst_wires.push_back(ctx->getWireBelPin(b, PIN_I0)); - dst_wires.push_back(ctx->getWireBelPin(b, PIN_I1)); - dst_wires.push_back(ctx->getWireBelPin(b, PIN_I2)); - dst_wires.push_back(ctx->getWireBelPin(b, PIN_I3)); - dst_wires.push_back(ctx->getWireBelPin(b, PIN_CEN)); - dst_wires.push_back(ctx->getWireBelPin(b, PIN_CIN)); + dst_wires.push_back(proxy.getWireBelPin(b, PIN_I0)); + dst_wires.push_back(proxy.getWireBelPin(b, PIN_I1)); + dst_wires.push_back(proxy.getWireBelPin(b, PIN_I2)); + dst_wires.push_back(proxy.getWireBelPin(b, PIN_I3)); + dst_wires.push_back(proxy.getWireBelPin(b, PIN_CEN)); + dst_wires.push_back(proxy.getWireBelPin(b, PIN_CIN)); } if (ctx->getBelType(b) == TYPE_SB_IO) { - dst_wires.push_back(ctx->getWireBelPin(b, PIN_D_OUT_0)); - dst_wires.push_back(ctx->getWireBelPin(b, PIN_OUTPUT_ENABLE)); + dst_wires.push_back(proxy.getWireBelPin(b, PIN_D_OUT_0)); + dst_wires.push_back(proxy.getWireBelPin(b, PIN_OUTPUT_ENABLE)); } } -- cgit v1.2.3 From 22330402018a212efd4ef2e337e34af2e79eb875 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Sat, 14 Jul 2018 18:50:15 +0100 Subject: Revert "Remove legacy access to state via Arch" This reverts commit 18b4b316782035daa259d65d26ea733ca4d16bea. --- ice40/main.cc | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index fdfe1f25..d38c786c 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -304,32 +304,31 @@ int main(int argc, char *argv[]) } if (vm.count("tmfuzz")) { - auto &&proxy = ctx->rproxy(); std::vector src_wires, dst_wires; /*for (auto w : ctx->getWires()) src_wires.push_back(w);*/ for (auto b : ctx->getBels()) { if (ctx->getBelType(b) == TYPE_ICESTORM_LC) { - src_wires.push_back(proxy.getWireBelPin(b, PIN_O)); + src_wires.push_back(ctx->getWireBelPin(b, PIN_O)); } if (ctx->getBelType(b) == TYPE_SB_IO) { - src_wires.push_back(proxy.getWireBelPin(b, PIN_D_IN_0)); + src_wires.push_back(ctx->getWireBelPin(b, PIN_D_IN_0)); } } for (auto b : ctx->getBels()) { if (ctx->getBelType(b) == TYPE_ICESTORM_LC) { - dst_wires.push_back(proxy.getWireBelPin(b, PIN_I0)); - dst_wires.push_back(proxy.getWireBelPin(b, PIN_I1)); - dst_wires.push_back(proxy.getWireBelPin(b, PIN_I2)); - dst_wires.push_back(proxy.getWireBelPin(b, PIN_I3)); - dst_wires.push_back(proxy.getWireBelPin(b, PIN_CEN)); - dst_wires.push_back(proxy.getWireBelPin(b, PIN_CIN)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_I0)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_I1)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_I2)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_I3)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_CEN)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_CIN)); } if (ctx->getBelType(b) == TYPE_SB_IO) { - dst_wires.push_back(proxy.getWireBelPin(b, PIN_D_OUT_0)); - dst_wires.push_back(proxy.getWireBelPin(b, PIN_OUTPUT_ENABLE)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_D_OUT_0)); + dst_wires.push_back(ctx->getWireBelPin(b, PIN_OUTPUT_ENABLE)); } } -- cgit v1.2.3 From 36b4e3382dc552fcd1b078bdd246dc14379394a1 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Sat, 14 Jul 2018 18:50:50 +0100 Subject: Revert "Make GUI nice and smooth." This reverts commit a8c84e90a39c54174dd24b5b76bd17aed8311481. --- ice40/main.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index d38c786c..e77bdd34 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -51,8 +51,7 @@ void svg_dump_decal(const Context *ctx, const DecalXY &decal) const float scale = 10.0, offset = 10.0; const std::string style = "stroke=\"black\" stroke-width=\"0.1\" fill=\"none\""; - auto &&proxy = ctx->rproxy(); - for (auto &el : proxy.getDecalGraphics(decal.decal)) { + for (auto &el : ctx->getDecalGraphics(decal.decal)) { if (el.type == GraphicElement::G_BOX) { std::cout << "