hwt.serializer.generic package¶
This package contains common parts of serializers.
Submodules¶
hwt.serializer.generic.constant_cache module¶
- class hwt.serializer.generic.constant_cache.ConstantCache(toHdlAst, tmpVars: TmpVarConstructor)[source]¶
Bases:
objectContainer of constants for serializer. Used to extract constants as constant variables.
- __init__(toHdlAst, tmpVars: TmpVarConstructor)[source]¶
- extract_const_val_as_const_var(val: HConst) RtlSignalBase[source]¶
Create a constant variable with a value specified or use existing variable with same value
hwt.serializer.generic.indent module¶
hwt.serializer.generic.ops module¶
hwt.serializer.generic.tmpVarConstructor module¶
- class hwt.serializer.generic.tmpVarConstructor.TmpVarConstructor(toHdlAst, name_scope: NameScope)[source]¶
Bases:
object- create_var(suggestedName: str, dtype: HdlType, const=False, def_val: RtlSignalBase | HConst | None = None, postponed_init=False) RtlSignal[source]¶
hwt.serializer.generic.to_hdl_ast module¶
hwt.serializer.generic.utils module¶
hwt.serializer.generic.value module¶
- class hwt.serializer.generic.value.ToHdlAst_Value[source]¶
Bases:
object- as_hdl_HBitsConst(val: HBitsConst)[source]¶
- as_hdl_HFunctionConst(val: HFunctionConst)[source]¶
- as_hdl_HStringConst(val: HStringConst)[source]¶
- as_hdl_HdlSignalItem(si: HdlSignalItem | HdlIdDef, declaration=False)[source]¶
- as_hdl_IntegerVal(val: HBitsConst)[source]¶