From fae2fb4dac3987e43d57a4b60c05123753fb480d Mon Sep 17 00:00:00 2001 From: mrcmry Date: Fri, 19 Jun 2026 08:45:32 +0200 Subject: [PATCH] gatemate: improve PLL->BUFG error message (#1739) When a PLL output is connected to a BUFG, it can only be connected to it. The message is improved in mentioning it and listing all ports connected and the pll name. This simplify debug. --- himbaechel/uarch/gatemate/pack_clocking.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/himbaechel/uarch/gatemate/pack_clocking.cc b/himbaechel/uarch/gatemate/pack_clocking.cc index 6ad3e19e..8449cc5f 100644 --- a/himbaechel/uarch/gatemate/pack_clocking.cc +++ b/himbaechel/uarch/gatemate/pack_clocking.cc @@ -319,7 +319,12 @@ void GateMatePacker::pll_out(CellInfo *cell, IdString origPort, Loc fixed) } if (bufg) { if (net->users.entries() != 1) { - log_error("Not handled BUFG.\n"); + std::string msg = stringf("A PLL output (here %s of %s) connected to a BUFG could only connect to it, not %d ports:\n", + origPort.c_str(ctx), ctx->nameOf(cell), net->users.entries()); + for (auto &usr : net->users) { + msg += stringf(" %s.%s\n", ctx->nameOf(usr.cell), ctx->nameOf(usr.port)); + } + log_error("%s", msg.c_str()); } } else { move_ram_i_fixed(cell, origPort, fixed);