diff options
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/chip.cc | 2 | ||||
-rw-r--r-- | ice40/main.cc | 8 | ||||
-rw-r--r-- | ice40/pack.cc | 10 |
3 files changed, 18 insertions, 2 deletions
diff --git a/ice40/chip.cc b/ice40/chip.cc index 8bbdf5a4..87428339 100644 --- a/ice40/chip.cc +++ b/ice40/chip.cc @@ -304,7 +304,7 @@ PosInfo Chip::getPipPosition(PipId pip) const float Chip::estimateDelay(PosInfo src, PosInfo dst) const { - return fabsf(src.x - dst.x) + fabsf(src.x - dst.x); + return fabsf(src.x - dst.x) + fabsf(src.y - dst.y); } // ----------------------------------------------------------------------- diff --git a/ice40/main.cc b/ice40/main.cc index 8ccec77b..094e6a75 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -60,12 +60,14 @@ int main(int argc, char *argv[]) { namespace po = boost::program_options; int rc = 0; + bool verbose = false; std::string str; log_files.push_back(stdout); po::options_description options("Allowed options"); options.add_options()("help,h", "show help"); + options.add_options()("verbose,v", "verbose output"); options.add_options()("gui", "start gui"); options.add_options()("svg", "dump SVG file"); options.add_options()("pack-only", @@ -125,6 +127,10 @@ int main(int argc, char *argv[]) return 1; } + if (vm.count("verbose")) { + verbose = true; + } + ChipArgs chipArgs; if (vm.count("lp384")) { @@ -217,7 +223,7 @@ int main(int argc, char *argv[]) pack_design(&design); if (!vm.count("pack-only")) { place_design(&design); - route_design(&design); + route_design(&design, verbose); } } diff --git a/ice40/pack.cc b/ice40/pack.cc index be8d1db1..f3b62c52 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -30,6 +30,8 @@ NEXTPNR_NAMESPACE_BEGIN // Pack LUTs and LUT-FF pairs static void pack_lut_lutffs(Design *design) { + log_info("Packing LUT-FFs..\n"); + std::unordered_set<IdString> packed_cells; std::vector<CellInfo *> new_cells; for (auto cell : design->cells) { @@ -85,6 +87,8 @@ static void pack_lut_lutffs(Design *design) // Pack FFs not packed as LUTFFs static void pack_nonlut_ffs(Design *design) { + log_info("Packing non-LUT FFs..\n"); + std::unordered_set<IdString> packed_cells; std::vector<CellInfo *> new_cells; @@ -149,6 +153,8 @@ static void set_net_constant(NetInfo *orig, NetInfo *constnet, bool constval) // Pack constants (simple implementation) static void pack_constants(Design *design) { + log_info("Packing constants..\n"); + CellInfo *gnd_cell = create_ice_cell(design, "ICESTORM_LC", "$PACKER_GND"); gnd_cell->params["LUT_INIT"] = "0"; NetInfo *gnd_net = new NetInfo; @@ -197,6 +203,8 @@ static void pack_io(Design *design) std::unordered_set<IdString> packed_cells; std::vector<CellInfo *> new_cells; + log_info("Packing IOs..\n"); + for (auto cell : design->cells) { CellInfo *ci = cell.second; if (is_nextpnr_iob(ci)) { @@ -253,6 +261,8 @@ static bool is_clock_port(const PortRef &port) // Simple global promoter (clock only) static void promote_globals(Design *design) { + log_info("Promoting globals..\n"); + std::unordered_map<IdString, int> clock_count; for (auto net : design->nets) { NetInfo *ni = net.second; |