def read(self, from_hw: bool) -> int:
    value = 0
    for field in self.fields:
        value |= (field.read(from_hw) << field.lsb)
    return value
def read(self, from_hw: bool) -> int:
    value = 0
    for field in self.fields:
        value |= (field.read(from_hw) << field.lsb)
    return value