@classmethod<EOL><INDENT>def Value(cls, val, ctx: SerializerCtx):<DEDENT>
t = val._dtype<EOL>if isinstance(val, RtlSignalBase):<EOL><INDENT>return cls.SignalItem(val, ctx)<EOL><DEDENT>c = cls.Value_try_extract_as_const(val, ctx)<EOL>if c:<EOL><INDENT>return c<EOL><DEDENT>if isinstance(t, Slice):<EOL><INDENT>return cls.Slice_valAsHdl(t, val, ctx)<EOL><DEDENT>elif isinstance(t, HArray):<EOL><INDENT>return cls.HArrayValAsHdl(t, val, ctx)<EOL><DEDENT>elif isinstance(t, Bits):<EOL><INDENT>return cls.Bits_valAsHdl(t, val, ctx)<EOL><DEDENT>elif isinstance(t, HBool):<EOL><INDENT>return cls.Bool_valAsHdl(t, val, ctx)<EOL><DEDENT>elif isinstance(t, HEnum):<EOL><INDENT>return cls.HEnumValAsHdl(t, val, ctx)<EOL><DEDENT>elif isinstance(t, Integer):<EOL><INDENT>return cls.Integer_valAsHdl(t, val, ctx)<EOL><DEDENT>elif isinstance(t, String):<EOL><INDENT>return cls.String_valAsHdl(t, val, ctx)<EOL><DEDENT>else:<EOL><INDENT>raise SerializerException(<EOL>"<STR_LIT>"<EOL>% (val))<EOL><DEDENT>
:param dst: is signal connected with value
:param val: value object, can be instance of Signal or Value