Gowin. Fix the port check for connectivity.
What happens is that it's not enough to check for a network, we also need to make sure that the network is functional: has src and sinks Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
This commit is contained in:
parent
4c3cc5f5bd
commit
c064b84a08
@ -20,7 +20,7 @@ struct GowinCstReader
|
|||||||
Context *ctx;
|
Context *ctx;
|
||||||
std::istream ∈
|
std::istream ∈
|
||||||
|
|
||||||
GowinCstReader(Context *ctx, std::istream &in) : ctx(ctx), in(in){};
|
GowinCstReader(Context *ctx, std::istream &in) : ctx(ctx), in(in) {};
|
||||||
|
|
||||||
const PadInfoPOD *pinLookup(const PadInfoPOD *list, const size_t len, const IdString idx)
|
const PadInfoPOD *pinLookup(const PadInfoPOD *list, const size_t len, const IdString idx)
|
||||||
{
|
{
|
||||||
|
@ -340,8 +340,7 @@ struct GowinGlobalRouter
|
|||||||
src = ctx->getBelPinWire(driver.cell->bel, driver.port);
|
src = ctx->getBelPinWire(driver.cell->bel, driver.port);
|
||||||
}
|
}
|
||||||
|
|
||||||
RouteResult route_result = route_direct_net(
|
RouteResult route_result = route_direct_net(net, [&](PipId pip) { return global_DQCE_pip_filter(pip); }, src);
|
||||||
net, [&](PipId pip) { return global_DQCE_pip_filter(pip); }, src);
|
|
||||||
if (route_result == NOT_ROUTED) {
|
if (route_result == NOT_ROUTED) {
|
||||||
log_error("Can't route the %s network.\n", ctx->nameOf(net));
|
log_error("Can't route the %s network.\n", ctx->nameOf(net));
|
||||||
}
|
}
|
||||||
@ -418,8 +417,7 @@ struct GowinGlobalRouter
|
|||||||
src = ctx->getBelPinWire(driver.cell->bel, driver.port);
|
src = ctx->getBelPinWire(driver.cell->bel, driver.port);
|
||||||
}
|
}
|
||||||
|
|
||||||
RouteResult route_result = route_direct_net(
|
RouteResult route_result = route_direct_net(net, [&](PipId pip) { return global_DCS_pip_filter(pip); }, src);
|
||||||
net, [&](PipId pip) { return global_DCS_pip_filter(pip); }, src);
|
|
||||||
if (route_result == NOT_ROUTED) {
|
if (route_result == NOT_ROUTED) {
|
||||||
log_error("Can't route the %s network.\n", ctx->nameOf(net));
|
log_error("Can't route the %s network.\n", ctx->nameOf(net));
|
||||||
}
|
}
|
||||||
@ -506,8 +504,7 @@ struct GowinGlobalRouter
|
|||||||
WireId src = ctx->getBelPinWire(driver.cell->bel, port);
|
WireId src = ctx->getBelPinWire(driver.cell->bel, port);
|
||||||
|
|
||||||
std::vector<PipId> path;
|
std::vector<PipId> path;
|
||||||
RouteResult route_result = route_direct_net(
|
RouteResult route_result = route_direct_net(net, [&](PipId pip) { return global_pip_filter(pip); }, src, &path);
|
||||||
net, [&](PipId pip) { return global_pip_filter(pip); }, src, &path);
|
|
||||||
if (route_result == NOT_ROUTED) {
|
if (route_result == NOT_ROUTED) {
|
||||||
log_error("Can't route the %s network.\n", ctx->nameOf(net));
|
log_error("Can't route the %s network.\n", ctx->nameOf(net));
|
||||||
}
|
}
|
||||||
@ -571,8 +568,7 @@ struct GowinGlobalRouter
|
|||||||
NetInfo *net_before_buf = buf_ci->getPort(id_I);
|
NetInfo *net_before_buf = buf_ci->getPort(id_I);
|
||||||
NPNR_ASSERT(net_before_buf != nullptr);
|
NPNR_ASSERT(net_before_buf != nullptr);
|
||||||
|
|
||||||
RouteResult route_result = route_direct_net(
|
RouteResult route_result = route_direct_net(net, [&](PipId pip) { return global_pip_filter(pip); }, src);
|
||||||
net, [&](PipId pip) { return global_pip_filter(pip); }, src);
|
|
||||||
if (route_result == NOT_ROUTED || route_result == ROUTED_PARTIALLY) {
|
if (route_result == NOT_ROUTED || route_result == ROUTED_PARTIALLY) {
|
||||||
log_error("Can't route the %s net. It might be worth removing the BUFG buffer flag.\n", ctx->nameOf(net));
|
log_error("Can't route the %s net. It might be worth removing the BUFG buffer flag.\n", ctx->nameOf(net));
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ namespace {
|
|||||||
struct GowinImpl : HimbaechelAPI
|
struct GowinImpl : HimbaechelAPI
|
||||||
{
|
{
|
||||||
|
|
||||||
~GowinImpl(){};
|
~GowinImpl() {};
|
||||||
void init_database(Arch *arch) override;
|
void init_database(Arch *arch) override;
|
||||||
void init(Context *ctx) override;
|
void init(Context *ctx) override;
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ struct GowinImpl : HimbaechelAPI
|
|||||||
|
|
||||||
struct GowinArch : HimbaechelArch
|
struct GowinArch : HimbaechelArch
|
||||||
{
|
{
|
||||||
GowinArch() : HimbaechelArch("gowin"){};
|
GowinArch() : HimbaechelArch("gowin") {};
|
||||||
|
|
||||||
bool match_device(const std::string &device) override { return device.size() > 2 && device.substr(0, 2) == "GW"; }
|
bool match_device(const std::string &device) override { return device.size() > 2 && device.substr(0, 2) == "GW"; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user