configs, mem: MemInterface generating its own controller
We are adding a controller method to MemInterface objects making them able to generate the appropriate memory controller. This will bring the following benefits a) Semplification: It will simplify MemConfig.config_mem b) Reusability: Scripts not using config_mem won't have to duplicate the if...else checks c) Modularity: Users will be able to define their own dram interfaces without needing to handle the mem_ctrl mapping in the shared MemConfig.py module Change-Id: I4b836fd7c91675cf7aacc644f25989484d5be3ec Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42074 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Wendy Elsasser <wendy.elsasser@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2012-2013 ARM Limited
|
||||
# Copyright (c) 2012-2013, 2021 Arm Limited
|
||||
# All rights reserved.
|
||||
#
|
||||
# The license below extends only to copyright in the software and shall
|
||||
@@ -49,3 +49,7 @@ class SimpleMemory(AbstractMemory):
|
||||
# representative of a x64 DDR3-1600 channel.
|
||||
bandwidth = Param.MemoryBandwidth('12.8GiB/s',
|
||||
"Combined read and write bandwidth")
|
||||
|
||||
def controller(self):
|
||||
# Simple memory doesn't use a MemCtrl
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user