remove parameters

This commit is contained in:
Pepijn de Vos 2020-12-21 11:04:03 +01:00
parent a48d742c63
commit 4d03b681a8
4 changed files with 6 additions and 16 deletions

View File

@ -1205,7 +1205,6 @@ void Arch::assignArchInfo()
} else {
ci->is_slice = false;
}
ci->user_group = int_or_default(ci->attrs, id("PACK_GROUP"), -1);
}
}
@ -1220,8 +1219,7 @@ bool Arch::cellsCompatible(const CellInfo **cells, int count) const
if (ci->is_slice && ci->slice_clk != nullptr) {
Loc loc = getBelLocation(ci->bel);
int cls = loc.z / 2;
bool ff_used = ci->params.at(id_FF_USED).as_bool();
if (loc.z >= 6 && ff_used) // top slice have no ff
if (loc.z >= 6 && ci->ff_used) // top slice have no ff
return false;
if (clk[cls] == nullptr)
clk[cls] = ci->slice_clk;
@ -1236,12 +1234,6 @@ bool Arch::cellsCompatible(const CellInfo **cells, int count) const
else if (lsr[cls] != ci->slice_lsr)
return false;
}
if (ci->user_group != -1) {
if (group == -1)
group = ci->user_group;
else if (group != ci->user_group)
return false;
}
}
return true;
}

View File

@ -81,9 +81,8 @@ struct NetInfo;
struct ArchCellInfo
{
// Custom grouping set via "PACK_GROUP" attribute. All cells with the same group
// value may share a tile (-1 = don't care, default if not set)
int user_group;
// Is the flip-flop of this slice used
bool ff_used;
// Is a slice type primitive
bool is_slice;
// Only packing rule for slice type primitives is a single clock per tile

View File

@ -44,8 +44,8 @@ std::unique_ptr<CellInfo> create_generic_cell(Context *ctx, IdString type, std::
new_cell->type = type;
if (type == id_SLICE) {
new_cell->params[id_INIT] = 0;
new_cell->params[id_FF_USED] = 0;
new_cell->params[id_FF_TYPE] = id_DFF.str(ctx);
new_cell->ff_used = false;
IdString names[4] = {id_A, id_B, id_C, id_D};
for (int i = 0; i < 4; i++) {
@ -84,14 +84,14 @@ void lut_to_lc(const Context *ctx, CellInfo *lut, CellInfo *lc, bool no_dff)
}
if (no_dff) {
lc->params[id_FF_USED] = 0;
lc->ff_used = false;
replace_port(lut, id_F, lc, id_F);
}
}
void dff_to_lc(const Context *ctx, CellInfo *dff, CellInfo *lc, bool pass_thru_lut)
{
lc->params[id_FF_USED] = 1;
lc->ff_used = true;
lc->params[id_FF_TYPE] = dff->type.str(ctx);
replace_port(dff, id_CLK, lc, id_CLK);
replace_port(dff, id_CE, lc, id_CE);

View File

@ -388,7 +388,6 @@ X(TBUF)
// primitive attributes
X(INIT)
X(FF_USED)
X(FF_TYPE)
X(INPUT_USED)
X(OUTPUT_USED)