hwt/synthesizer/rtlLevel/netlist.py
def markVisibilityOfSignals(ctx, ctxName, signals, interfaceSignals):
    """
    * check if all signals are driven by something
    * mark signals with hidden = False if they are connecting statements
      or if they are external interface
    """
    for sig in signals:
        driver_cnt = len(sig.drivers)
        has_comb_driver = False
        if driver_cnt > 1:
            sig.hidden = False
            for d in sig.drivers:
                if not isinstance(d, Operator):
                    sig.hidden = False

                is_comb_driver = False

                if isinstance(d, PortItem):
                    is_comb_driver = True
                elif not d._now_is_event_dependent:
                    for a in walk_assignments(d, sig):
                        if not a.indexes\
                                and not a._is_completly_event_dependent:
                            is_comb_driver = True
                            break

                if has_comb_driver and is_comb_driver:
                    raise MultipleDriversErr(
                        "%s: Signal %r has multiple combinational drivers" %
                        (ctx.getDebugScopeName(), sig))

                has_comb_driver |= is_comb_driver
        elif driver_cnt == 1:
            if not isinstance(sig.drivers[0], Operator):
                sig.hidden = False
        else:
            sig.hidden = False
            if sig not in interfaceSignals:
                if not sig.defVal._isFullVld():
                    raise NoDriverErr(
                        sig, "Signal without any driver or valid value in ", ctxName)
                sig._const = True
def markVisibilityOfSignals(ctx, ctxName, signals, interfaceSignals):
    """
    * check if all signals are driven by something
    * mark signals with hidden = False if they are connecting statements
      or if they are external interface
    """
    for sig in signals:
        driver_cnt = len(sig.drivers)
        has_comb_driver = False
        if driver_cnt > 1:
            sig.hidden = False
            for d in sig.drivers:
                if not isinstance(d, Operator):
                    sig.hidden = False

                is_comb_driver = False

                if isinstance(d, PortItem):
                    is_comb_driver = True
                elif not d._now_is_event_dependent:
                    for a in walk_assignments(d, sig):
                        if not a.indexes\
                                and not a._is_completly_event_dependent:
                            is_comb_driver = True
                            break

                if has_comb_driver and is_comb_driver:
                    raise MultipleDriversErr(
                        "%s: Signal %r has multiple combinational drivers" %
                        (ctx.getDebugScopeName(), sig))

                has_comb_driver |= is_comb_driver
        elif driver_cnt == 1:
            if not isinstance(sig.drivers[0], Operator):
                sig.hidden = False
        else:
            sig.hidden = False
            if sig not in interfaceSignals:
                if not sig.defVal._isFullVld():
                    raise NoDriverErr(
                        sig, "Signal without any driver or valid value in ", ctxName)
                sig._const = True
* check if all signals are driven by something
    * mark signals with hidden = False if they are connecting statements
      or if they are external interface