return (_RegType(self.extra_CR.reg) is _RegType.CR_3BIT)
-class BitSel:
- def __init__(self, value=(0, 32)):
- if isinstance(value, str):
- (start, end) = map(int, value.split(":"))
- else:
- (start, end) = value
- if start < 0 or end < 0 or start >= end:
- raise ValueError(value)
-
- self.__start = start
- self.__end = end
+class Section(Dataclass):
+ class Path(type(_pathlib.Path("."))):
+ pass
- return super().__init__()
+ class BitSel:
+ def __init__(self, value=(0, 32)):
+ if isinstance(value, str):
+ (start, end) = map(int, value.split(":"))
+ else:
+ (start, end) = value
+ if start < 0 or end < 0 or start >= end:
+ raise ValueError(value)
- def __len__(self):
- return (self.__end - self.__start + 1)
+ self.__start = start
+ self.__end = end
- def __repr__(self):
- return f"[{self.__start}:{self.__end}]"
+ return super().__init__()
- def __iter__(self):
- yield from range(self.start, (self.end + 1))
+ def __len__(self):
+ return (self.__end - self.__start + 1)
- def __reversed__(self):
- return tuple(reversed(tuple(self)))
+ def __repr__(self):
+ return f"[{self.__start}:{self.__end}]"
- @property
- def start(self):
- return self.__start
+ def __iter__(self):
+ yield from range(self.start, (self.end + 1))
- @property
- def end(self):
- return self.__end
+ def __reversed__(self):
+ return tuple(reversed(tuple(self)))
+ @property
+ def start(self):
+ return self.__start
-class Section(Dataclass):
- class Path(type(_pathlib.Path("."))):
- pass
+ @property
+ def end(self):
+ return self.__end
class Mode(_enum.Enum):
INTEGER = _enum.auto()