aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ecp5/synth_ecp5.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-05-05 06:49:36 -0700
committerGitHub <noreply@github.com>2020-05-05 06:49:36 -0700
commit5fa06e4894f13d82cf847f8d7b078c5b46a01737 (patch)
tree03167c4eff66112816defadc9bda3a766cab587d /techlibs/ecp5/synth_ecp5.cc
parent7a62ee57b4953a01637086d409a99b9779a7d6c9 (diff)
parente6b55e8b38d98e28ee53f7b470cef1bcc3b399f3 (diff)
downloadyosys-5fa06e4894f13d82cf847f8d7b078c5b46a01737.tar.gz
yosys-5fa06e4894f13d82cf847f8d7b078c5b46a01737.tar.bz2
yosys-5fa06e4894f13d82cf847f8d7b078c5b46a01737.zip
Merge pull request #2026 from YosysHQ/eddie/scratchpad_abc9_W
synth_ice40/ecp5/xilinx: allow abc9.W to be overridden via scratchpad
Diffstat (limited to 'techlibs/ecp5/synth_ecp5.cc')
-rw-r--r--techlibs/ecp5/synth_ecp5.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/techlibs/ecp5/synth_ecp5.cc b/techlibs/ecp5/synth_ecp5.cc
index ab740ea0d..b9b236a0c 100644
--- a/techlibs/ecp5/synth_ecp5.cc
+++ b/techlibs/ecp5/synth_ecp5.cc
@@ -30,6 +30,11 @@ struct SynthEcp5Pass : public ScriptPass
{
SynthEcp5Pass() : ScriptPass("synth_ecp5", "synthesis for ECP5 FPGAs") { }
+ void on_register() YS_OVERRIDE
+ {
+ RTLIL::constpad["synth_ecp5.abc9.W"] = "300";
+ }
+
void help() YS_OVERRIDE
{
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
@@ -324,6 +329,14 @@ struct SynthEcp5Pass : public ScriptPass
if (abc9) {
run("read_verilog -icells -lib -specify +/abc9_model.v +/ecp5/abc9_model.v");
+ std::string abc9_opts;
+ if (nowidelut)
+ abc9_opts += " -maxlut 4";
+ std::string k = "synth_ecp5.abc9.W";
+ if (active_design && active_design->scratchpad.count(k))
+ abc9_opts += stringf(" -W %s", active_design->scratchpad_get_string(k).c_str());
+ else
+ abc9_opts += stringf(" -W %s", RTLIL::constpad.at(k).c_str());
if (nowidelut)
run("abc9 -maxlut 4 -W 200");
else