hwtBuildsystem.hwt package

Submodules

hwtBuildsystem.hwt.multiConfigHwModule module

class hwtBuildsystem.hwt.multiConfigHwModule.MultiConfigHwModuleWrapper(possible_variants: list[HwModule])[source]

Bases: HwModule

Class which creates wrapper around multiple unit instances, the implementation is chosen based on generic/parameter values in HDL

Attention:

This is meant to be used for top component only, because it is useless for hwt design and it is useful only for integration of statically build component in to VHDL/Verilog

create_HdlModuleDef(target_platform: DummyPlatform, store_manager: StoreManager)[source]
hwImpl()[source]

Implementation - construct main body of the component in this function.

  • called after _declr

hwtBuildsystem.hwt.multiConfigHwModule.reduce_ternary(cond_val_pairs: list[tuple[HConst | RtlSignal, HConst | RtlSignal]], default: HConst | RtlSignal)[source]
reduce_ternary([(c0, v0), (c1, v1)], v3)
# to
v0 if c0 else v1 if c1 else v3