def like(cls, other, *, name=None, name_suffix=None, init=None, reset=None, src_loc_at=0, **kwargs):
        """Create Signal based on another.

        Parameters
        ----------
        other : ValueLike
            Object to base this Signal on.
        """
        cast_other = Value.cast(other)
        if name is not None:
            new_name = str(name)
        elif name_suffix is not None:
            new_name = cast_other.name + str(name_suffix)
        else:
            new_name = tracer.get_var_name(depth=2 + src_loc_at, default="$like")
        # TODO(amaranth-0.7): remove
        if reset is not None:
            if init is not None:
                raise ValueError("Cannot specify both `reset` and `init`")
            warnings.warn("`reset=` is deprecated, use `init=` instead",
                          DeprecationWarning, stacklevel=2)
            init = reset
        if isinstance(other, ValueCastable):
            shape = other.shape()
        else:
            shape = cast_other.shape()
        kw = dict(shape=shape, name=new_name)
        if isinstance(cast_other, Signal):
            if isinstance(shape, ShapeCastable):
                other_init = shape.from_bits(cast_other.init)
            else:
                other_init = cast_other.init
            kw.update(init=other_init, reset_less=cast_other.reset_less,
                      attrs=cast_other.attrs, decoder=cast_other.decoder)
        kw.update(kwargs)
        if init is not None:
            kw["init"] = init
        return cls(**kw, src_loc_at=1 + src_loc_at)
Create Signal based on another.

        Parameters
        ----------
        other : ValueLike
            Object to base this Signal on.
        
amaranth/hdl/_ast.py