diff options
author | David Shah <davey1576@gmail.com> | 2018-10-01 18:15:11 +0100 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-10-01 18:15:11 +0100 |
commit | 2c96d4770df064eb02050b0f94de5b45d8724b4c (patch) | |
tree | 54c56a79d0e938caa9bed089f0447b48096fbe23 /ecp5 | |
parent | 3dfc5b864a66ba1bfc286de884bd46a859e4306d (diff) | |
download | nextpnr-2c96d4770df064eb02050b0f94de5b45d8724b4c.tar.gz nextpnr-2c96d4770df064eb02050b0f94de5b45d8724b4c.tar.bz2 nextpnr-2c96d4770df064eb02050b0f94de5b45d8724b4c.zip |
ecp5: Fix DRAM initialisation
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5')
-rw-r--r-- | ecp5/cells.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ecp5/cells.cc b/ecp5/cells.cc index ba2d511f..815ae228 100644 --- a/ecp5/cells.cc +++ b/ecp5/cells.cc @@ -261,7 +261,7 @@ static unsigned get_dram_init(const Context *ctx, const CellInfo *ram, int bit) for (int i = 0; i < 16; i++) { char c = idata.at(63 - (4 * i + bit)); if (c == '1') - value |= (i << i); + value |= (1 << i); else NPNR_ASSERT(c == '0' || c == 'x'); } @@ -275,7 +275,7 @@ void dram_to_ram_slice(Context *ctx, CellInfo *ram, CellInfo *lc, CellInfo *ramw lc->params[ctx->id("WCKMUX")] = str_or_default(ram->params, ctx->id("WCKMUX"), "WCK"); unsigned permuted_init0 = 0, permuted_init1 = 0; - unsigned init0 = get_dram_init(ctx, ramw, index * 2), init1 = get_dram_init(ctx, ramw, index * 2 + 1); + unsigned init0 = get_dram_init(ctx, ram, index * 2), init1 = get_dram_init(ctx, ram, index * 2 + 1); for (int i = 0; i < 16; i++) { int permuted_addr = 0; |