From 7d2caf6939cb1e39eaf3c2710b5db784d2033c11 Mon Sep 17 00:00:00 2001 From: YRabbit Date: Tue, 2 Sep 2025 01:02:20 +1000 Subject: [PATCH] Gowin. Fix style. Signed-off-by: YRabbit --- himbaechel/uarch/gowin/globals.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/himbaechel/uarch/gowin/globals.cc b/himbaechel/uarch/gowin/globals.cc index e510e474..1011bc41 100644 --- a/himbaechel/uarch/gowin/globals.cc +++ b/himbaechel/uarch/gowin/globals.cc @@ -65,11 +65,12 @@ struct GowinGlobalRouter bool not_dcs_pip = dst_name != id_CLKOUT; IdString src_type = ctx->getWireType(src); IdString dst_type = ctx->getWireType(dst); - bool src_valid = not_dcs_pip && src_type.in(id_GLOBAL_CLK, id_IO_O, id_PLL_O, id_HCLK, id_DLLDLY, id_OSCOUT); + bool src_is_outpin = src_type.in(id_IO_O, id_PLL_O, id_HCLK, id_DLLDLY, id_OSCOUT); + bool src_valid = not_dcs_pip && (src_type == id_GLOBAL_CLK || src_is_outpin); bool dst_valid = not_dcs_pip && dst_type.in(id_GLOBAL_CLK, id_TILE_CLK, id_PLL_I, id_IO_I, id_HCLK); bool res; - if (src == src_wire && (!src_type.in(id_IO_O, id_HCLK, id_DLLDLY_O, id_OSCOUT))) { + if (src == src_wire && (src_type == id_PLL_O || (!src_is_outpin))) { bool dst_is_spine = dst_name.str(ctx).rfind("SPINE", 0) == 0; res = src_valid && dst_is_spine; } else {