hwt/serializer/resourceAnalyzer/utils.py
def registerMUX(self, stm: Union[HdlStatement, Operator], sig: RtlSignal,
                    inputs_cnt: int):
        """
        mux record is in format (self.MUX, n, m)
        where n is number of bits of this mux
        and m is number of possible inputs
        """
        assert inputs_cnt > 1
        res = self.resources
        w = sig._dtype.bit_length()
        k = (ResourceMUX, w, inputs_cnt)
        res[k] = res.get(k, 0) + 1

        self.resource_for_object[(stm, sig)] = k
def registerMUX(self, stm: Union[HdlStatement, Operator], sig: RtlSignal,
                    inputs_cnt: int):
        """
        mux record is in format (self.MUX, n, m)
        where n is number of bits of this mux
        and m is number of possible inputs
        """
        assert inputs_cnt > 1
        res = self.resources
        w = sig._dtype.bit_length()
        k = (ResourceMUX, w, inputs_cnt)
        res[k] = res.get(k, 0) + 1

        self.resource_for_object[(stm, sig)] = k
mux record is in format (self.MUX, n, m)
        where n is number of bits of this mux
        and m is number of possible inputs