@_dataclasses.dataclass(eq=True, frozen=True)
class Entry(CType):
name: Name
- opcode: Opcode
record: Record
def __lt__(self, other):
if not isinstance(other, self.__class__):
return NotImplemented
- if self.name == other.name:
- return self.opcode < other.opcode
-
return self.name < other.name
@classmethod
yield "#endif"
yield ""
- yield from Opcode.c_decl()
- yield ""
-
enums = (
In1Sel, In2Sel, In3Sel, OutSel,
CRInSel, CROutSel,
record[key] = value
- yield Entry(name=name, opcode=opcode, record=Record(**record))
+ yield Entry(name=name, record=Record(**record))
def main(codegen):