soc_core: csr_alignment assertions
authorGabriel Somlo <gsomlo@gmail.com>
Wed, 18 Dec 2019 16:24:11 +0000 (11:24 -0500)
committerGabriel Somlo <gsomlo@gmail.com>
Sat, 21 Dec 2019 18:00:40 +0000 (13:00 -0500)
commit585b50b2922c45722a0954848080d161a4122725
treebae3d210a7291197269f0b34c5e8e0e8a035dc99
parentb6818c205e2de4d810909eeb20b926af686074ba
soc_core: csr_alignment assertions

Enforce the condition that csr_alignment be either 32 or 64 when
requested explicitly when initializing SoCCore().

Additionally, if a CPU is specified, enforce that csr_alignment be
equal to the native CPU word size (currently either 32 or 64), and
warn the caller if an alignment value *higher* than the CPU native
word size was explicitly requested.

In conclusion, if a CPU is specified, then csr_alignment should be
assumed to equal 8*sizeof(unsigned long).

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
litex/soc/integration/soc_core.py