integration/soc/alloc_region: Fix alignment of Origin on Size (Thanks @sensille).

This commit is contained in:
Florent Kermarrec 2023-01-16 09:19:50 +01:00
parent 8b14e64906
commit 5760c5ba1e
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ class SoCBusHandler(LiteXModule):
while (origin + size) < (search_region.origin + search_region.size_pow2):
# Align Origin on Size.
if (origin%size):
origin += (origin - origin%size)
origin += (size - origin%size)
continue
# Create a Candidate.
candidate = SoCRegion(origin=origin, size=size, cached=cached)