hwt/synthesizer/rtlLevel/signalUtils/ops.py
def _getIndexCascade(self):
        """
        Find out if this signal is something indexed
        """
        try:
            # now I am result of the index  xxx[xx] <= source
            # get index op
            d = self.singleDriver()
            try:
                op = d.operator
            except AttributeError:
                return

            if op == AllOps.INDEX:
                # get signal on which is index applied
                indexedOn = d.operands[0]
                if isinstance(indexedOn, RtlSignalBase):
                    # [TODO] multidimensional indexing
                    return indexedOn, [d.operands[1]]
                else:
                    raise Exception(
                        "can not drive static value %r" % indexedOn)

        except (MultipleDriversErr, NoDriverErr):
            pass
def _getIndexCascade(self):
        try:
            # now I am result of the index  xxx[xx] <= source
            # get index op
            d = self.singleDriver()
            try:
                op = d.operator
            except AttributeError:
                return

            if op == AllOps.INDEX:
                # get signal on which is index applied
                indexedOn = d.operands[0]
                if isinstance(indexedOn, RtlSignalBase):
                    # [TODO] multidimensional indexing
                    return indexedOn, [d.operands[1]]
                else:
                    raise Exception(
                        "can not drive static value %r" % indexedOn)

        except (MultipleDriversErr, NoDriverErr):
            pass
def _getIndexCascade ( self ) : try : # now I am result of the index  xxx[xx] <= source # get index op d = self . singleDriver ( ) try : op = d . operator except AttributeError : return if op == AllOps . INDEX : # get signal on which is index applied indexedOn = d . operands [ 0 ] if isinstance ( indexedOn , RtlSignalBase ) : # [TODO] multidimensional indexing return indexedOn , [ d . operands [ 1 ] ] else : raise Exception ( "can not drive static value %r" % indexedOn ) except ( MultipleDriversErr , NoDriverErr ) : pass
Find out if this signal is something indexed
Find out if this signal is something indexed