Skip to content

Commit f9781af

Browse files
authored
mem: fix bug in 3-level cache (#265)
The L3 cache did not work due to argument type mismatch in the call to the constructor `DMAController`. The second argument is expecting a `RubySystem` type but the code passes in a `cache_line_size` variable. After I change the second argument to `self.ruby_system` everything works.
2 parents 2b791ff + 3c38d49 commit f9781af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/python/gem5/components/cachehierarchies/ruby/mesi_three_level_cache_hierarchy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ def incorporate_cache(self, board: AbstractBoard) -> None:
193193
if board.has_dma_ports():
194194
dma_ports = board.get_dma_ports()
195195
for i, port in enumerate(dma_ports):
196-
ctrl = DMAController(self.ruby_system.network, cache_line_size)
197-
ctrl.dma_sequencer = DMASequencer(version=i, in_ports=port)
196+
ctrl = DMAController(
197+
DMASequencer(version=i, in_ports=port), self.ruby_system
198+
)
198199
self._dma_controllers.append(ctrl)
199-
ctrl.ruby_system = self.ruby_system
200200

201201
self.ruby_system.num_of_sequencers = len(self._l1_controllers) + len(
202202
self._dma_controllers

0 commit comments

Comments
 (0)