diff options
| author | Martin <hackfin@section5.ch> | 2020-04-02 14:25:00 +0200 | 
|---|---|---|
| committer | Martin <hackfin@section5.ch> | 2020-04-02 14:25:00 +0200 | 
| commit | 707289c8d60161f9544a75e04166fefc9f656999 (patch) | |
| tree | 1ee9da57c793de6a34e2998bf4ae6b54fb7c58b9 | |
| parent | 98e2f9ea8171bfb8cd04c74c4807dd21c1d18e85 (diff) | |
| download | nextpnr-707289c8d60161f9544a75e04166fefc9f656999.tar.gz nextpnr-707289c8d60161f9544a75e04166fefc9f656999.tar.bz2 nextpnr-707289c8d60161f9544a75e04166fefc9f656999.zip | |
Enum/int compatibility for EHXPLLL parameters
- Lattice component EHXPLLL parameter compatibility, allowing to
  pass an int parameter for the enum (as expected by trellis tile)
  e.g. CLKOP_TRIM_DELAY : integer := 0;
| -rw-r--r-- | ecp5/bitstream.cc | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc index fd3de4ab..620add54 100644 --- a/ecp5/bitstream.cc +++ b/ecp5/bitstream.cc @@ -1253,9 +1253,14 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex              tg.config.add_enum("FEEDBK_PATH", str_or_default(ci->params, ctx->id("FEEDBK_PATH"), "CLKOP"));              tg.config.add_enum("CLKOP_TRIM_POL", str_or_default(ci->params, ctx->id("CLKOP_TRIM_POL"), "RISING")); -            tg.config.add_enum("CLKOP_TRIM_DELAY", str_or_default(ci->params, ctx->id("CLKOP_TRIM_DELAY"), "0")); + +            tg.config.add_enum("CLKOP_TRIM_DELAY", +                               intstr_or_default(ci->params, ctx->id("CLKOP_TRIM_DELAY"), "0")); +              tg.config.add_enum("CLKOS_TRIM_POL", str_or_default(ci->params, ctx->id("CLKOS_TRIM_POL"), "RISING")); -            tg.config.add_enum("CLKOS_TRIM_DELAY", str_or_default(ci->params, ctx->id("CLKOS_TRIM_DELAY"), "0")); + +            tg.config.add_enum("CLKOS_TRIM_DELAY", +                               intstr_or_default(ci->params, ctx->id("CLKOS_TRIM_DELAY"), "0"));              tg.config.add_enum("OUTDIVIDER_MUXA", str_or_default(ci->params, ctx->id("OUTDIVIDER_MUXA"),                                                                   get_net_or_empty(ci, id_CLKOP) ? "DIVA" : "REFCLK")); | 
