mirror of https://github.com/YosysHQ/nextpnr.git
gatemate: special case RAMIO when needed (#1536)
This commit is contained in:
parent
82f8ff7cad
commit
e598b2f4d9
|
|
@ -812,8 +812,13 @@ std::pair<CellInfo *, CellInfo *> GateMatePacker::move_ram_io(CellInfo *cell, Id
|
||||||
if (!i_net && !o_net)
|
if (!i_net && !o_net)
|
||||||
return std::make_pair(nullptr, nullptr);
|
return std::make_pair(nullptr, nullptr);
|
||||||
|
|
||||||
|
IdString ram_io_type = id_CPE_RAMIO;
|
||||||
|
if (!o_net)
|
||||||
|
ram_io_type = id_CPE_RAMI;
|
||||||
|
if (!i_net)
|
||||||
|
ram_io_type = id_CPE_RAMO;
|
||||||
CellInfo *cpe_ramio =
|
CellInfo *cpe_ramio =
|
||||||
create_cell_ptr(id_CPE_RAMIO, ctx->idf("%s$%s_ramio", cell->name.c_str(ctx), oPort.c_str(ctx)));
|
create_cell_ptr(ram_io_type, ctx->idf("%s$%s_ramio", cell->name.c_str(ctx), oPort.c_str(ctx)));
|
||||||
if (place) {
|
if (place) {
|
||||||
cell->constr_children.push_back(cpe_ramio);
|
cell->constr_children.push_back(cpe_ramio);
|
||||||
cpe_ramio->cluster = cell->cluster;
|
cpe_ramio->cluster = cell->cluster;
|
||||||
|
|
@ -823,7 +828,8 @@ std::pair<CellInfo *, CellInfo *> GateMatePacker::move_ram_io(CellInfo *cell, Id
|
||||||
BelId b = ctx->getBelByLocation(cpe_loc);
|
BelId b = ctx->getBelByLocation(cpe_loc);
|
||||||
ctx->bindBel(b, cpe_ramio, PlaceStrength::STRENGTH_FIXED);
|
ctx->bindBel(b, cpe_ramio, PlaceStrength::STRENGTH_FIXED);
|
||||||
}
|
}
|
||||||
CellInfo *cpe_half = create_cell_ptr(id_CPE_L2T4, ctx->idf("%s$%s_cpe", cell->name.c_str(ctx), oPort.c_str(ctx)));
|
CellInfo *cpe_half = create_cell_ptr(o_net ? id_CPE_L2T4 : id_CPE_DUMMY,
|
||||||
|
ctx->idf("%s$%s_cpe", cell->name.c_str(ctx), oPort.c_str(ctx)));
|
||||||
if (place) {
|
if (place) {
|
||||||
cpe_ramio->constr_children.push_back(cpe_half);
|
cpe_ramio->constr_children.push_back(cpe_half);
|
||||||
cpe_half->cluster = cell->cluster;
|
cpe_half->cluster = cell->cluster;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue