Register map
EnumValue
- class corsair.EnumValue(name='enum', value=0, description='Enumerated value', **args)[source]
Enumerated value.
- Parameters:
name (str) – Enum name
value (int) – Enum value
description (str) – Enum description
- property description
Description of the enum.
- property name
Name of the enum.
- property value
Value of the enum.
BitField
- class corsair.BitField(name='val', description='Value of the register', reset=0, width=1, lsb=0, access='rw', hardware='n', **args)[source]
Bit field.
- Parameters:
name (str) – Bit field name
description (str) – Bit field description
reset (int) – Bit field reset vaue
width (int) – Bit field width vaue
lsb (int) – Bit field LSB vaue
access (str) – Bit field access mode
hardware (str) – Bit field hardware options
- property access
Access mode for the bitfield.
- add_enums(new_enums)[source]
Add enum or list of enums.
Enums are automatically sorted and stored in the ascending order of value attributes.
- property bits
Create list with all positions of the bits represented by the bit field.
- property byte_strobes
Dictionary with LSB and MSB values for the every byte in the write data bus.
- property description
Description of the bitfield.
- property enum_names
List with all enum names.
- property enums
List with enum objects.
- property hardware
Hardware mode for the bitfield.
- property lsb
LSB value of the bitfield.
- property mask
Bit mask for the field.
- property msb
Position of most significant bit (MSB) of the field.
- property name
Name of the bit field.
- property reset
Inital value of the bitfield.
- property width
Width value of the bitfield.
Register
- class corsair.Register(name='csr0', description='Control and status register 0', address=None, **args)[source]
Control and status register.
- Parameters:
name (str) – Bit field name
description (str) – Bit field description
address (int, None) – Register address
- property access
Register access mode, based on bitfields.
- add_bitfields(new_bitfields)[source]
Add bit field or list of bit feilds.
Bit fields are automatically sorted and stored in the ascending order of msb attributes.
- property address
Address of the register.
- property bitfield_names
List with all bit field names.
- property bitfields
List with bit field objects.
- property description
Description of the register.
- property name
Name of the register.
- property reset
Reset value of the refister after reset.