Expand description
LiteX register abstraction types
LiteX is able to generate vastly different SoC with different buswidths, CSR widths and configurations
This module defines interfaces very similar to tock_registers
(and based on tock_registers
) for various register- and
bus-width configurations
Essentially, the bus data width (default 32 bit), the CSR data width, the CSR byte ordering and naturally the desired register width can change. This module defines generic traits for accessing registers and register abstraction structs.
The different register types of a specific SoC configuration are
combined using a
LiteXSoCRegisterConfiguration
structure, which can be used to adapt the register interfaces of
peripherals to the different configurations.
§Naming Scheme
The generated register abstractions follow the naming scheme
<AccessTypes><RegisterWidth>C<CSRDataWidth>B<BaseWidth>
where AccessType
in { ReadOnly, WriteOnly, ReadWrite }
,
RegisterWidth
in { 8, 16, 32, 64 }
, CSRDataWidth
in { 8, 32 }
, BaseWidth
in { 32 }
.
Macros§
- register_
bitfields - Define register types and fields.
Structs§
- Read
Only8 C8B32 - Read
Only8 C32B32 - Read
Only16 C8B32 - Read
Only16 C32B32 - Read
Only32 C8B32 - Read
Only32 C32B32 - Read
Only64 C8B32 - Read
Only64 C32B32 - Read
RegWrapper - Workaround-wrapper for readable LiteX registers
- Read
Write8 C8B32 - Read
Write8 C32B32 - Read
Write16 C8B32 - Read
Write16 C32B32 - Read
Write32 C8B32 - Read
Write32 C32B32 - Read
Write64 C8B32 - Read
Write64 C32B32 - Read
Write RegWrapper - Workaround-wrapper for read- and writable LiteX registers
- Write
Only8 C8B32 - Write
Only8 C32B32 - Write
Only16 C8B32 - Write
Only16 C32B32 - Write
Only32 C8B32 - Write
Only32 C32B32 - Write
Only64 C8B32 - Write
Only64 C32B32 - Write
RegWrapper - Workaround-wrapper for writable LiteX registers
Enums§
- LiteX
SoCRegisters C8B32 - Collection of LiteX register abstraction types
- LiteX
SoCRegisters C32B32 - Collection of LiteX register abstraction types
Traits§
- Base
Readable Register - Trait to be implemented by custom register structs that support reading the current value
- Base
Writeable Register - Trait to be implemented by custom register structs that support writing to them
- LiteX
SoCRegister Configuration - Register abstraction types collection
- Read
- Readable register
- Read
Write - Readable and writable register
- UInt
Like - Extension of the
tock_registers
UIntLike
trait. - Write
- Writeable register