diff options
| author | David Shah <dave@ds0.me> | 2019-08-06 09:53:33 +0100 | 
|---|---|---|
| committer | David Shah <dave@ds0.me> | 2019-08-06 09:53:33 +0100 | 
| commit | 7126dacccd5f1f57c1ff937247e0c9b10f4588e2 (patch) | |
| tree | 3c979b0e48688b9bc3ba17ab843584858fdde5f3 | |
| parent | c9ba81ab50c79de43526436d4d6fda496dffa7b6 (diff) | |
| download | nextpnr-7126dacccd5f1f57c1ff937247e0c9b10f4588e2.tar.gz nextpnr-7126dacccd5f1f57c1ff937247e0c9b10f4588e2.tar.bz2 nextpnr-7126dacccd5f1f57c1ff937247e0c9b10f4588e2.zip | |
ecp5: Add a check for legacy parameter values
Signed-off-by: David Shah <dave@ds0.me>
| -rw-r--r-- | ecp5/pack.cc | 12 | 
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(); | 
