aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ecp5/main.cc9
-rw-r--r--gowin/arch.cc13
-rw-r--r--gowin/gfx.cc2
-rw-r--r--gowin/pack.cc14
4 files changed, 19 insertions, 19 deletions
diff --git a/ecp5/main.cc b/ecp5/main.cc
index f143d583..6abea4a9 100644
--- a/ecp5/main.cc
+++ b/ecp5/main.cc
@@ -111,11 +111,10 @@ void ECP5CommandHandler::customBitstream(Context *ctx)
log_error("bitstream generation is not available in out-of-context mode (use --write to create a post-PnR JSON "
"design)\n");
- std::string textcfg;
- if (vm.count("textcfg"))
- textcfg = vm["textcfg"].as<std::string>();
-
- write_bitstream(ctx, basecfg, textcfg);
+ if (vm.count("textcfg")) {
+ std::string textcfg = vm["textcfg"].as<std::string>();
+ write_bitstream(ctx, basecfg, textcfg);
+ }
}
static std::string speedString(ArchArgs::SpeedGrade speed)
diff --git a/gowin/arch.cc b/gowin/arch.cc
index 04cf7af5..461b64c8 100644
--- a/gowin/arch.cc
+++ b/gowin/arch.cc
@@ -2051,19 +2051,6 @@ void Arch::fix_pll_nets(Context *ctx)
// This is general routing through CLK2 pip
ci->setParam(id_FBSEL, Property("CLKFB0"));
} while (0);
-
- // resets
- Property pr_enable("ENABLE"), pr_disable("DISABLE");
- NetInfo *net = ci->getPort(id_RESET);
- ci->setParam(id_RSTEN, pr_enable);
- if (!port_used(ci, id_RESET) || net->name == id("$PACKER_VCC_NET") || net->name == id("$PACKER_GND_NET")) {
- ci->setParam(id_RSTEN, pr_disable);
- }
- ci->setParam(id_PWDEN, pr_enable);
- net = ci->getPort(id_RESET_P);
- if (!port_used(ci, id_RESET_P) || net->name == id("$PACKER_VCC_NET") || net->name == id("$PACKER_GND_NET")) {
- ci->setParam(id_PWDEN, pr_disable);
- }
}
}
diff --git a/gowin/gfx.cc b/gowin/gfx.cc
index 048ae62e..5abb1399 100644
--- a/gowin/gfx.cc
+++ b/gowin/gfx.cc
@@ -4971,7 +4971,7 @@ void gfxSetPipDefaultDecal(Arch *arch, PipInfo &pip)
// clock?
if (dst_loc_id.in(id_GT00, id_GT10)) {
WireInfo &wi = arch->wire_info(pip.srcWire);
- if (wi.type.str(arch).substr(0, 3) != "UNK") {
+ if (wi.type.str(arch).substr(0, 5) == "SPINE") {
// create pip
GraphicElement el;
el.type = GraphicElement::TYPE_LOCAL_LINE;
diff --git a/gowin/pack.cc b/gowin/pack.cc
index c36a4757..e1119dde 100644
--- a/gowin/pack.cc
+++ b/gowin/pack.cc
@@ -1026,6 +1026,20 @@ static void pack_plls(Context *ctx)
for (int i = 0; i < 4; ++i) {
ci->setParam(ports[i][1], port_used(ci, ports[i][0]) ? pr_enable : pr_disable);
}
+ // resets
+ NetInfo *net = ci->getPort(id_RESET);
+ ci->setParam(id_RSTEN, pr_enable);
+ if (!port_used(ci, id_RESET) || net->name == ctx->id("$PACKER_VCC_NET") ||
+ net->name == ctx->id("$PACKER_GND_NET")) {
+ ci->setParam(id_RSTEN, pr_disable);
+ }
+ ci->setParam(id_PWDEN, pr_enable);
+ net = ci->getPort(id_RESET_P);
+ if (!port_used(ci, id_RESET_P) || net->name == ctx->id("$PACKER_VCC_NET") ||
+ net->name == ctx->id("$PACKER_GND_NET")) {
+ ci->setParam(id_PWDEN, pr_disable);
+ }
+
// B half
std::unique_ptr<CellInfo> cell = create_generic_cell(ctx, id_RPLLB, ci->name.str(ctx) + "$rpllb");
reconnect_rpllb(ctx, ci, cell.get());