hwt/simulator/simModel.py
def connectSimPort(simUnit, subSimUnit, srcName, dstName, direction):
    """
    Connect ports of simulation models by name
    """
    if direction == DIRECTION.OUT:
        origPort = getattr(subSimUnit, srcName)
        newPort = getattr(simUnit, dstName)
        setattr(subSimUnit, srcName, newPort)
    else:
        origPort = getattr(subSimUnit, dstName)
        newPort = getattr(simUnit, srcName)
        setattr(subSimUnit, dstName, newPort)

    subSimUnit._ctx.signals.remove(origPort)
def connectSimPort(simUnit, subSimUnit, srcName, dstName, direction):
    if direction == DIRECTION.OUT:
        origPort = getattr(subSimUnit, srcName)
        newPort = getattr(simUnit, dstName)
        setattr(subSimUnit, srcName, newPort)
    else:
        origPort = getattr(subSimUnit, dstName)
        newPort = getattr(simUnit, srcName)
        setattr(subSimUnit, dstName, newPort)

    subSimUnit._ctx.signals.remove(origPort)
def connectSimPort ( simUnit , subSimUnit , srcName , dstName , direction ) : if direction == DIRECTION . OUT : origPort = getattr ( subSimUnit , srcName ) newPort = getattr ( simUnit , dstName ) setattr ( subSimUnit , srcName , newPort ) else : origPort = getattr ( subSimUnit , dstName ) newPort = getattr ( simUnit , srcName ) setattr ( subSimUnit , dstName , newPort ) subSimUnit . _ctx . signals . remove ( origPort )
Connect ports of simulation models by name
Connect ports of simulation models by name