'Set value to a register.
:param str k: Name of the register. Prefix it with "_" prevents SimInspect being triggered and SimActions being
created.
:param v:     Value to set to the register.
:return:      None'

def __setattr__(self, k, v):

    if ((k == 'state') or (k in dir(SimStatePlugin))):
        return object.__setattr__(self, k, v)
    if (isinstance(k, str) and k.startswith('_')):
        k = k[1:]
        inspect = False
        disable_actions = True
    else:
        inspect = True
        disable_actions = False
    try:
        return self.state.registers.store(k, v, inspect=inspect, disable_actions=disable_actions)
    except KeyError:
        raise AttributeError(k)
