(self)
| 55 | return self.value |
| 56 | |
| 57 | def to_dict(self) -> Dict: |
| 58 | return { |
| 59 | 'memory_id': self.memory_id, |
| 60 | 'value': self.value, |
| 61 | 'valid': self.valid, |
| 62 | 'enable_idxs': self.enable_idxs.copy( |
| 63 | ), # Return a copy to prevent external modification |
| 64 | 'disable_idx': self.disable_idx |
| 65 | } |
| 66 | |
| 67 | @classmethod |
| 68 | def from_dict(cls, data: Dict) -> 'MemoryMapping': |