gowin: Himbaechel. Diff io BUGFIX.

Fixed incorrect use of attributes instead of parameters.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
This commit is contained in:
YRabbit 2023-11-13 10:44:53 +10:00 committed by myrtle
parent 506d5f9422
commit 0106c3d299

View File

@ -381,7 +381,7 @@ struct GowinPacker
} }
// mark IOB as used by IOLOGIC // mark IOB as used by IOLOGIC
out_iob->setParam(id_IOLOGIC_IOB, 1); out_iob->setParam(id_IOLOGIC_IOB, 1);
check_iologic_placement(ci, ctx->getBelLocation(iob_bel), out_iob->attrs.count(id_DIFF_TYPE)); check_iologic_placement(ci, ctx->getBelLocation(iob_bel), out_iob->params.count(id_DIFF_TYPE));
if (!ctx->checkBelAvail(l_bel)) { if (!ctx->checkBelAvail(l_bel)) {
log_error("Can't place %s at %s because it's already taken by %s\n", ctx->nameOf(&ci), log_error("Can't place %s at %s because it's already taken by %s\n", ctx->nameOf(&ci),
@ -438,7 +438,7 @@ struct GowinPacker
} }
// mark IOB as used by IOLOGIC // mark IOB as used by IOLOGIC
out_iob->setParam(id_IOLOGIC_IOB, 1); out_iob->setParam(id_IOLOGIC_IOB, 1);
check_iologic_placement(ci, ctx->getBelLocation(iob_bel), out_iob->attrs.count(id_DIFF_TYPE)); check_iologic_placement(ci, ctx->getBelLocation(iob_bel), out_iob->params.count(id_DIFF_TYPE));
if (!ctx->checkBelAvail(l_bel)) { if (!ctx->checkBelAvail(l_bel)) {
log_error("Can't place %s at %s because it's already taken by %s\n", ctx->nameOf(&ci), log_error("Can't place %s at %s because it's already taken by %s\n", ctx->nameOf(&ci),
@ -483,7 +483,7 @@ struct GowinPacker
return ctx->getBelByLocation(gwu.get_pair_iologic_bel(ctx->getBelLocation(ci.bel))); return ctx->getBelByLocation(gwu.get_pair_iologic_bel(ctx->getBelLocation(ci.bel)));
} }
bool is_diff_io(BelId bel) { return ctx->getBoundBelCell(bel)->attrs.count(id_DIFF_TYPE) != 0; } bool is_diff_io(BelId bel) { return ctx->getBoundBelCell(bel)->params.count(id_DIFF_TYPE) != 0; }
CellInfo *create_aux_iologic_cell(CellInfo &ci, IdString mode, bool io16 = false, int idx = 0) CellInfo *create_aux_iologic_cell(CellInfo &ci, IdString mode, bool io16 = false, int idx = 0)
{ {
@ -558,7 +558,7 @@ struct GowinPacker
} }
// mark IOB as used by IOLOGIC // mark IOB as used by IOLOGIC
in_iob->setParam(id_IOLOGIC_IOB, 1); in_iob->setParam(id_IOLOGIC_IOB, 1);
check_iologic_placement(ci, ctx->getBelLocation(iob_bel), in_iob->attrs.count(id_DIFF_TYPE)); check_iologic_placement(ci, ctx->getBelLocation(iob_bel), in_iob->params.count(id_DIFF_TYPE));
if (!ctx->checkBelAvail(l_bel)) { if (!ctx->checkBelAvail(l_bel)) {
log_error("Can't place %s at %s because it's already taken by %s\n", ctx->nameOf(&ci), log_error("Can't place %s at %s because it's already taken by %s\n", ctx->nameOf(&ci),
@ -669,7 +669,7 @@ struct GowinPacker
if (aux_offset.x == 0 && aux_offset.y == 0) { if (aux_offset.x == 0 && aux_offset.y == 0) {
log_error("OSER16 %s can not be placed at %s\n", ctx->nameOf(&ci), ctx->nameOfBel(iob_bel)); log_error("OSER16 %s can not be placed at %s\n", ctx->nameOf(&ci), ctx->nameOfBel(iob_bel));
} }
check_io16_placement(ci, iob_loc, aux_offset, out_iob->attrs.count(id_DIFF_TYPE)); check_io16_placement(ci, iob_loc, aux_offset, out_iob->params.count(id_DIFF_TYPE));
BelId main_bel = ctx->getBelByLocation(Loc(iob_loc.x, iob_loc.y, BelZ::OSER16_Z)); BelId main_bel = ctx->getBelByLocation(Loc(iob_loc.x, iob_loc.y, BelZ::OSER16_Z));
ctx->bindBel(main_bel, &ci, PlaceStrength::STRENGTH_LOCKED); ctx->bindBel(main_bel, &ci, PlaceStrength::STRENGTH_LOCKED);
@ -743,7 +743,7 @@ struct GowinPacker
if (aux_offset.x == 0 && aux_offset.y == 0) { if (aux_offset.x == 0 && aux_offset.y == 0) {
log_error("IDES16 %s can not be placed at %s\n", ctx->nameOf(&ci), ctx->nameOfBel(iob_bel)); log_error("IDES16 %s can not be placed at %s\n", ctx->nameOf(&ci), ctx->nameOfBel(iob_bel));
} }
check_io16_placement(ci, iob_loc, aux_offset, in_iob->attrs.count(id_DIFF_TYPE)); check_io16_placement(ci, iob_loc, aux_offset, in_iob->params.count(id_DIFF_TYPE));
BelId main_bel = ctx->getBelByLocation(Loc(iob_loc.x, iob_loc.y, BelZ::IDES16_Z)); BelId main_bel = ctx->getBelByLocation(Loc(iob_loc.x, iob_loc.y, BelZ::IDES16_Z));
ctx->bindBel(main_bel, &ci, PlaceStrength::STRENGTH_LOCKED); ctx->bindBel(main_bel, &ci, PlaceStrength::STRENGTH_LOCKED);