mirror of
https://github.com/enjoy-digital/litedram.git
synced 2025-01-04 09:52:25 -05:00
core/crossbar: Fix cba_shifts when bank_byte_alignment is not defined.
This commit is contained in:
parent
facfad5a25
commit
100e6d9bc6
1 changed files with 6 additions and 1 deletions
|
@ -127,7 +127,12 @@ class LiteDRAMCrossbar(Module):
|
|||
nmasters = len(self.masters)
|
||||
|
||||
# Address mapping --------------------------------------------------------------------------
|
||||
cba_shifts = {"ROW_BANK_COL": max(controller.settings.geom.colbits - controller.address_align, log2_int(controller.settings.bank_byte_alignment //(controller.data_width // 8))) }
|
||||
cba_shifts = {
|
||||
"ROW_BANK_COL": max(
|
||||
controller.settings.geom.colbits - controller.address_align,
|
||||
log2_int(getattr(controller.settings, "bank_byte_alignment", 0) //(controller.data_width // 8))
|
||||
)
|
||||
}
|
||||
cba_shift = cba_shifts[controller.settings.address_mapping]
|
||||
m_ba = [m.get_bank_address(self.bank_bits, cba_shift)for m in self.masters]
|
||||
m_rca = [m.get_row_column_address(self.bank_bits, self.rca_bits, cba_shift) for m in self.masters]
|
||||
|
|
Loading…
Reference in a new issue