gowin: to use the FB network detection function

The chip used in tangnano4k does not have such pins, but we call the
function anyway in the expectation of other chips.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
This commit is contained in:
YRabbit 2023-01-19 06:31:55 +10:00
parent b22eebac30
commit ba4d7b1e9a

View File

@ -2169,11 +2169,17 @@ void Arch::fix_pll_nets(Context *ctx)
ci->setParam(id_FBSEL, Property("UNKNOWN")); ci->setParam(id_FBSEL, Property("UNKNOWN"));
continue; continue;
} }
// XXX Redesign for chips other than N-1 and NS-4
if (net_driven_by(ctx, net, is_RPLL_T_FB_iob, id_O) != nullptr) { if (net_driven_by(ctx, net, is_RPLL_T_FB_iob, id_O) != nullptr) {
ci->disconnectPort(id_CLKFB); ci->disconnectPort(id_CLKFB);
ci->setParam(id_FBSEL, Property("CLKFB2")); ci->setParam(id_FBSEL, Property("CLKFB2"));
break; break;
} }
if (net_driven_by(ctx, net, is_LPLL_T_FB_iob, id_O) != nullptr) {
ci->disconnectPort(id_CLKFB);
ci->setParam(id_FBSEL, Property("CLKFB2"));
break;
}
// XXX do special bels (HCLK etc) // XXX do special bels (HCLK etc)
// This is general routing through CLK2 pip // This is general routing through CLK2 pip
ci->setParam(id_FBSEL, Property("CLKFB0")); ci->setParam(id_FBSEL, Property("CLKFB0"));