hwt package¶
Subpackages¶
- hwt.hdl package
- Subpackages
- hwt.hdl.statements package
- hwt.hdl.types package
- Casting rules
- Submodules
- hwt.hdl.types.array module
- hwt.hdl.types.arrayCast module
- hwt.hdl.types.arrayConst module
- hwt.hdl.types.bitConstFunctions module
- hwt.hdl.types.bitConstFunctionsGetitem module
- hwt.hdl.types.bitConst_opReduce module
- hwt.hdl.types.bits module
- hwt.hdl.types.bitsCast module
- hwt.hdl.types.bitsCastUtils module
- hwt.hdl.types.bitsConst module
- hwt.hdl.types.bitsRtlSignal module
- hwt.hdl.types.defs module
- hwt.hdl.types.enum module
- hwt.hdl.types.enumConst module
- hwt.hdl.types.float module
- hwt.hdl.types.floatConst module
- hwt.hdl.types.function module
- hwt.hdl.types.hdlType module
- hwt.hdl.types.slice module
- hwt.hdl.types.sliceConst module
- hwt.hdl.types.sliceUtils module
- hwt.hdl.types.stream module
- hwt.hdl.types.streamConst module
- hwt.hdl.types.string module
- hwt.hdl.types.stringConst module
- hwt.hdl.types.struct module
- hwt.hdl.types.structCast module
- hwt.hdl.types.structUtils module
- hwt.hdl.types.structValBase module
- hwt.hdl.types.typeCast module
- hwt.hdl.types.union module
- hwt.hdl.types.utils module
- Submodules
- hwt.hdl.commonConstants module
- hwt.hdl.const module
- hwt.hdl.constUtils module
- hwt.hdl.frameTmpl module
- hwt.hdl.frameTmplUtils module
- hwt.hdl.hdlObject module
- hwt.hdl.operator module
- hwt.hdl.operatorDefs module
HOperatorDefHwtOpsHwtOps.ADDHwtOps.ANDHwtOps.BitsAsSignedHwtOps.BitsAsUnsignedHwtOps.BitsAsVecHwtOps.BitsFlagCastHwtOps.CALLHwtOps.CONCATHwtOps.DIVHwtOps.DOTHwtOps.DOWNTOHwtOps.EQHwtOps.FALLING_EDGEHwtOps.GEHwtOps.GTHwtOps.INDEXHwtOps.LEHwtOps.LTHwtOps.MINUS_UNARYHwtOps.MULHwtOps.NEHwtOps.NOTHwtOps.ORHwtOps.POWHwtOps.RISING_EDGEHwtOps.SDIVHwtOps.SEXTHwtOps.SGEHwtOps.SGTHwtOps.SLEHwtOps.SLTHwtOps.SREMHwtOps.SUBHwtOps.TERNARYHwtOps.TOHwtOps.TRUNCHwtOps.UDIVHwtOps.UGEHwtOps.UGTHwtOps.ULEHwtOps.ULTHwtOps.UREMHwtOps.XORHwtOps.ZEXT
_getVal()bitsAsSignedFn()bitsAsUnsignedFn()bitsAsVec()bitsToIntFn()callFn()concatFn()dotOpFn()downtoFn()eqFn()intToBitsFn()isEventDependentOp()onFallingEdgeFn()onRisingEdgeFn()power()sextFn()ternaryFn()toFn()truncFn()zextFn()
- hwt.hdl.operatorUtils module
- hwt.hdl.portItem module
- hwt.hdl.sensitivityCtx module
- hwt.hdl.transPart module
- hwt.hdl.transTmpl module
- hwt.hdl.variables module
- Subpackages
- hwt.hwIOs package
- Subpackages
- hwt.hwIOs.agents package
- Submodules
- hwt.hwIOs.agents.bramPort module
- hwt.hwIOs.agents.fifo module
- hwt.hwIOs.agents.rdSync module
- hwt.hwIOs.agents.rdVldSync module
- hwt.hwIOs.agents.regCntrl module
- hwt.hwIOs.agents.signal module
- hwt.hwIOs.agents.struct module
- hwt.hwIOs.agents.tuleWithCallback module
- hwt.hwIOs.agents.union module
- hwt.hwIOs.agents.universalComposite module
- hwt.hwIOs.agents.vldSync module
- hwt.hwIOs.agents package
- Submodules
- hwt.hwIOs.hwIOArray module
- hwt.hwIOs.hwIODifferential module
- hwt.hwIOs.hwIOStruct module
- hwt.hwIOs.hwIOTristate module
- hwt.hwIOs.hwIOUnion module
- hwt.hwIOs.hwIO_map module
- hwt.hwIOs.signalOps module
SignalOpsSignalOps._auto_cast()SignalOps._cast_sign()SignalOps._concat()SignalOps._eq()SignalOps._explicit_cast()SignalOps._isOn()SignalOps._onFallingEdge()SignalOps._onRisingEdge()SignalOps._reinterpret_cast()SignalOps._reversed()SignalOps._signed()SignalOps._ternary()SignalOps._unsigned()SignalOps._vec()SignalOps.getMsb()
- hwt.hwIOs.std module
- hwt.hwIOs.std_ip_defs module
- hwt.hwIOs.utils module
- Subpackages
- hwt.pyUtils package
- hwt.serializer package
- Subpackages
- Submodules
- hwt.serializer.exceptions module
- hwt.serializer.ip_packager module
- hwt.serializer.mode module
- hwt.serializer.serializer_config module
- hwt.serializer.serializer_filter module
- hwt.serializer.store_manager module
- hwt.serializer.utils module
- hwt.simulator package
- hwt.synthesizer package
- Subpackages
- hwt.synthesizer.interfaceLevel package
- Submodules
- hwt.synthesizer.interfaceLevel.directionFns module
- hwt.synthesizer.interfaceLevel.getDefaultClkRts module
- hwt.synthesizer.interfaceLevel.hwModuleImplHelpers module
- hwt.synthesizer.interfaceLevel.implDependent module
- hwt.synthesizer.interfaceLevel.propDeclrCollector module
- hwt.synthesizer.interfaceLevel.utils module
- hwt.synthesizer.rtlLevel package
- Submodules
- hwt.synthesizer.rtlLevel.exceptions module
- hwt.synthesizer.rtlLevel.extract_part_drivers module
- hwt.synthesizer.rtlLevel.fill_stm_list_with_enclosure module
- hwt.synthesizer.rtlLevel.mark_visibility_of_signals_and_check_drivers module
- hwt.synthesizer.rtlLevel.netlist module
- hwt.synthesizer.rtlLevel.reduce_processes module
- hwt.synthesizer.rtlLevel.remove_unconnected_signals module
- hwt.synthesizer.rtlLevel.rtlNetlistPass module
- hwt.synthesizer.rtlLevel.rtlSignal module
- hwt.synthesizer.rtlLevel.rtlSignalWalkers module
- hwt.synthesizer.rtlLevel.statements_to_HdlStmCodeBlockContainers module
- hwt.synthesizer.interfaceLevel package
- Submodules
- hwt.synthesizer.componentPath module
- hwt.synthesizer.dummyPlatform module
- hwt.synthesizer.exceptions module
- hwt.synthesizer.typePath module
- hwt.synthesizer.vectorUtils module
- Subpackages
Submodules¶
hwt.code module¶
hwt.code_utils module¶
- hwt.code_utils._mkOp(fn)[source]¶
Function to create variadic operator function
- Parameters:
fn – function to perform binary operation
- hwt.code_utils.connect_optional(src: HwIOBase, dst: HwIOBase, check_fn=<function <lambda>>)[source]¶
Connect interfaces and ignore all missing things
- Parameters:
check_fn – filter function(hwIO0, hwIO1) which check if interfaces should be connected returns tuple (do_check, extra_connection_list)
- hwt.code_utils.rename_signal(hwModule: HwModule, sig: RtlSignalBase | int | bool, name: str)[source]¶
Wrap signal or value in signal of specified name
- Attention:
output signal is driven by new signal of a specified name this means that the assigning to a new signal does not drive a original signal
hwt.constants module¶
Commonly used constants during HW development.
hwt.constraints module¶
hwt.doc_markers module¶
- hwt.doc_markers.hwt_expr_producer(fn)[source]¶
Decorator which does not affect functionality. For documentation purposes it specifies that the function produces hwt expression.
hwt.hObjList module¶
- class hwt.hObjList.HObjList(*args, **kwargs)[source]¶
Bases:
list[T]Regular list with some interface/unit methods delegated on items.
Main purpose of this class it let
hwt.synthesizer.PropDeclrCollector.PropDeclrCollectorknow that this is not an regular python array and that items should be registered as HW objects.- Variables:
_name – name of the property on parent
_parent – parent HwModule/HwIO object
- Note:
this object may be nested in HObjList instances but the parent and name will always corresponds to a HwModule/HwIO object, if there is any
- Note:
hwt.synthesizer.PropDeclrCollector.PropDeclrCollectoris used byhwt.hwIO.Interfaceandhwt.hwModule.HwModule
- _make_association(*args, **kwargs)[source]¶
Delegate _make_association on items
- Note:
doc in
_make_association()
- pop(*args, **kwargs) T[source]¶
Remove and return item at index (default last).
Raises IndexError if list is empty or index is out of range.
- remove(*args, **kwargs)[source]¶
Remove first occurrence of value.
Raises ValueError if the value is not present.
- sort(*args, **kwargs)[source]¶
Sort the list in ascending order and return None.
The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).
If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.
The reverse flag can be set to sort in descending order.
hwt.hwIO module¶
hwt.hwModule module¶
hwt.hwParam module¶
- class hwt.hwParam.HwParam(initval)[source]¶
Bases:
objectClass used to mark object as a configuration of HDL module. ( The parameter instance will not appear on
hwt.hwModule.HwModuleinstance, instead the value will appear. The parameter instance will be stored in ._hwParams property of HwModule/HwIO object)- Variables:
~._initval – value of the parameter which should be used for initialization
~._name – name of parameter on parent HwModule/HwIO instance
~._parent – parent object instance
- Attention:
the actual value is then store on parent object instance
- _hdlName¶
- _initval¶
- _name¶
- _parent: PropDeclrCollector¶
hwt.mainBases module¶
hwt.math module¶
- hwt.math.addressAlignBestEffort(record_width: int, bus_data_width: int)[source]¶
Optionally extend the record width to be power of 2 and to consume smallest amount of memory possible.
- hwt.math.hMax(a: HConst | RtlSignalBase | HwIOBase, b: HConst | RtlSignalBase | HwIOBase)[source]¶
- hwt.math.hMin(a: HConst | RtlSignalBase | HwIOBase, b: HConst | RtlSignalBase | HwIOBase)[source]¶
- hwt.math.inRange(n: int | HConst | RtlSignalBase | HwIOBase, start: int | HConst | RtlSignalBase | HwIOBase, end: int | HConst | RtlSignalBase | HwIOBase)[source]¶
Check if n is in range <start, end)
- hwt.math.log2ceil(x: int | float)[source]¶
Returns no of bits required to store x-1 for example x=8 returns 3
- hwt.math.shiftIntArray(values: List[int | HBitsConst], item_width: int, shift: int)[source]¶
- Parameters:
values – array of values which will be shifted as a whole
item_width – a bit length of a single item in array
shift – specifies how many bits the array should be shifted, << is a positive shift, >> is a negative shift