hwt.synthesizer.rtlLevel.signalUtils package

Submodules

hwt.synthesizer.rtlLevel.signalUtils.exceptions module

exception hwt.synthesizer.rtlLevel.signalUtils.exceptions.SignalDriverErr[source]

Bases: Exception

Signal has multiple combinational drivers (this is not possible in real word) or signal has no driver specified and it drives something which has effect on any output of component (it needs to have a driver but it does not have one)

Note:SignalDriverErr([(SignalDriverErrType, sig), ])
class hwt.synthesizer.rtlLevel.signalUtils.exceptions.SignalDriverErrType[source]

Bases: enum.Enum

An enumeration.

INPUT_WITH_DRIVER = 3
MISSING_DRIVER = 0
MULTIPLE_COMB_DRIVERS = 1
OUTPUT_WITHOUT_DRIVER = 2

hwt.synthesizer.rtlLevel.signalUtils.ops module

class hwt.synthesizer.rtlLevel.signalUtils.ops.RtlSignalOps[source]

Bases: object

Definitions of operators and other operator functions for RtlSignal

Variables:_usedOps – cache for expressions with this signal
_auto_cast(toT)[source]
_concat(*operands)[source]
_convSign(signed)[source]
_eq(other)[source]
Attention:__eq__ is not overloaded because it will destroy hashability of object
_getDestinationSignalForAssignmentToThis()[source]
Returns:a signal which should be used as a destination if assigning to this signal
_getIndexCascade()[source]

Find out if this signal is something indexed

_isOn()[source]
_is_full_valid()[source]
_onFallingEdge()[source]
_onRisingEdge()[source]
_reinterpret_cast(toT)[source]
_signed()[source]
_ternary(ifTrue, ifFalse)[source]
_unsigned()[source]
_vec()[source]
naryOp(operator: hwt.hdl.operatorDefs.OpDefinition, opCreateDelegate, *otherOps) → hwt.synthesizer.rtlLevel.mainBases.RtlSignalBase[source]

Try lookup operator with this parameters in _usedOps if not found create new one and stored it in _usedOps

Parameters:
  • operator – instance of OpDefinition
  • opCreateDelegate – function (*ops) to create operator
  • otherOps – other operands (ops = self + otherOps)
Returns:

RtlSignal which is result of newly created operator

hwt.synthesizer.rtlLevel.signalUtils.ops.tv(signal)[source]

HValue class for HDL type of signal

hwt.synthesizer.rtlLevel.signalUtils.walkers module

hwt.synthesizer.rtlLevel.signalUtils.walkers.discoverEventDependency(sig: hwt.synthesizer.rtlLevel.mainBases.RtlSignalBase)[source]
Returns:generator of tuples (event operator, signal)
hwt.synthesizer.rtlLevel.signalUtils.walkers.discover_sensitivity_of_sig(signal: hwt.synthesizer.rtlLevel.mainBases.RtlSignalBase, seen: set, ctx: hwt.hdl.sensitivityCtx.SensitivityCtx)[source]