From: Jean-François Nguyen Date: Tue, 18 May 2021 17:16:27 +0000 (+0200) Subject: periph.base: use bridge granularity as CSR bus data width. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=810e40da6345a0e8659bd951d16cc5f99ee8bfdd;p=lambdasoc.git periph.base: use bridge granularity as CSR bus data width. --- diff --git a/lambdasoc/periph/base.py b/lambdasoc/periph/base.py index 84c3452..b023ad5 100644 --- a/lambdasoc/periph/base.py +++ b/lambdasoc/periph/base.py @@ -313,7 +313,7 @@ class PeripheralBridge(Elaboratable): for bank, bank_addr, bank_alignment in periph.iter_csr_banks(): if bank_alignment is None: bank_alignment = alignment - csr_mux = csr.Multiplexer(addr_width=1, data_width=8, alignment=bank_alignment) + csr_mux = csr.Multiplexer(addr_width=1, data_width=granularity, alignment=bank_alignment) for elem, elem_addr, elem_alignment in bank.iter_csr_regs(): if elem_alignment is None: elem_alignment = alignment