stdlib: Use get_mem_ports in incorporate caches
Make use of get_mem_ports() method of the AbstractMemorySystem interface when incorporating caches to prevent the usage of the hard-coded memory port name "port" as some memory controllers do not have a port with this exact name. Change-Id: Ic7480166b257c6d356027234758b65b0a97995e3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68482 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu> Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
@@ -119,8 +119,8 @@ class NoCache(AbstractClassicCacheHierarchy):
|
||||
# Set up the system port for functional access from the simulator.
|
||||
board.connect_system_port(self.membus.cpu_side_ports)
|
||||
|
||||
for cntr in board.get_memory().get_memory_controllers():
|
||||
cntr.port = self.membus.mem_side_ports
|
||||
for _, port in board.get_memory().get_mem_ports():
|
||||
self.membus.mem_side_ports = port
|
||||
|
||||
def _setup_coherent_io_bridge(self, board: AbstractBoard) -> None:
|
||||
"""Create a bridge from I/O back to membus"""
|
||||
|
||||
@@ -90,8 +90,8 @@ class PrivateL1CacheHierarchy(AbstractClassicCacheHierarchy):
|
||||
# Set up the system port for functional access from the simulator.
|
||||
board.connect_system_port(self.membus.cpu_side_ports)
|
||||
|
||||
for cntr in board.get_memory().get_memory_controllers():
|
||||
cntr.port = self.membus.mem_side_ports
|
||||
for _, port in board.get_memory().get_mem_ports():
|
||||
self.membus.mem_side_ports = port
|
||||
|
||||
self.l1icaches = [
|
||||
L1ICache(size=self._l1i_size)
|
||||
|
||||
@@ -115,8 +115,8 @@ class PrivateL1PrivateL2CacheHierarchy(
|
||||
# Set up the system port for functional access from the simulator.
|
||||
board.connect_system_port(self.membus.cpu_side_ports)
|
||||
|
||||
for cntr in board.get_memory().get_memory_controllers():
|
||||
cntr.port = self.membus.mem_side_ports
|
||||
for _, port in board.get_memory().get_mem_ports():
|
||||
self.membus.mem_side_ports = port
|
||||
|
||||
self.l1icaches = [
|
||||
L1ICache(size=self._l1i_size)
|
||||
|
||||
@@ -111,8 +111,8 @@ class PrivateL1SharedL2CacheHierarchy(
|
||||
# Set up the system port for functional access from the simulator.
|
||||
board.connect_system_port(self.membus.cpu_side_ports)
|
||||
|
||||
for cntr in board.get_memory().get_memory_controllers():
|
||||
cntr.port = self.membus.mem_side_ports
|
||||
for _, port in board.get_memory().get_mem_ports():
|
||||
self.membus.mem_side_ports = port
|
||||
|
||||
self.l1icaches = [
|
||||
L1ICache(
|
||||
|
||||
Reference in New Issue
Block a user