gowin: bugfix

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
This commit is contained in:
YRabbit 2023-03-22 18:57:14 +10:00 committed by myrtle
parent c52906e8bc
commit b36e8a3013
2 changed files with 3 additions and 2 deletions

View File

@ -420,7 +420,7 @@ void Arch::addBel(IdString name, IdString type, Loc loc, bool gb)
{ {
NPNR_ASSERT(bels.count(name) == 0); NPNR_ASSERT(bels.count(name) == 0);
NPNR_ASSERT(bel_by_loc.count(loc) == 0); NPNR_ASSERT(bel_by_loc.count(loc) == 0);
BelInfo &bi = bels.at(name); BelInfo &bi = bels[name];
bi.name = name; bi.name = name;
bi.type = type; bi.type = type;
bi.x = loc.x; bi.x = loc.x;

View File

@ -963,7 +963,8 @@ static void pack_iologic(Context *ctx)
delete_nets.insert(ci->ports.at(output).net->name); delete_nets.insert(ci->ports.at(output).net->name);
q0_dst->disconnectPort(id_I); q0_dst->disconnectPort(id_I);
ci->disconnectPort(output); ci->disconnectPort(output);
bool have_XXX = ctx->bels.at(ctx->getBelByNameStr(iob_bel->second.as_string())).pins.count(id_GW9C_ALWAYS_LOW1); bool have_XXX =
ctx->bels.at(ctx->getBelByNameStr(iob_bel->second.as_string())).pins.count(id_GW9C_ALWAYS_LOW1);
if (have_XXX) { if (have_XXX) {
q0_dst->disconnectPort(id_GW9C_ALWAYS_LOW1); q0_dst->disconnectPort(id_GW9C_ALWAYS_LOW1);
q0_dst->connectPort(id_GW9C_ALWAYS_LOW1, ctx->nets[ctx->id("$PACKER_VCC_NET")].get()); q0_dst->connectPort(id_GW9C_ALWAYS_LOW1, ctx->nets[ctx->id("$PACKER_VCC_NET")].get());