Register Model Structure#
The Register Model is built from the following classes
Base Classes#
- class peakrdl_python.lib.base.Node(*, address: int, logger_handle: str, inst_name: str, parent: Node | NodeArray | None)#
base class of for all types with an address i.e. not fields
Note
It is not expected that this class will be instantiated under normal circumstances however, it is useful for type checking
- property address: int#
address of the node
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- get_child_by_system_rdl_name(name: Any) Any#
returns a child node by its systemRDL name
- Parameters:
name – name of the node in the systemRDL
Returns: Node
- property inst_name: str#
systemRDL name of the instance in the parent
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- abstract property size: int#
Total Number of bytes of address the node occupies
- abstract property systemrdl_python_child_name_map: dict[str, str]#
In some cases systemRDL names need to be converted make them python safe, this dictionary is used to map the original systemRDL names to the names of the python attributes of this class
Returns: dictionary whose key is the systemRDL names and value it the property name
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- class peakrdl_python.lib.base.NodeArray(*, logger_handle: str, inst_name: str, parent: Node, address: int, stride: int, dimensions: tuple[int, ...], elements: tuple[tuple[tuple[int, ...], ...], tuple[NodeArrayElementType, ...]] | None = None)#
base class of for all array types
- property address: int#
address of the node
- count(value) integer -- return number of occurrences of value#
- property dimensions: tuple[int, ...] | tuple[int]#
Dimensions of the array
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- index(value[, start[, stop]]) integer -- return first index of value.#
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- property inst_name: str#
systemRDL name of the instance in the parent
- items() Iterator[tuple[tuple[int, ...], NodeArrayElementType]]#
iterate through all the items in an array but also return the index of the array
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property size: int#
Total Number of bytes of address the array occupies
- property stride: int#
address stride of the array
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
Address Maps#
- class peakrdl_python.lib.sections.AddressMap(*, callbacks: NormalCallbackSet | NormalCallbackSetLegacy | None, address: int, logger_handle: str, inst_name: str, parent: AddressMap | None)#
base class of address map wrappers
Note
It is not expected that this class will be instantiated under normal circumstances however, it is useful for type checking
- property address: int#
address of the node
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- get_child_by_system_rdl_name(name: Any) Any#
returns a child node by its systemRDL name
- Parameters:
name – name of the node in the systemRDL
Returns: Node
- get_children(unroll: bool = False) Iterator[Node | NodeArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_memories(unroll: bool = False) Iterator['Memory' | 'MemoryArray']#
generator that produces all the Memory children of this node
- Parameters:
unroll – Whether to unroll child array or not
Returns:
- get_readable_registers(unroll: bool = False) Iterator[ReadableRegister | ReadableRegisterArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_registers(unroll: bool = False) Iterator[Reg | RegArray]#
generator that produces all the registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_sections(unroll: bool = False) Iterator[AddressMap | RegFile | AddressMapArray | RegFileArray]#
generator that produces all the AddressMap and RegFile children of this node
- Parameters:
unroll – Whether to unroll child array or not
Returns:
- get_writable_registers(unroll: bool = False) Iterator[WritableRegister | WriteableRegisterArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- property inst_name: str#
systemRDL name of the instance in the parent
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- abstract property size: int#
Total Number of bytes of address the node occupies
- abstract property systemrdl_python_child_name_map: dict[str, str]#
In some cases systemRDL names need to be converted make them python safe, this dictionary is used to map the original systemRDL names to the names of the python attributes of this class
Returns: dictionary whose key is the systemRDL names and value it the property name
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- class peakrdl_python.lib.sections.AddressMapArray(*, logger_handle: str, inst_name: str, parent: AddressMap, address: int, stride: int, dimensions: tuple[int, ...], elements: tuple[tuple[tuple[int, ...], ...], tuple[AddressMap, ...]] | None = None)#
base class for a array of address maps
- property address: int#
address of the node
- count(value) integer -- return number of occurrences of value#
- property dimensions: tuple[int, ...] | tuple[int]#
Dimensions of the array
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- index(value[, start[, stop]]) integer -- return first index of value.#
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- property inst_name: str#
systemRDL name of the instance in the parent
- items() Iterator[tuple[tuple[int, ...], NodeArrayElementType]]#
iterate through all the items in an array but also return the index of the array
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property size: int#
Total Number of bytes of address the array occupies
- property stride: int#
address stride of the array
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
Register Files#
- class peakrdl_python.lib.sections.RegFile(*, address: int, logger_handle: str, inst_name: str, parent: AddressMap | RegFile)#
base class of register file wrappers
Note
It is not expected that this class will be instantiated under normal circumstances however, it is useful for type checking
- property address: int#
address of the node
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- get_child_by_system_rdl_name(name: Any) Any#
returns a child node by its systemRDL name
- Parameters:
name – name of the node in the systemRDL
Returns: Node
- get_children(unroll: bool = False) Iterator[Node | NodeArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_readable_registers(unroll: bool = False) Iterator[ReadableRegister | ReadableRegisterArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_registers(unroll: bool = False) Iterator[Reg | RegArray]#
generator that produces all the registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_sections(unroll: bool = False) Iterator[RegFile | RegFileArray]#
generator that produces all the RegFile children of this node
- Parameters:
unroll – Whether to unroll child array or not
Returns:
- get_writable_registers(unroll: bool = False) Iterator[WritableRegister | WriteableRegisterArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- property inst_name: str#
systemRDL name of the instance in the parent
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- abstract property size: int#
Total Number of bytes of address the node occupies
- abstract property systemrdl_python_child_name_map: dict[str, str]#
In some cases systemRDL names need to be converted make them python safe, this dictionary is used to map the original systemRDL names to the names of the python attributes of this class
Returns: dictionary whose key is the systemRDL names and value it the property name
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- class peakrdl_python.lib.sections.RegFileArray(*, logger_handle: str, inst_name: str, parent: AddressMap | RegFile, address: int, stride: int, dimensions: tuple[int, ...], elements: tuple[tuple[tuple[int, ...], ...], tuple[RegFile, ...]] | None = None)#
base class for a array of register files
- property address: int#
address of the node
- count(value) integer -- return number of occurrences of value#
- property dimensions: tuple[int, ...] | tuple[int]#
Dimensions of the array
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- index(value[, start[, stop]]) integer -- return first index of value.#
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- property inst_name: str#
systemRDL name of the instance in the parent
- items() Iterator[tuple[tuple[int, ...], NodeArrayElementType]]#
iterate through all the items in an array but also return the index of the array
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property size: int#
Total Number of bytes of address the array occupies
- property stride: int#
address stride of the array
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
Memories#
- class peakrdl_python.lib.memory.MemoryReadOnly(*, address: int, width: int, accesswidth: int, entries: int, logger_handle: str, inst_name: str, parent: AddressMap | MemoryReadOnlyArray | MemoryWriteOnlyArray | MemoryReadWriteArray | MemoryReadOnlyLegacyArray | MemoryWriteOnlyLegacyArray | MemoryReadWriteLegacyArray)#
base class of memory wrappers
Note
It is not expected that this class will be instantiated under normal circumstances however, it is useful for type checking
- property accesswidth: int#
The access width of the register in bits, this uses the accesswidth systemRDL property
Returns: register access width
- property address: int#
address of the node
- address_lookup(entry: int) int#
provides the address for an entry in the memory.
Examples
- Parameters:
entry – entry number to look up the address for
Returns: Address
- property array_typecode: str#
the python array.array type is initialised with a typecode. This property provides the recommended typecode to use with this class instance (based on the memwidth)
Returns: typecode
- property entries: int#
The number of entries in the memory, this uses the mementries systemRDL property
Returns: memory entries
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- get_child_by_system_rdl_name(name: Any) Any#
returns a child node by its systemRDL name
- Parameters:
name – name of the node in the systemRDL
Returns: Node
- get_children(unroll: bool = False) Iterator[Reg | RegArray]#
generator that produces all the registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_readable_registers(unroll: bool = False) Iterator[ReadableRegister | ReadableRegisterArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_registers(unroll: bool = False) Iterator[Reg | RegArray]#
generator that produces all the registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- property inst_name: str#
systemRDL name of the instance in the parent
- property max_entry_value: int#
maximum unsigned integer value that can be stored in a memory entry
For example:
8-bit memory width returns 0xFF (255)
16-bit memory width returns 0xFFFF (65535)
32-bit memory width returns 0xFFFF_FFFF (4294967295)
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- read(start_entry: int, number_entries: int) list[int]#
Read from the memory
- Parameters:
start_entry – index in the memory to start from, this is not the address
number_entries – number of entries to read
Returns: data read from memory
- property size: int#
Total Number of bytes of address the node occupies
- abstract property systemrdl_python_child_name_map: dict[str, str]#
In some cases systemRDL names need to be converted make them python safe, this dictionary is used to map the original systemRDL names to the names of the python attributes of this class
Returns: dictionary whose key is the systemRDL names and value it the property name
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- property width: int#
The width of the memory in bits, this uses the memwidth systemRDL property
Returns: memory width
- property width_in_bytes: int#
The width of the memory bytes, i.e. the width in bits divided by 8
Returns: memory width (in bytes)
- class peakrdl_python.lib.memory.MemoryWriteOnly(*, address: int, width: int, accesswidth: int, entries: int, logger_handle: str, inst_name: str, parent: AddressMap | MemoryReadOnlyArray | MemoryWriteOnlyArray | MemoryReadWriteArray | MemoryReadOnlyLegacyArray | MemoryWriteOnlyLegacyArray | MemoryReadWriteLegacyArray)#
base class of memory wrappers
Note
It is not expected that this class will be instantiated under normal circumstances however, it is useful for type checking
- property accesswidth: int#
The access width of the register in bits, this uses the accesswidth systemRDL property
Returns: register access width
- property address: int#
address of the node
- address_lookup(entry: int) int#
provides the address for an entry in the memory.
Examples
- Parameters:
entry – entry number to look up the address for
Returns: Address
- property array_typecode: str#
the python array.array type is initialised with a typecode. This property provides the recommended typecode to use with this class instance (based on the memwidth)
Returns: typecode
- property entries: int#
The number of entries in the memory, this uses the mementries systemRDL property
Returns: memory entries
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- get_child_by_system_rdl_name(name: Any) Any#
returns a child node by its systemRDL name
- Parameters:
name – name of the node in the systemRDL
Returns: Node
- get_children(unroll: bool = False) Iterator[Reg | RegArray]#
generator that produces all the registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_registers(unroll: bool = False) Iterator[Reg | RegArray]#
generator that produces all the registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_writable_registers(unroll: bool = False) Iterator[WritableRegister | WriteableRegisterArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- property inst_name: str#
systemRDL name of the instance in the parent
- property max_entry_value: int#
maximum unsigned integer value that can be stored in a memory entry
For example:
8-bit memory width returns 0xFF (255)
16-bit memory width returns 0xFFFF (65535)
32-bit memory width returns 0xFFFF_FFFF (4294967295)
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property size: int#
Total Number of bytes of address the node occupies
- abstract property systemrdl_python_child_name_map: dict[str, str]#
In some cases systemRDL names need to be converted make them python safe, this dictionary is used to map the original systemRDL names to the names of the python attributes of this class
Returns: dictionary whose key is the systemRDL names and value it the property name
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- property width: int#
The width of the memory in bits, this uses the memwidth systemRDL property
Returns: memory width
- property width_in_bytes: int#
The width of the memory bytes, i.e. the width in bits divided by 8
Returns: memory width (in bytes)
- write(start_entry: int, data: list[int]) None#
Write data to memory
- Parameters:
start_entry – index in the memory to start from, this is not the address
data – data to write
Returns: None
- class peakrdl_python.lib.memory.MemoryReadWrite(*, address: int, width: int, accesswidth: int, entries: int, logger_handle: str, inst_name: str, parent: AddressMap | MemoryReadOnlyArray | MemoryWriteOnlyArray | MemoryReadWriteArray | MemoryReadOnlyLegacyArray | MemoryWriteOnlyLegacyArray | MemoryReadWriteLegacyArray)#
base class of memory wrappers
Note
It is not expected that this class will be instantiated under normal circumstances however, it is useful for type checking
- property accesswidth: int#
The access width of the register in bits, this uses the accesswidth systemRDL property
Returns: register access width
- property address: int#
address of the node
- address_lookup(entry: int) int#
provides the address for an entry in the memory.
Examples
- Parameters:
entry – entry number to look up the address for
Returns: Address
- property array_typecode: str#
the python array.array type is initialised with a typecode. This property provides the recommended typecode to use with this class instance (based on the memwidth)
Returns: typecode
- property entries: int#
The number of entries in the memory, this uses the mementries systemRDL property
Returns: memory entries
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- get_child_by_system_rdl_name(name: Any) Any#
returns a child node by its systemRDL name
- Parameters:
name – name of the node in the systemRDL
Returns: Node
- get_children(unroll: bool = False) Iterator[Reg | RegArray]#
generator that produces all the registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_readable_registers(unroll: bool = False) Iterator[ReadableRegister | ReadableRegisterArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_registers(unroll: bool = False) Iterator[Reg | RegArray]#
generator that produces all the registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- get_writable_registers(unroll: bool = False) Iterator[WritableRegister | WriteableRegisterArray]#
generator that produces all the readable_registers of this node
- Parameters:
unroll – Whether to unroll child array or not
- property inst_name: str#
systemRDL name of the instance in the parent
- property max_entry_value: int#
maximum unsigned integer value that can be stored in a memory entry
For example:
8-bit memory width returns 0xFF (255)
16-bit memory width returns 0xFFFF (65535)
32-bit memory width returns 0xFFFF_FFFF (4294967295)
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- read(start_entry: int, number_entries: int) list[int]#
Read from the memory
- Parameters:
start_entry – index in the memory to start from, this is not the address
number_entries – number of entries to read
Returns: data read from memory
- property size: int#
Total Number of bytes of address the node occupies
- abstract property systemrdl_python_child_name_map: dict[str, str]#
In some cases systemRDL names need to be converted make them python safe, this dictionary is used to map the original systemRDL names to the names of the python attributes of this class
Returns: dictionary whose key is the systemRDL names and value it the property name
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- property width: int#
The width of the memory in bits, this uses the memwidth systemRDL property
Returns: memory width
- property width_in_bytes: int#
The width of the memory bytes, i.e. the width in bits divided by 8
Returns: memory width (in bytes)
- write(start_entry: int, data: list[int]) None#
Write data to memory
- Parameters:
start_entry – index in the memory to start from, this is not the address
data – data to write
Returns: None
- class peakrdl_python.lib.memory.MemoryReadOnlyArray(*, logger_handle: str, inst_name: str, parent: AddressMap, address: int, stride: int, dimensions: tuple[int, ...], elements: tuple[tuple[tuple[int, ...], ...], tuple[MemoryReadOnly, ...]] | None = None)#
base class for an array of read only memories
- property address: int#
address of the node
- count(value) integer -- return number of occurrences of value#
- property dimensions: tuple[int, ...] | tuple[int]#
Dimensions of the array
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- index(value[, start[, stop]]) integer -- return first index of value.#
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- property inst_name: str#
systemRDL name of the instance in the parent
- items() Iterator[tuple[tuple[int, ...], NodeArrayElementType]]#
iterate through all the items in an array but also return the index of the array
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property size: int#
Total Number of bytes of address the array occupies
- property stride: int#
address stride of the array
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- class peakrdl_python.lib.memory.MemoryWriteOnlyArray(*, logger_handle: str, inst_name: str, parent: AddressMap, address: int, stride: int, dimensions: tuple[int, ...], elements: tuple[tuple[tuple[int, ...], ...], tuple[MemoryWriteOnly, ...]] | None = None)#
base class for an array of write only memories
- property address: int#
address of the node
- count(value) integer -- return number of occurrences of value#
- property dimensions: tuple[int, ...] | tuple[int]#
Dimensions of the array
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- index(value[, start[, stop]]) integer -- return first index of value.#
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- property inst_name: str#
systemRDL name of the instance in the parent
- items() Iterator[tuple[tuple[int, ...], NodeArrayElementType]]#
iterate through all the items in an array but also return the index of the array
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property size: int#
Total Number of bytes of address the array occupies
- property stride: int#
address stride of the array
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- class peakrdl_python.lib.memory.MemoryReadWriteArray(*, logger_handle: str, inst_name: str, parent: AddressMap, address: int, stride: int, dimensions: tuple[int, ...], elements: tuple[tuple[tuple[int, ...], ...], tuple[MemoryReadWrite, ...]] | None = None)#
base class for an array of read and write memories
- property address: int#
address of the node
- count(value) integer -- return number of occurrences of value#
- property dimensions: tuple[int, ...] | tuple[int]#
Dimensions of the array
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- index(value[, start[, stop]]) integer -- return first index of value.#
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- property inst_name: str#
systemRDL name of the instance in the parent
- items() Iterator[tuple[tuple[int, ...], NodeArrayElementType]]#
iterate through all the items in an array but also return the index of the array
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property size: int#
Total Number of bytes of address the array occupies
- property stride: int#
address stride of the array
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
Registers#
- class peakrdl_python.lib.register_and_field.RegReadOnly(*, address: int, logger_handle: str, inst_name: str, parent: AddressMap | RegFile | MemoryReadOnly | MemoryReadWrite | MemoryReadOnlyLegacy | MemoryReadWriteLegacy)#
class for a read only register
- Parameters:
address – address of the register
width – width of the register in bits
accesswidth – minimum access width of the register in bits
logger_handle – name to be used logging messages associate with this object
- abstract property accesswidth: int#
The access width of the register in bits, this uses the accesswidth systemRDL property
- property address: int#
address of the node
- property fields: Iterator[FieldReadOnly | FieldWriteOnly | FieldReadWrite]#
generator that produces has all the fields within the register
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- get_child_by_system_rdl_name(name: Any) Any#
returns a child node by its systemRDL name
- Parameters:
name – name of the node in the systemRDL
Returns: Node
- property inst_name: str#
systemRDL name of the instance in the parent
- property max_value: int#
maximum unsigned integer value that can be stored in the register
For example:
8-bit register returns 0xFF (255)
16-bit register returns 0xFFFF (65535)
32-bit register returns 0xFFFF_FFFF (4294967295)
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- read() int#
Read value from the register
- read_fields() dict[str, bool | Enum | int]#
read the register and return a dictionary of the field values
- property readable_fields: Iterator[FieldReadOnly | FieldReadWrite]#
generator that produces has all the readable fields within the register
- single_read() Generator[Self]#
Context manager to allow multiple field accesses to be performed with a single read of the register
- property size: int#
Total Number of bytes of address the node occupies
- abstract property systemrdl_python_child_name_map: dict[str, str]#
In some cases systemRDL names need to be converted make them python safe, this dictionary is used to map the original systemRDL names to the names of the python attributes of this class
Returns: dictionary whose key is the systemRDL names and value it the property name
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- abstract property width: int#
The width of the register in bits, this uses the regwidth systemRDL property
- class peakrdl_python.lib.register_and_field.RegWriteOnly(*, address: int, logger_handle: str, inst_name: str, parent: AddressMap | RegFile | MemoryWriteOnly | MemoryReadWrite | MemoryWriteOnlyLegacy | MemoryReadWriteLegacy)#
class for a write only register
- abstract property accesswidth: int#
The access width of the register in bits, this uses the accesswidth systemRDL property
- property address: int#
address of the node
- property fields: Iterator[FieldReadOnly | FieldWriteOnly | FieldReadWrite]#
generator that produces has all the fields within the register
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- get_child_by_system_rdl_name(name: Any) Any#
returns a child node by its systemRDL name
- Parameters:
name – name of the node in the systemRDL
Returns: Node
- property inst_name: str#
systemRDL name of the instance in the parent
- property max_value: int#
maximum unsigned integer value that can be stored in the register
For example:
8-bit register returns 0xFF (255)
16-bit register returns 0xFFFF (65535)
32-bit register returns 0xFFFF_FFFF (4294967295)
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property size: int#
Total Number of bytes of address the node occupies
- abstract property systemrdl_python_child_name_map: dict[str, str]#
In some cases systemRDL names need to be converted make them python safe, this dictionary is used to map the original systemRDL names to the names of the python attributes of this class
Returns: dictionary whose key is the systemRDL names and value it the property name
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- abstract property width: int#
The width of the register in bits, this uses the regwidth systemRDL property
- property writable_fields: Iterator[FieldWriteOnly | FieldReadWrite]#
generator that produces has all the readable fields within the register
- write(data: int) None#
Writes a value to the register
- Parameters:
data – data to be written
- Raises:
ValueError – if the value provided is outside the range of the permissible values for the register
TypeError – if the type of data is wrong
- abstractmethod write_fields(**kwargs) None#
Do a write to the register, updating any field included in the arguments
- class peakrdl_python.lib.register_and_field.RegReadWrite(*, address: int, logger_handle: str, inst_name: str, parent: AddressMap | RegFile | MemoryReadWrite | MemoryReadWriteLegacy)#
class for a read and write only register
- abstract property accesswidth: int#
The access width of the register in bits, this uses the accesswidth systemRDL property
- property address: int#
address of the node
- property fields: Iterator[FieldReadOnly | FieldWriteOnly | FieldReadWrite]#
generator that produces has all the fields within the register
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- get_child_by_system_rdl_name(name: Any) Any#
returns a child node by its systemRDL name
- Parameters:
name – name of the node in the systemRDL
Returns: Node
- property inst_name: str#
systemRDL name of the instance in the parent
- property max_value: int#
maximum unsigned integer value that can be stored in the register
For example:
8-bit register returns 0xFF (255)
16-bit register returns 0xFFFF (65535)
32-bit register returns 0xFFFF_FFFF (4294967295)
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- read() int#
Read value from the register
- read_fields() dict[str, bool | Enum | int]#
read the register and return a dictionary of the field values
- property readable_fields: Iterator[FieldReadOnly | FieldReadWrite]#
generator that produces has all the readable fields within the register
- single_read() Generator[Self]#
Context manager to allow multiple field reads with a single register read
- single_read_modify_write(verify: bool = False) Generator[Self]#
Context manager to allow multiple field reads/write to be done with a single set of field operations
- Parameters:
verify (bool) – verify the write with a read afterwards
- property size: int#
Total Number of bytes of address the node occupies
- abstract property systemrdl_python_child_name_map: dict[str, str]#
In some cases systemRDL names need to be converted make them python safe, this dictionary is used to map the original systemRDL names to the names of the python attributes of this class
Returns: dictionary whose key is the systemRDL names and value it the property name
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- abstract property width: int#
The width of the register in bits, this uses the regwidth systemRDL property
- property writable_fields: Iterator[FieldWriteOnly | FieldReadWrite]#
generator that produces has all the readable fields within the register
- write(data: int, verify: bool = False) None#
Writes a value to the register
- Parameters:
data – data to be written
verify – set to True to read back the register to verify the read has occurred correctly
- Raises:
ValueError – if the value provided is outside the range of the permissible values for the register
TypeError – if the type of data is wrong
RegisterWriteVerifyError – the read back data after the write does not match the expected value
- write_fields(**kwargs) None#
Do a read-modify-write to the register, updating any field included in the arguments
- class peakrdl_python.lib.register_and_field.RegReadOnlyArray(*, logger_handle: str, inst_name: str, parent: RegFile | AddressMap | MemoryReadOnly | MemoryReadWrite | MemoryReadOnlyLegacy | MemoryReadWriteLegacy, address: int, stride: int, dimensions: tuple[int, ...], elements: tuple[tuple[tuple[int, ...], ...], tuple[RegReadOnly, ...]] | None = None)#
base class for a array of read only registers
- abstract property accesswidth: int#
The access width of the register in bits, this uses the accesswidth systemRDL property
- property address: int#
address of the node
- count(value) integer -- return number of occurrences of value#
- property dimensions: tuple[int, ...] | tuple[int]#
Dimensions of the array
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- index(value[, start[, stop]]) integer -- return first index of value.#
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- property inst_name: str#
systemRDL name of the instance in the parent
- items() Iterator[tuple[tuple[int, ...], NodeArrayElementType]]#
iterate through all the items in an array but also return the index of the array
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- single_read() Generator[Self]#
Context manager to allow multiple field reads/write to be done with a single set of field operations
- property size: int#
Total Number of bytes of address the array occupies
- property stride: int#
address stride of the array
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- abstract property width: int#
The width of the register in bits, this uses the regwidth systemRDL property
- class peakrdl_python.lib.register_and_field.RegWriteOnlyArray(*, logger_handle: str, inst_name: str, parent: RegFile | AddressMap | MemoryWriteOnly | MemoryReadWrite | MemoryWriteOnlyLegacy | MemoryReadWriteLegacy, address: int, stride: int, dimensions: tuple[int, ...], elements: tuple[tuple[tuple[int, ...], ...], tuple[RegWriteOnly, ...]] | None = None)#
base class for a array of write only registers
- abstract property accesswidth: int#
The access width of the register in bits, this uses the accesswidth systemRDL property
- property address: int#
address of the node
- count(value) integer -- return number of occurrences of value#
- property dimensions: tuple[int, ...] | tuple[int]#
Dimensions of the array
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- index(value[, start[, stop]]) integer -- return first index of value.#
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- property inst_name: str#
systemRDL name of the instance in the parent
- items() Iterator[tuple[tuple[int, ...], NodeArrayElementType]]#
iterate through all the items in an array but also return the index of the array
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- single_write() Generator[Self]#
Context manager to allow multiple field reads/write to be done with a single set of field operations
- property size: int#
Total Number of bytes of address the array occupies
- property stride: int#
address stride of the array
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- abstract property width: int#
The width of the register in bits, this uses the regwidth systemRDL property
- class peakrdl_python.lib.register_and_field.RegReadWriteArray(*, logger_handle: str, inst_name: str, parent: RegFile | AddressMap | MemoryReadWrite | MemoryReadWriteLegacy, address: int, stride: int, dimensions: tuple[int, ...], elements: tuple[tuple[tuple[int, ...], ...], tuple[RegReadWrite, ...]] | None = None)#
base class for a array of read and write registers
- abstract property accesswidth: int#
The access width of the register in bits, this uses the accesswidth systemRDL property
- property address: int#
address of the node
- count(value) integer -- return number of occurrences of value#
- property dimensions: tuple[int, ...] | tuple[int]#
Dimensions of the array
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- index(value[, start[, stop]]) integer -- return first index of value.#
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- property inst_name: str#
systemRDL name of the instance in the parent
- items() Iterator[tuple[tuple[int, ...], NodeArrayElementType]]#
iterate through all the items in an array but also return the index of the array
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- single_read_modify_write(verify: bool = False, skip_write: bool = False) Generator[Self]#
Context manager to allow multiple field reads/write to be done with a single set of field operations
- Parameters:
verify (bool) – very the write with a read afterwards
skip_write (bool) – skip the write back at the end
- property size: int#
Total Number of bytes of address the array occupies
- property stride: int#
address stride of the array
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- abstract property width: int#
The width of the register in bits, this uses the regwidth systemRDL property
Register Fields#
A register will always have fields within it
- class peakrdl_python.lib.register_and_field.FieldReadOnly(*, parent_register: RegReadOnly | RegReadWrite, size_props: FieldSizeProps, misc_props: FieldMiscProps, logger_handle: str, inst_name: str, field_type: type[FieldType])#
class for a read only register field
- Parameters:
parent_register – register within which the field resides
size_props – object defining the msb, lsb, high bit, low bit and width
logger_handle – name to be used logging messages associate with this object
- property bitmask: int#
The bit mask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have a bit mask of 0x00F0
- property default: FieldType | None#
The default value of the field
This returns None: - if the field is not reset. - if the register resets to a signal value that can not be determined
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- property high: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property inst_name: str#
systemRDL name of the instance in the parent
- property inverse_bitmask: int#
The bitwise inverse of the bitmask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have an inverse bit mask of 0xFF0F
- property is_volatile: bool#
The HW volatility of the field
- property low: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property lsb: int#
bit position of the least significant bit (lsb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property lsb0: bool#
The field can either be lsb0 or msb0
Returns: true if lsb0
- property max_value: int#
maximum unsigned integer value that can be stored in the field
For example:
8-bit field returns 0xFF (255)
16-bit field returns 0xFFFF (65535)
32-bit field returns 0xFFFF_FFFF (4294967295)
- property msb: int#
bit position of the most significant bit (msb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property msb0: bool#
The field can either be lsb0 or msb0
Returns: true if msb0
- property parent_register: RegReadOnly | RegReadWrite#
parent register the field is placed in
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- read() FieldType#
Reads the register that this field is located in and retries the field value applying the required masking and shifting
- Returns:
field value
- property register_data_width: int#
The width of the register within which the field resides in bits
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- property width: int#
The width of the field in bits
- class peakrdl_python.lib.register_and_field.FieldWriteOnly(*, parent_register: RegWriteOnly | RegReadWrite, size_props: FieldSizeProps, misc_props: FieldMiscProps, logger_handle: str, inst_name: str, field_type: type[FieldType])#
class for a write only register field
- Parameters:
parent_register – register within which the field resides
size_props – object defining the msb, lsb, high bit, low bit and width
logger_handle – name to be used logging messages associate with this object
- property bitmask: int#
The bit mask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have a bit mask of 0x00F0
- property default: FieldType | None#
The default value of the field
This returns None: - if the field is not reset. - if the register resets to a signal value that can not be determined
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- property high: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property inst_name: str#
systemRDL name of the instance in the parent
- property inverse_bitmask: int#
The bitwise inverse of the bitmask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have an inverse bit mask of 0xFF0F
- property is_volatile: bool#
The HW volatility of the field
- property low: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property lsb: int#
bit position of the least significant bit (lsb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property lsb0: bool#
The field can either be lsb0 or msb0
Returns: true if lsb0
- property max_value: int#
maximum unsigned integer value that can be stored in the field
For example:
8-bit field returns 0xFF (255)
16-bit field returns 0xFFFF (65535)
32-bit field returns 0xFFFF_FFFF (4294967295)
- property msb: int#
bit position of the most significant bit (msb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property msb0: bool#
The field can either be lsb0 or msb0
Returns: true if msb0
- property parent_register: RegWriteOnly | RegReadWrite#
parent register the field is placed in
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property register_data_width: int#
The width of the register within which the field resides in bits
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- property width: int#
The width of the field in bits
- write(value: FieldType) None#
The behaviour of this method depends on whether the field is located in a readable register or not:
If the register is readable, the method will perform a read-modify-write on the register updating the field with the value provided
If the register is not writable all other field values will be written with zero.
- Parameters:
value – field value to update to
- class peakrdl_python.lib.register_and_field.FieldReadWrite(*, parent_register: RegReadWrite, size_props: FieldSizeProps, misc_props: FieldMiscProps, logger_handle: str, inst_name: str, field_type: type[FieldType])#
class for a read/write register field
- Parameters:
parent_register – register within which the field resides
size_props – object defining the msb, lsb, high bit, low bit and width
logger_handle – name to be used logging messages associate with this object
- property bitmask: int#
The bit mask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have a bit mask of 0x00F0
- property default: FieldType | None#
The default value of the field
This returns None: - if the field is not reset. - if the register resets to a signal value that can not be determined
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- property high: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property inst_name: str#
systemRDL name of the instance in the parent
- property inverse_bitmask: int#
The bitwise inverse of the bitmask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have an inverse bit mask of 0xFF0F
- property is_volatile: bool#
The HW volatility of the field
- property low: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property lsb: int#
bit position of the least significant bit (lsb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property lsb0: bool#
The field can either be lsb0 or msb0
Returns: true if lsb0
- property max_value: int#
maximum unsigned integer value that can be stored in the field
For example:
8-bit field returns 0xFF (255)
16-bit field returns 0xFFFF (65535)
32-bit field returns 0xFFFF_FFFF (4294967295)
- property msb: int#
bit position of the most significant bit (msb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property msb0: bool#
The field can either be lsb0 or msb0
Returns: true if msb0
- property parent_register: RegReadWrite#
parent register the field is placed in
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- read() FieldType#
Reads the register that this field is located in and retries the field value applying the required masking and shifting
- Returns:
field value
- property register_data_width: int#
The width of the register within which the field resides in bits
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- property width: int#
The width of the field in bits
- write(value: FieldType) None#
The behaviour of this method depends on whether the field is located in a readable register or not:
If the register is readable, the method will perform a read-modify-write on the register updating the field with the value provided
If the register is not writable all other field values will be written with zero.
- Parameters:
value – field value to update to
- class peakrdl_python.lib.register_and_field.FieldEnumReadOnly(*, parent_register: RegReadOnly | RegReadWrite, size_props: FieldSizeProps, misc_props: FieldMiscProps, logger_handle: str, inst_name: str, field_type: type[FieldType])#
class for a read only register field with an enumerated value
- property bitmask: int#
The bit mask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have a bit mask of 0x00F0
- property default: FieldType | None#
The default value of the field
This returns None: - if the field is not reset. - if the register resets to a signal value that can not be determined
- property enum_cls: type[FieldType]#
The enumeration class for this field
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- property high: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property inst_name: str#
systemRDL name of the instance in the parent
- property inverse_bitmask: int#
The bitwise inverse of the bitmask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have an inverse bit mask of 0xFF0F
- property is_volatile: bool#
The HW volatility of the field
- property low: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property lsb: int#
bit position of the least significant bit (lsb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property lsb0: bool#
The field can either be lsb0 or msb0
Returns: true if lsb0
- property max_value: int#
maximum unsigned integer value that can be stored in the field
For example:
8-bit field returns 0xFF (255)
16-bit field returns 0xFFFF (65535)
32-bit field returns 0xFFFF_FFFF (4294967295)
- property msb: int#
bit position of the most significant bit (msb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property msb0: bool#
The field can either be lsb0 or msb0
Returns: true if msb0
- property parent_register: RegReadOnly | RegReadWrite#
parent register the field is placed in
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- read() FieldType#
Reads the register that this field is located in and retries the field value applying the required masking and shifting
- Returns:
field value
- property register_data_width: int#
The width of the register within which the field resides in bits
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- property width: int#
The width of the field in bits
- class peakrdl_python.lib.register_and_field.FieldEnumWriteOnly(*, parent_register: RegWriteOnly | RegReadWrite, size_props: FieldSizeProps, misc_props: FieldMiscProps, logger_handle: str, inst_name: str, field_type: type[FieldType])#
class for a write only register field with an enumerated value
- property bitmask: int#
The bit mask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have a bit mask of 0x00F0
- property default: FieldType | None#
The default value of the field
This returns None: - if the field is not reset. - if the register resets to a signal value that can not be determined
- property enum_cls: type[FieldType]#
The enumeration class for this field
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- property high: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property inst_name: str#
systemRDL name of the instance in the parent
- property inverse_bitmask: int#
The bitwise inverse of the bitmask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have an inverse bit mask of 0xFF0F
- property is_volatile: bool#
The HW volatility of the field
- property low: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property lsb: int#
bit position of the least significant bit (lsb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property lsb0: bool#
The field can either be lsb0 or msb0
Returns: true if lsb0
- property max_value: int#
maximum unsigned integer value that can be stored in the field
For example:
8-bit field returns 0xFF (255)
16-bit field returns 0xFFFF (65535)
32-bit field returns 0xFFFF_FFFF (4294967295)
- property msb: int#
bit position of the most significant bit (msb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property msb0: bool#
The field can either be lsb0 or msb0
Returns: true if msb0
- property parent_register: RegWriteOnly | RegReadWrite#
parent register the field is placed in
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- property register_data_width: int#
The width of the register within which the field resides in bits
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- property width: int#
The width of the field in bits
- write(value: FieldType) None#
The behaviour of this method depends on whether the field is located in a readable register or not:
If the register is readable, the method will perform a read-modify-write on the register updating the field with the value provided
If the register is not writable all other field values will be written with zero.
- Parameters:
value – field value to update to
- class peakrdl_python.lib.register_and_field.FieldEnumReadWrite(*, parent_register: RegReadWrite, size_props: FieldSizeProps, misc_props: FieldMiscProps, logger_handle: str, inst_name: str, field_type: type[FieldType])#
class for a read/write register field with an enumerated value
- property bitmask: int#
The bit mask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have a bit mask of 0x00F0
- property default: FieldType | None#
The default value of the field
This returns None: - if the field is not reset. - if the register resets to a signal value that can not be determined
- property enum_cls: type[FieldType]#
The enumeration class for this field
- property full_inst_name: str#
The full hierarchical systemRDL name of the instance
- property high: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property inst_name: str#
systemRDL name of the instance in the parent
- property inverse_bitmask: int#
The bitwise inverse of the bitmask needed to extract the field from its register
For example a register field occupying bits 7 to 4 in a 16-bit register will have an inverse bit mask of 0xFF0F
- property is_volatile: bool#
The HW volatility of the field
- property low: int#
low index of the bit range of the field in the parent register
Note
The first bit in the register is bit 0
- property lsb: int#
bit position of the least significant bit (lsb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property lsb0: bool#
The field can either be lsb0 or msb0
Returns: true if lsb0
- property max_value: int#
maximum unsigned integer value that can be stored in the field
For example:
8-bit field returns 0xFF (255)
16-bit field returns 0xFFFF (65535)
32-bit field returns 0xFFFF_FFFF (4294967295)
- property msb: int#
bit position of the most significant bit (msb) of the field in the parent register
Note
fields can be defined as msb in bit 0 or as lsb in bit 0
- property msb0: bool#
The field can either be lsb0 or msb0
Returns: true if msb0
- property parent_register: RegReadWrite#
parent register the field is placed in
- property rdl_desc: str | None#
The systemRDL desc property for the item
- property rdl_name: str | None#
The systemRDL name property for the item
- read() FieldType#
Reads the register that this field is located in and retries the field value applying the required masking and shifting
- Returns:
field value
- property register_data_width: int#
The width of the register within which the field resides in bits
- property udp: dict[str, str | int | bool | IntEnum | dict[str, UDPType] | list[UDPType]]#
A dictionary of the user defined properties for the node
- property width: int#
The width of the field in bits
- write(value: FieldType) None#
The behaviour of this method depends on whether the field is located in a readable register or not:
If the register is readable, the method will perform a read-modify-write on the register updating the field with the value provided
If the register is not writable all other field values will be written with zero.
- Parameters:
value – field value to update to