From 96a588505179c1d76a15119a6c8f719910f020cc Mon Sep 17 00:00:00 2001 From: gatecat Date: Mon, 12 Jul 2021 11:30:21 +0100 Subject: [PATCH 1/3] interchange: Place DIFFINBUF and IBUFCTRL for UltraScale+ IBUFDS Signed-off-by: gatecat --- fpga_interchange/arch_pack_io.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fpga_interchange/arch_pack_io.cc b/fpga_interchange/arch_pack_io.cc index 19d8cece..b018c6bd 100644 --- a/fpga_interchange/arch_pack_io.cc +++ b/fpga_interchange/arch_pack_io.cc @@ -55,8 +55,6 @@ bool search_routing_for_placement(Arch *arch, WireId start_wire, CellInfo *cell, WireId dst = downhill ? arch->getPipDstWire(pip) : arch->getPipSrcWire(pip); if (already_visited.count(dst)) return; - if (!arch->is_site_wire(dst) && arch->get_wire_category(dst) == WIRE_CAT_GENERAL) - return; // this pass only considers dedicated routing visit_queue.push(dst); already_visited.insert(dst); }; @@ -83,6 +81,7 @@ void Arch::place_iobufs(WireId pad_wire, NetInfo *net, if (ctx->verbose) log_info("Placed IO cell %s:%s at %s.\n", ctx->nameOf(cell_port.first), ctx->nameOf(cell_port.first->type), ctx->nameOfBel(cell_port.first->bel)); + placed_cells->insert(cell_port.first); } } @@ -246,7 +245,9 @@ void Arch::pack_ports() } if (possible_site_types.empty()) { - log_error("Port '%s' has no possible site types!\n", port_name.c_str(getCtx())); + if (getCtx()->verbose) + log_info("Port '%s' has no possible site types, falling back to all types!\n", port_name.c_str(getCtx())); + possible_site_types = package_pin_site_types; } if (getCtx()->verbose) { From 8604b030088d9b0895a9384b21e37a97741a1ba2 Mon Sep 17 00:00:00 2001 From: gatecat Date: Mon, 12 Jul 2021 11:40:23 +0100 Subject: [PATCH 2/3] interchange: Debug IO port validity check failures Signed-off-by: gatecat --- fpga_interchange/arch_pack_io.cc | 4 +++- fpga_interchange/dedicated_interconnect.cc | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fpga_interchange/arch_pack_io.cc b/fpga_interchange/arch_pack_io.cc index b018c6bd..38b619a3 100644 --- a/fpga_interchange/arch_pack_io.cc +++ b/fpga_interchange/arch_pack_io.cc @@ -246,7 +246,8 @@ void Arch::pack_ports() if (possible_site_types.empty()) { if (getCtx()->verbose) - log_info("Port '%s' has no possible site types, falling back to all types!\n", port_name.c_str(getCtx())); + log_info("Port '%s' has no possible site types, falling back to all types!\n", + port_name.c_str(getCtx())); possible_site_types = package_pin_site_types; } @@ -316,6 +317,7 @@ void Arch::pack_ports() for (CellInfo *cell : placed_cells) { NPNR_ASSERT(cell->bel != BelId()); if (!isBelLocationValid(cell->bel)) { + explain_bel_status(cell->bel); log_error("Tightly bound BEL %s was not valid!\n", nameOfBel(cell->bel)); } } diff --git a/fpga_interchange/dedicated_interconnect.cc b/fpga_interchange/dedicated_interconnect.cc index 7658d579..5f89e15b 100644 --- a/fpga_interchange/dedicated_interconnect.cc +++ b/fpga_interchange/dedicated_interconnect.cc @@ -457,12 +457,12 @@ void DedicatedInterconnect::explain_bel_status(BelId bel, const CellInfo *cell) // Only check sink BELs. if (net->driver.cell == cell && net->driver.port == port_name) { if (!is_driver_on_net_valid(bel, cell, port_name, net)) { - log_info("Driver %s/%s is not valid on net '%s'", cell->name.c_str(ctx), port_name.c_str(ctx), + log_info("Driver %s/%s is not valid on net '%s'\n", cell->name.c_str(ctx), port_name.c_str(ctx), net->name.c_str(ctx)); } } else { if (!is_sink_on_net_valid(bel, cell, port_name, net)) { - log_info("Sink %s/%s is not valid on net '%s'", cell->name.c_str(ctx), port_name.c_str(ctx), + log_info("Sink %s/%s is not valid on net '%s'\n", cell->name.c_str(ctx), port_name.c_str(ctx), net->name.c_str(ctx)); } } From f03abe14d19a8e05bfd5c15f168ae8b25a1285c0 Mon Sep 17 00:00:00 2001 From: gatecat Date: Mon, 12 Jul 2021 11:43:18 +0100 Subject: [PATCH 3/3] interchange: Skip IO ports in dedicated routing check These have already been dealt with in arch_pack_io Signed-off-by: gatecat --- fpga_interchange/dedicated_interconnect.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fpga_interchange/dedicated_interconnect.cc b/fpga_interchange/dedicated_interconnect.cc index 5f89e15b..56b6b706 100644 --- a/fpga_interchange/dedicated_interconnect.cc +++ b/fpga_interchange/dedicated_interconnect.cc @@ -425,6 +425,10 @@ bool DedicatedInterconnect::isBelLocationValid(BelId bel, const CellInfo *cell) continue; } + if (ctx->io_port_types.count(net->driver.cell->type)) { + continue; + } + // Only check sink BELs. if (net->driver.cell == cell && net->driver.port == port_name) { if (!is_driver_on_net_valid(bel, cell, port_name, net)) { @@ -454,6 +458,10 @@ void DedicatedInterconnect::explain_bel_status(BelId bel, const CellInfo *cell) // This net doesn't have a driver, probably not valid? NPNR_ASSERT(net->driver.cell != nullptr); + if (ctx->io_port_types.count(net->driver.cell->type)) { + continue; + } + // Only check sink BELs. if (net->driver.cell == cell && net->driver.port == port_name) { if (!is_driver_on_net_valid(bel, cell, port_name, net)) {