Skip to content

Commit

Permalink
Merge pull request #586 from SpiNNakerManchester/fix_shared_sdram
Browse files Browse the repository at this point in the history
Fix shared sdram
  • Loading branch information
Christian-B authored Nov 13, 2024
2 parents b6aeceb + 655d5fe commit ca929f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pacman/model/resources/shared_sdram.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def __add__(self, other: AbstractSDRAM) -> AbstractSDRAM:
f"Shared {key} has different values")
else:
shared[key] = value
return SharedSDRAM(shared, self._per_core)
return SharedSDRAM(shared, self._per_core + other._per_core)
else:
# MultiRegionSDRAM
return other + self
Expand All @@ -124,13 +124,13 @@ def report(self, timesteps: Optional[int], indent: str = "",
@overrides(AbstractSDRAM.short_str)
def short_str(self) -> str:
if self._per_core.fixed > 0 or self._per_core.per_timestep > 0:
per_core = f"per-core: {self._per_core.short_str} "
per_core = f"per-core: {self._per_core.short_str}"
else:
per_core = ""
shared = ""
for key, sdram in self._shared.items():
if shared == "":
shared = f"shared:{key}: {sdram.short_str}"
shared = f" shared: {key}: {sdram.short_str}"
else:
shared = f" {key}: {sdram.short_str}"
shared += f", {key}: {sdram.short_str}"
return per_core + shared

0 comments on commit ca929f3

Please sign in to comment.