return super().__new__(metacls, clsname, bases, ns)
- def __getitem__(cls, size):
- clsname = f"{cls.__name__}[{size}]"
- items = ((Field,) * size)
- return ArrayMeta(clsname, (Array,), {}, items=items)
-
def __repr__(cls):
if not cls.__members__:
return cls.__name__
length += len(field)
return length
+ def __getitem__(cls, size):
+ clsname = f"{cls.__name__}[{size}]"
+ items = ((Field,) * size)
+ return ArrayMeta(clsname, (Array,), {}, items=items)
+
def remap(cls, scheme):
scheme_md = []
scheme_sd = []
)
from openpower.decoder.power_fields import (
Field as _Field,
+ Array as _Array,
Mapping as _Mapping,
DecodeFields as _DecodeFields,
)
subvl: _Field = range(8, 10)
extra: _Field = range(10, 19)
mode: _Field = range(19, 24)
- extra2: _Field[4] = (
+ extra2: _Array[4] = (
range(10, 12),
range(12, 14),
range(14, 16),
range(16, 18),
)
smask: _Field = range(16, 19)
- extra3: _Field[3] = (
+ extra3: _Array[3] = (
range(10, 13),
range(13, 16),
range(16, 19),