aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/pack.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc
index c21a5e3c..a9416f32 100644
--- a/ecp5/pack.cc
+++ b/ecp5/pack.cc
@@ -2384,9 +2384,21 @@ class Ecp5Packer
}
}
+ void prepack_checks()
+ {
+ // Check for legacy-style JSON (use CEMUX as a clue) and error out, avoiding a confusing assertion failure
+ // later
+ for (auto cell : sorted(ctx->cells)) {
+ if (is_ff(ctx, cell.second) && cell.second->params.count(ctx->id("CEMUX")) &&
+ !cell.second->params[ctx->id("CEMUX")].is_string)
+ log_error("Found netlist using legacy-style JSON parameter values, please update your Yosys.\n");
+ }
+ }
+
public:
void pack()
{
+ prepack_checks();
pack_io();
pack_dqsbuf();
pack_iologic();