aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/ice40_unlut.cc
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2019-07-16 23:57:15 +0200
committerSylvain Munaut <tnt@246tNt.com>2019-07-16 23:57:15 +0200
commitf28e38de9994151ea4e22608441dbc9e116d7b8c (patch)
treea83315c169a7802f93e5021ef3cb51595ac64aa3 /techlibs/ice40/ice40_unlut.cc
parent5939b5d636f80d4f9345f5b8d0247332d533b68c (diff)
downloadyosys-f28e38de9994151ea4e22608441dbc9e116d7b8c.tar.gz
yosys-f28e38de9994151ea4e22608441dbc9e116d7b8c.tar.bz2
yosys-f28e38de9994151ea4e22608441dbc9e116d7b8c.zip
ice40: Adapt the relut process passes to the new $lut <=> SB_LUT4 port map
The new mapping introduced in 437fec0d88b4a2ad172edf0d1a861a38845f3b1d needed matching adaptation when converting and optimizing LUTs during the relut process Fixes #1187 (Diagnosis of the issue by @daveshah1 on IRC) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'techlibs/ice40/ice40_unlut.cc')
-rw-r--r--techlibs/ice40/ice40_unlut.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/techlibs/ice40/ice40_unlut.cc b/techlibs/ice40/ice40_unlut.cc
index d16e6e6a3..f3f70ac1f 100644
--- a/techlibs/ice40/ice40_unlut.cc
+++ b/techlibs/ice40/ice40_unlut.cc
@@ -56,10 +56,10 @@ static void run_ice40_unlut(Module *module)
cell->unsetParam("\\LUT_INIT");
cell->setPort("\\A", SigSpec({
- get_bit_or_zero(cell->getPort("\\I3")),
- get_bit_or_zero(cell->getPort("\\I2")),
+ get_bit_or_zero(cell->getPort("\\I0")),
get_bit_or_zero(cell->getPort("\\I1")),
- get_bit_or_zero(cell->getPort("\\I0"))
+ get_bit_or_zero(cell->getPort("\\I2")),
+ get_bit_or_zero(cell->getPort("\\I3"))
}));
cell->setPort("\\Y", cell->getPort("\\O")[0]);
cell->unsetPort("\\I0");