hwt.serializer package¶
This package contains serializers. Purpose of serializer class is to convert hwt representations of designed architecture to hdlConvertorAst to convert it to target language (VHDL/Verilog/SystemC…+xdc/ucf/…).
Rather than using serializer classes manually it is recommended to use hwt.synth.to_rtl()
The serialization process is usually a destructive operation as parts of AST can be rewritten to fit target language.
Subpackages¶
- hwt.serializer.combLoopAnalyzer package
- hwt.serializer.generic package
- Submodules
- hwt.serializer.generic.constant_cache module
- hwt.serializer.generic.indent module
- hwt.serializer.generic.ops module
- hwt.serializer.generic.tmpVarConstructor module
- hwt.serializer.generic.to_hdl_ast module
- hwt.serializer.generic.utils module
- hwt.serializer.generic.value module
ToHdlAst_ValueToHdlAst_Value.Value_try_extract_as_const()ToHdlAst_Value.as_hdl_HBitsConst()ToHdlAst_Value.as_hdl_HFloatConst()ToHdlAst_Value.as_hdl_HFunctionConst()ToHdlAst_Value.as_hdl_HStringConst()ToHdlAst_Value.as_hdl_HdlSignalItem()ToHdlAst_Value.as_hdl_IntegerVal()ToHdlAst_Value.as_hdl_Value()ToHdlAst_Value.as_hdl_int()ToHdlAst_Value.is_suitable_for_const_extract()
- hwt.serializer.hwt package
- hwt.serializer.resourceAnalyzer package
- hwt.serializer.simModel package
- hwt.serializer.systemC package
- hwt.serializer.verilog package
- hwt.serializer.vhdl package
- hwt.serializer.xdc package
Submodules¶
hwt.serializer.exceptions module¶
- exception hwt.serializer.exceptions.UnsupportedEventOpErr[source]¶
Bases:
SerializerExceptionTarget HDL can not use event operator in this context, it usually has to be replaced by correct expression of sensitivity list
hwt.serializer.ip_packager module¶
hwt.serializer.mode module¶
Serializer mode specifies if hdl objects derived from parent unit should be serialized to target HDL or not
use serialize* methods to specify serialization mode for unit class
@serializeExclude
class MyHwModule(HwModule):
# ...
pass
- hwt.serializer.mode._serializeExclude_eval(parentModule: HwModule, priv)[source]¶
Always decide not to serialize obj
- Parameters:
priv – private data for this function first unit of this class
- Returns:
tuple (do serialize this object, next priv, replacement unit)
- hwt.serializer.mode._serializeOnce_eval(parentModule: HwModule, priv)[source]¶
Decide to serialize only first obj of it’s class
- Parameters:
priv – private data for this function (first object with class == obj.__class__)
- Returns:
tuple (do serialize this object, next priv, replacement unit) where priv is private data for this function (first object with class == obj.__class__)
- hwt.serializer.mode._serializeParamsUniq_eval(parentModule: HwModule, priv)[source]¶
Decide to serialize only objs with unique parameters and class
- Parameters:
priv – private data for this function ({frozen_params: obj})
- Returns:
tuple (do serialize this object, next priv, replacement unit)
- hwt.serializer.mode.serializeExclude(cls: Type[HwModule])[source]¶
Never serialize HDL objects from this class