diff options
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/arch.cc | 14 | ||||
-rw-r--r-- | ice40/arch.h | 5 | ||||
-rw-r--r-- | ice40/main.cc | 8 |
3 files changed, 22 insertions, 5 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc index a25c3d87..1e6b4569 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -21,6 +21,8 @@ #include <cmath> #include "log.h" #include "nextpnr.h" +#include "placer1.h" +#include "router1.h" #include "util.h" #include "gfx.h" @@ -400,6 +402,18 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const // ----------------------------------------------------------------------- +bool Arch::place() +{ + return placer1(getCtx()); +} + +bool Arch::route() +{ + return router1(getCtx()); +} + +// ----------------------------------------------------------------------- + DecalXY Arch::getFrameDecal() const { DecalXY decalxy; diff --git a/ice40/arch.h b/ice40/arch.h index 28e913e4..659139a6 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -643,6 +643,11 @@ struct Arch : BaseCtx // ------------------------------------------------- + bool place(); + bool route(); + + // ------------------------------------------------- + std::vector<GraphicElement> getDecalGraphics(DecalId decal) const; DecalXY getFrameDecal() const; diff --git a/ice40/main.cc b/ice40/main.cc index ff823cbe..2427ea6c 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -42,8 +42,6 @@ #include "pack.h" #include "pcf.h" #include "place_legaliser.h" -#include "place_sa.h" -#include "route.h" #include "timing.h" #include "version.h" @@ -339,7 +337,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), @@ -373,10 +371,10 @@ 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 (!route_design(&ctx) && !ctx.force) + if (!ctx.route() && !ctx.force) log_error("Routing design failed.\n"); } } |