ecp5: Add DCC Bels, fix global router post-rebase
Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
parent
bc10a5646d
commit
97b12fa741
@ -43,6 +43,7 @@ static std::tuple<int, int, std::string> split_identifier_name(const std::string
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
void IdString::initialize_arch(const BaseCtx *ctx)
|
void IdString::initialize_arch(const BaseCtx *ctx)
|
||||||
{
|
{
|
||||||
#define X(t) initialize_add(ctx, #t, ID_##t);
|
#define X(t) initialize_add(ctx, #t, ID_##t);
|
||||||
|
@ -47,6 +47,10 @@ X(B)
|
|||||||
|
|
||||||
X(TRELLIS_SLICE)
|
X(TRELLIS_SLICE)
|
||||||
X(TRELLIS_IO)
|
X(TRELLIS_IO)
|
||||||
|
X(DCCA)
|
||||||
X(CLKMUX)
|
X(CLKMUX)
|
||||||
X(LSRMUX)
|
X(LSRMUX)
|
||||||
X(SRMODE)
|
X(SRMODE)
|
||||||
|
|
||||||
|
X(CLKI)
|
||||||
|
X(CLKO)
|
||||||
|
@ -97,7 +97,7 @@ class Ecp5GlobalRouter
|
|||||||
return *(ctx->getPipsUphill(tap_wire).begin());
|
return *(ctx->getPipsUphill(tap_wire).begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
void route_logic_tile_global(IdString net, int global_index, PortRef user)
|
void route_logic_tile_global(NetInfo *net, int global_index, PortRef user)
|
||||||
{
|
{
|
||||||
WireId userWire = ctx->getBelPinWire(user.cell->bel, ctx->portPinFromId(user.port));
|
WireId userWire = ctx->getBelPinWire(user.cell->bel, ctx->portPinFromId(user.port));
|
||||||
WireId globalWire;
|
WireId globalWire;
|
||||||
@ -147,8 +147,8 @@ class Ecp5GlobalRouter
|
|||||||
if (!already_routed) {
|
if (!already_routed) {
|
||||||
ctx->bindWire(cursor, net, STRENGTH_LOCKED);
|
ctx->bindWire(cursor, net, STRENGTH_LOCKED);
|
||||||
PipId tap_pip = find_tap_pip(cursor);
|
PipId tap_pip = find_tap_pip(cursor);
|
||||||
IdString tap_net = ctx->getBoundPipNet(tap_pip);
|
NetInfo *tap_net = ctx->getBoundPipNet(tap_pip);
|
||||||
if (tap_net == IdString()) {
|
if (tap_net == nullptr) {
|
||||||
ctx->bindPip(tap_pip, net, STRENGTH_LOCKED);
|
ctx->bindPip(tap_pip, net, STRENGTH_LOCKED);
|
||||||
// TODO: SPINE
|
// TODO: SPINE
|
||||||
} else {
|
} else {
|
||||||
@ -173,7 +173,7 @@ class Ecp5GlobalRouter
|
|||||||
return ctx->getWireByLocAndBasename(Location(0, 0), get_quad_name(quad) + "PCLK" + std::to_string(network));
|
return ctx->getWireByLocAndBasename(Location(0, 0), get_quad_name(quad) + "PCLK" + std::to_string(network));
|
||||||
}
|
}
|
||||||
|
|
||||||
void simple_router(IdString net, WireId src, WireId dst)
|
void simple_router(NetInfo *net, WireId src, WireId dst)
|
||||||
{
|
{
|
||||||
std::queue<WireId> visit;
|
std::queue<WireId> visit;
|
||||||
std::unordered_map<WireId, PipId> backtrace;
|
std::unordered_map<WireId, PipId> backtrace;
|
||||||
@ -186,10 +186,10 @@ class Ecp5GlobalRouter
|
|||||||
}
|
}
|
||||||
cursor = visit.back();
|
cursor = visit.back();
|
||||||
visit.pop();
|
visit.pop();
|
||||||
IdString bound = ctx->getBoundWireNet(cursor);
|
NetInfo *bound = ctx->getBoundWireNet(cursor);
|
||||||
if (bound == net) {
|
if (bound == net) {
|
||||||
break;
|
break;
|
||||||
} else if (bound != IdString()) {
|
} else if (bound != nullptr) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cursor == dst)
|
if (cursor == dst)
|
||||||
@ -222,7 +222,7 @@ class Ecp5GlobalRouter
|
|||||||
}
|
}
|
||||||
for (int quad = QUAD_UL; quad < QUAD_LR + 1; quad++) {
|
for (int quad = QUAD_UL; quad < QUAD_LR + 1; quad++) {
|
||||||
WireId glb_dst = get_global_wire(GlobalQuadrant(quad), network);
|
WireId glb_dst = get_global_wire(GlobalQuadrant(quad), network);
|
||||||
simple_router(net->name, glb_src, glb_dst);
|
simple_router(net, glb_src, glb_dst);
|
||||||
}
|
}
|
||||||
if (false) {
|
if (false) {
|
||||||
non_dedicated:
|
non_dedicated:
|
||||||
|
Loading…
Reference in New Issue
Block a user