Naive pack CC_DFF

This commit is contained in:
Miodrag Milanovic 2024-12-24 09:29:48 +01:00
parent d09c901f67
commit 63beb45950
2 changed files with 28 additions and 0 deletions

View File

@ -109,3 +109,10 @@ X(INIT_L30)
X(O1)
X(O2)
X(CC_DFF)
X(Q)
X(D)
X(R)
X(S)
X(FF_INIT)

View File

@ -315,6 +315,27 @@ void GateMatePacker::pack_cpe()
}
ci.type = id_CPE;
}
for (auto &cell : ctx->cells) {
CellInfo &ci = *cell.second;
if (!ci.type.in(id_CC_DFF))
continue;
ci.renamePort(id_D, id_IN1);
ci.renamePort(id_Q, id_OUT1);
ci.disconnectPort(id_EN);
ci.disconnectPort(id_SR);
ci.params[id_O1] = Property(0b11, 2);
ci.params[id_INIT_L20] = Property(0b1010, 4);
ci.params[id_INIT_L00] = Property(0b1010, 4);
ci.params[id_INIT_L10] = Property(0b1010, 4);
ci.params[id_EN] = Property(0b11, 2);
ci.params[id_R] = Property(0b11, 2);
ci.params[id_S] = Property(0b11, 2);
ci.params[id_FF_INIT] = Property(0b10, 2);
ci.type = id_CPE;
}
}
void GateMatePacker::pack_constants()