hwt/simulator/simModel.py
def sensitivity(proc: HWProcess, *sensitiveTo):
    """
    register sensitivity for process
    """
    for s in sensitiveTo:
        if isinstance(s, tuple):
            sen, s = s
            if sen == SENSITIVITY.ANY:
                s.simSensProcs.add(proc)
            elif sen == SENSITIVITY.RISING:
                s.simRisingSensProcs.add(proc)
            elif sen == SENSITIVITY.FALLING:
                s.simFallingSensProcs.add(proc)
            else:
                raise AssertionError(sen)
        else:
            s.simSensProcs.add(proc)
def sensitivity(proc: HWProcess, *sensitiveTo):
    for s in sensitiveTo:
        if isinstance(s, tuple):
            sen, s = s
            if sen == SENSITIVITY.ANY:
                s.simSensProcs.add(proc)
            elif sen == SENSITIVITY.RISING:
                s.simRisingSensProcs.add(proc)
            elif sen == SENSITIVITY.FALLING:
                s.simFallingSensProcs.add(proc)
            else:
                raise AssertionError(sen)
        else:
            s.simSensProcs.add(proc)
def sensitivity ( proc : HWProcess , * sensitiveTo ) : for s in sensitiveTo : if isinstance ( s , tuple ) : sen , s = s if sen == SENSITIVITY . ANY : s . simSensProcs . add ( proc ) elif sen == SENSITIVITY . RISING : s . simRisingSensProcs . add ( proc ) elif sen == SENSITIVITY . FALLING : s . simFallingSensProcs . add ( proc ) else : raise AssertionError ( sen ) else : s . simSensProcs . add ( proc )
register sensitivity for process
register sensitivity for process