aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-08-18 19:25:19 +0200
committerGitHub <noreply@github.com>2018-08-18 19:25:19 +0200
commit26be6f9761bba9dff646c6b1d071b149bd26f950 (patch)
tree2d4f46e149cb7a96f91b801fd830458eea8f79ac /ice40
parent1e8e873c9fe4b0fdd69055b0251f9e71db3849c5 (diff)
parenteaf824ca73241014a280b1bd787d8f83e772dd05 (diff)
downloadnextpnr-26be6f9761bba9dff646c6b1d071b149bd26f950.tar.gz
nextpnr-26be6f9761bba9dff646c6b1d071b149bd26f950.tar.bz2
nextpnr-26be6f9761bba9dff646c6b1d071b149bd26f950.zip
Merge pull request #47 from YosysHQ/settings_propagate
Use settings for placer1 and router1
Diffstat (limited to 'ice40')
-rw-r--r--ice40/arch.cc13
-rw-r--r--ice40/arch.h2
-rw-r--r--ice40/pcf.cc2
-rw-r--r--ice40/project.cc4
4 files changed, 5 insertions, 16 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index 58789043..91dc5d66 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -602,18 +602,9 @@ bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay
// -----------------------------------------------------------------------
-bool Arch::place()
-{
- Placer1Cfg cfg;
- cfg.constraintWeight = placer_constraintWeight;
- return placer1(getCtx(), cfg);
-}
+bool Arch::place() { return placer1(getCtx(), Placer1Cfg(getCtx())); }
-bool Arch::route()
-{
- Router1Cfg cfg;
- return router1(getCtx(), cfg);
-}
+bool Arch::route() { return router1(getCtx(), Router1Cfg(getCtx())); }
// -----------------------------------------------------------------------
diff --git a/ice40/arch.h b/ice40/arch.h
index 7f61c376..871b25fb 100644
--- a/ice40/arch.h
+++ b/ice40/arch.h
@@ -839,8 +839,6 @@ struct Arch : BaseCtx
}
NPNR_ASSERT_FALSE("Expected PLL pin to share an output with an SB_IO D_IN_{0,1}");
}
-
- float placer_constraintWeight = 10;
};
void ice40DelayFuzzerMain(Context *ctx);
diff --git a/ice40/pcf.cc b/ice40/pcf.cc
index d9fc4e68..af5b3e17 100644
--- a/ice40/pcf.cc
+++ b/ice40/pcf.cc
@@ -66,7 +66,7 @@ bool apply_pcf(Context *ctx, std::string filename, std::istream &in)
log_error("unsupported pcf command '%s'\n", cmd.c_str());
}
}
- ctx->settings.emplace(ctx->id("project/input/pcf"), filename);
+ ctx->settings.emplace(ctx->id("input/pcf"), filename);
return true;
} catch (log_execution_error_exception) {
return false;
diff --git a/ice40/project.cc b/ice40/project.cc
index 8ca10e36..47c0903d 100644
--- a/ice40/project.cc
+++ b/ice40/project.cc
@@ -28,8 +28,8 @@ NEXTPNR_NAMESPACE_BEGIN
void ProjectHandler::saveArch(Context *ctx, pt::ptree &root, std::string path)
{
root.put("project.arch.package", ctx->archArgs().package);
- if (ctx->settings.find(ctx->id("project/input/pcf")) != ctx->settings.end()) {
- std::string fn = ctx->settings[ctx->id("project/input/pcf")];
+ if (ctx->settings.find(ctx->id("input/pcf")) != ctx->settings.end()) {
+ std::string fn = ctx->settings[ctx->id("input/pcf")];
root.put("project.input.pcf", make_relative(fn, path).string());
}
}