hdl_registers.constant package
Submodules
hdl_registers.constant.bit_vector_constant module
- class hdl_registers.constant.bit_vector_constant.BitVectorConstant(name: str, value: str, description: str | None = None)
Bases:
Constant
- __init__(name: str, value: str, description: str | None = None)
- Parameters:
name – The name of the constant.
value – The constant value. Must start with “0b” or “0x”. Must only contain legal binary or hexadecimal characters. Underscore may be used as a separator.
description – Textual description for the constant.
- allowed_binary_characters = '01_'
- allowed_hexadecimal_characters = '0123456789abcdefABCDEF_'
- separator_character = '_'
- class hdl_registers.constant.bit_vector_constant.UnsignedVector
Bases:
str
Represent a value that is of type unsigned vector (as opposed to a register constant of the same type, which would use the
UnsignedVectorConstant
class).
- class hdl_registers.constant.bit_vector_constant.UnsignedVectorConstant(name: str, value: str, description: str | None = None)
Bases:
BitVectorConstant
Represent a register constant that is of type unsigned vector (as opposed to a plain value of the same type in Python, which would use the
UnsignedVector
class).
hdl_registers.constant.boolean_constant module
- class hdl_registers.constant.boolean_constant.BooleanConstant(name: str, value: bool, description: str | None = None)
Bases:
Constant
hdl_registers.constant.constant module
hdl_registers.constant.float_constant module
- class hdl_registers.constant.float_constant.FloatConstant(name: str, value: float, description: str | None = None)
Bases:
Constant
Represent a floating-point constant.
Note
The
value
is stored with its native representation, which is a Pythonfloat
if a decimal value is provided. The Pythonfloat
type is a double-precision value, so the precision in Python matches the precision in C/C++/VHDL generators.
hdl_registers.constant.integer_constant module
- class hdl_registers.constant.integer_constant.IntegerConstant(name: str, value: int, description: str | None = None)
Bases:
Constant
hdl_registers.constant.string_constant module
- class hdl_registers.constant.string_constant.StringConstant(name: str, value: str, description: str | None = None)
Bases:
Constant