m-labs / misoc

The original high performance and small footprint system-on-chip based on Migen™
https://m-labs.hk
Other
305 stars 86 forks source link

SoCCore: Re-expose CSR address width parameter #126

Closed occheung closed 2 years ago

occheung commented 2 years ago

This patch is to revert the changes made to CSR address width calculation in 4f66420 for backward-compatibility. 4f66420 does automatic calculation of the required address width for the CSRs, assuming the CSR memory region always takes up 64KB. However, some targets (e.g. metlino in ARTIQ) needs a larger address space to support more CSR regions. Just as pre- 4f66420, assigning a larger csr_address_width can solve the issue.

If the effect of 4f66420 is desired, simply set csr_address_width=13 when passing cpu_bus_width=64 to SoCCore.