ecp5: Use an attribute to store is_global
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
1093d7e122
commit
15a1d4f582
@ -531,6 +531,7 @@ bool Arch::place()
|
|||||||
bool Arch::route()
|
bool Arch::route()
|
||||||
{
|
{
|
||||||
route_ecp5_globals(getCtx());
|
route_ecp5_globals(getCtx());
|
||||||
|
assignArchInfo();
|
||||||
assign_budget(getCtx(), true);
|
assign_budget(getCtx(), true);
|
||||||
|
|
||||||
bool result = router1(getCtx(), Router1Cfg(getCtx()));
|
bool result = router1(getCtx(), Router1Cfg(getCtx()));
|
||||||
|
@ -382,7 +382,7 @@ class Ecp5GlobalRouter
|
|||||||
glbnet->name = ctx->id("$glbnet$" + net->name.str(ctx));
|
glbnet->name = ctx->id("$glbnet$" + net->name.str(ctx));
|
||||||
glbnet->driver.cell = dcc.get();
|
glbnet->driver.cell = dcc.get();
|
||||||
glbnet->driver.port = id_CLKO;
|
glbnet->driver.port = id_CLKO;
|
||||||
glbnet->is_global = true;
|
glbnet->attrs[ctx->id("ECP5_IS_GLOBAL")] = "1";
|
||||||
dcc->ports[id_CLKO].net = glbnet.get();
|
dcc->ports[id_CLKO].net = glbnet.get();
|
||||||
|
|
||||||
std::vector<PortRef> keep_users;
|
std::vector<PortRef> keep_users;
|
||||||
|
@ -1508,7 +1508,8 @@ class Ecp5Packer
|
|||||||
|
|
||||||
std::unique_ptr<NetInfo> promoted_ecknet(new NetInfo);
|
std::unique_ptr<NetInfo> promoted_ecknet(new NetInfo);
|
||||||
promoted_ecknet->name = eckname;
|
promoted_ecknet->name = eckname;
|
||||||
promoted_ecknet->is_global = true; // Prevents router etc touching this special net
|
promoted_ecknet->attrs[ctx->id("ECP5_IS_GLOBAL")] =
|
||||||
|
"1"; // Prevents router etc touching this special net
|
||||||
eclk.buf = promoted_ecknet.get();
|
eclk.buf = promoted_ecknet.get();
|
||||||
NPNR_ASSERT(!ctx->nets.count(eckname));
|
NPNR_ASSERT(!ctx->nets.count(eckname));
|
||||||
ctx->nets[eckname] = std::move(promoted_ecknet);
|
ctx->nets[eckname] = std::move(promoted_ecknet);
|
||||||
@ -1654,7 +1655,7 @@ class Ecp5Packer
|
|||||||
port.c_str(ctx), ci->name.c_str(ctx), usr.port.c_str(ctx),
|
port.c_str(ctx), ci->name.c_str(ctx), usr.port.c_str(ctx),
|
||||||
usr.cell->name.c_str(ctx));
|
usr.cell->name.c_str(ctx));
|
||||||
}
|
}
|
||||||
pn->is_global = true;
|
pn->attrs[ctx->id("ECP5_IS_GLOBAL")] = "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto zport :
|
for (auto zport :
|
||||||
@ -2470,6 +2471,9 @@ void Arch::assignArchInfo()
|
|||||||
ci->sliceInfo.has_l6mux = true;
|
ci->sliceInfo.has_l6mux = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (auto net : sorted(nets)) {
|
||||||
|
net.second->is_global = bool_or_default(net.second->attrs, id("ECP5_IS_GLOBAL"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_END
|
NEXTPNR_NAMESPACE_END
|
||||||
|
Loading…
Reference in New Issue
Block a user