def isa(mnemonic: str, opcode: int, funct3: int=None, funct7: int=None, *, variant=RV32I, extension=None):
def wrapper(wrapped):<EOL><INDENT>"""<STR_LIT>"""<EOL>class WrappedClass(wrapped):<EOL><INDENT>"""<STR_LIT>"""<EOL>_mnemonic = mnemonic<EOL>_opcode = opcode<EOL>_funct3 = funct3<EOL>_funct7 = funct7<EOL>_variant = variant<EOL>_extension = extension<EOL>@staticmethod<EOL>def _match(machinecode: int):<EOL><INDENT>"""<STR_LIT>"""<EOL>f3 = (machinecode >> <NUM_LIT:12>) & <NUM_LIT><EOL>f7 = (machinecode >> <NUM_LIT>) & <NUM_LIT><EOL>if funct3 is not None and f3 != funct3:<EOL><INDENT>return False<EOL><DEDENT>if funct7 is not None and f7 != funct7:<EOL><INDENT>return False<EOL><DEDENT>return True<EOL><DEDENT><DEDENT>WrappedClass.__name__ = wrapped.__name__<EOL>WrappedClass.__module__ = wrapped.__module__<EOL>WrappedClass.__qualname__ = wrapped.__qualname__<EOL>return WrappedClass<EOL><DEDENT>return wrapper<EOL>
Decorator for the instructions. The decorator contains the static information for the instructions, in particular
the encoding parameters and the assembler mnemonic.

:param mnemonic: Assembler mnemonic
:param opcode: Opcode of this instruction
:param funct3: 3 bit function code on bits 14 to 12 (R-, I-, S- and B-type)
:param funct7: 7 bit function code on bits 31 to 25 (R-type)
:return: Wrapper class that overwrites the actual definition and contains static data