integration/soc/alloc_region: Fix alignment of Origin on Size (Thanks @sensille).
This commit is contained in:
parent
8b14e64906
commit
5760c5ba1e
|
@ -259,7 +259,7 @@ class SoCBusHandler(LiteXModule):
|
||||||
while (origin + size) < (search_region.origin + search_region.size_pow2):
|
while (origin + size) < (search_region.origin + search_region.size_pow2):
|
||||||
# Align Origin on Size.
|
# Align Origin on Size.
|
||||||
if (origin%size):
|
if (origin%size):
|
||||||
origin += (origin - origin%size)
|
origin += (size - origin%size)
|
||||||
continue
|
continue
|
||||||
# Create a Candidate.
|
# Create a Candidate.
|
||||||
candidate = SoCRegion(origin=origin, size=size, cached=cached)
|
candidate = SoCRegion(origin=origin, size=size, cached=cached)
|
||||||
|
|
Loading…
Reference in New Issue