Module litex_registers

Source
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§

ReadOnly8C8B32
ReadOnly8C32B32
ReadOnly16C8B32
ReadOnly16C32B32
ReadOnly32C8B32
ReadOnly32C32B32
ReadOnly64C8B32
ReadOnly64C32B32
ReadRegWrapper
Workaround-wrapper for readable LiteX registers
ReadWrite8C8B32
ReadWrite8C32B32
ReadWrite16C8B32
ReadWrite16C32B32
ReadWrite32C8B32
ReadWrite32C32B32
ReadWrite64C8B32
ReadWrite64C32B32
ReadWriteRegWrapper
Workaround-wrapper for read- and writable LiteX registers
WriteOnly8C8B32
WriteOnly8C32B32
WriteOnly16C8B32
WriteOnly16C32B32
WriteOnly32C8B32
WriteOnly32C32B32
WriteOnly64C8B32
WriteOnly64C32B32
WriteRegWrapper
Workaround-wrapper for writable LiteX registers

Enums§

LiteXSoCRegistersC8B32
Collection of LiteX register abstraction types
LiteXSoCRegistersC32B32
Collection of LiteX register abstraction types

Traits§

BaseReadableRegister
Trait to be implemented by custom register structs that support reading the current value
BaseWriteableRegister
Trait to be implemented by custom register structs that support writing to them
LiteXSoCRegisterConfiguration
Register abstraction types collection
Read
Readable register
ReadWrite
Readable and writable register
UIntLike
Extension of the tock_registers UIntLike trait.
Write
Writeable register