gowin: Consider the peculiarity of GW1BR-9C
The GW1NR-9C chip ODDR implementation differs from all other supported chips by two suspicious inputs. Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
This commit is contained in:
parent
374ac6d162
commit
be8d3fd74d
@ -1158,6 +1158,21 @@ Arch::Arch(ArchArgs args) : args(args)
|
|||||||
snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
|
snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
|
||||||
addBelInput(belname, id_CLK, id(buf));
|
addBelInput(belname, id_CLK, id(buf));
|
||||||
|
|
||||||
|
const PairPOD *xxx_port = pairLookup(bel->ports.get(), bel->num_ports, ID_XXX_VSS);
|
||||||
|
if (xxx_port != nullptr) {
|
||||||
|
ddr_has_extra_inputs = true;
|
||||||
|
portname = IdString(xxx_port->src_id);
|
||||||
|
snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
|
||||||
|
addBelInput(belname, id_XXX_VSS, id(buf));
|
||||||
|
}
|
||||||
|
xxx_port = pairLookup(bel->ports.get(), bel->num_ports, ID_XXX_VCC);
|
||||||
|
if (xxx_port != nullptr) {
|
||||||
|
ddr_has_extra_inputs = true;
|
||||||
|
portname = IdString(xxx_port->src_id);
|
||||||
|
snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
|
||||||
|
addBelInput(belname, id_XXX_VCC, id(buf));
|
||||||
|
}
|
||||||
|
|
||||||
if (oddrc) {
|
if (oddrc) {
|
||||||
portname = IdString(pairLookup(bel->ports.get(), bel->num_ports, ID_CE)->src_id);
|
portname = IdString(pairLookup(bel->ports.get(), bel->num_ports, ID_CE)->src_id);
|
||||||
snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
|
snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
|
||||||
|
@ -470,6 +470,9 @@ struct Arch : BaseArch<ArchRanges>
|
|||||||
void updateClockSpinesCache(IdString spine_id, IdString wire_id);
|
void updateClockSpinesCache(IdString spine_id, IdString wire_id);
|
||||||
void fixClockSpineDecals(void);
|
void fixClockSpineDecals(void);
|
||||||
|
|
||||||
|
// XXX GW1N-9C DDR quirk
|
||||||
|
bool ddr_has_extra_inputs = false;
|
||||||
|
|
||||||
// Permissible combinations of modes in a single slice
|
// Permissible combinations of modes in a single slice
|
||||||
std::map<const IdString, IdString> dff_comp_mode;
|
std::map<const IdString, IdString> dff_comp_mode;
|
||||||
};
|
};
|
||||||
|
@ -681,6 +681,8 @@ X(IOBJS)
|
|||||||
|
|
||||||
// IOLOGIC
|
// IOLOGIC
|
||||||
X(TX)
|
X(TX)
|
||||||
|
X(XXX_VSS)
|
||||||
|
X(XXX_VCC)
|
||||||
X(OBUF_TYPE)
|
X(OBUF_TYPE)
|
||||||
X(SBUF)
|
X(SBUF)
|
||||||
X(DBUF)
|
X(DBUF)
|
||||||
|
@ -798,6 +798,13 @@ static void pack_iologic(Context *ctx)
|
|||||||
ci->attrs[id_IOBUF] = 1;
|
ci->attrs[id_IOBUF] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if have XXX_ inputs connect them
|
||||||
|
if (ctx->ddr_has_extra_inputs) {
|
||||||
|
ci->addInput(id_XXX_VSS);
|
||||||
|
ci->connectPort(id_XXX_VSS, ctx->nets[ctx->id("$PACKER_GND_NET")].get());
|
||||||
|
ci->addInput(id_XXX_VCC);
|
||||||
|
ci->connectPort(id_XXX_VCC, ctx->nets[ctx->id("$PACKER_VCC_NET")].get());
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user