soc_core: optimize mem_decoder
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 22 Jul 2019 06:53:18 +0000 (08:53 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 22 Jul 2019 06:53:54 +0000 (08:53 +0200)
commit41eb21b343be01c7fcf8e37345a27df82473fc2c
tree71e72497ab41a2893c0a1d40997d7ac126bc23b1
parent0eff65bb3124f569f0d7be827b7fe543c4d3ad5b
soc_core: optimize mem_decoder

Non-optimized version was tested on 7-series and was additional resource usage
was not noticeable. This does not seems to be the case on iCE40 (see #220), so
hand optimize it. On 256MB aligned addresses, it should be equivalent to the
old decoder used by previously in LiteX.

The only requirement is that to have address aligned on size, which was already
the case. An assertion will trigger it this condition is not respected.
litex/soc/integration/soc_core.py