Jason Lowe-Power has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/34595 )

Change subject: configs: Add special case in MemConfig
......................................................................

configs: Add special case in MemConfig

SimpleMemory doesn't implement a full MemCtrl interface. Thus, like the
NVM and HMC memories, we need to add a special case to MemConfig.py. The
--mem-type command line option now works for SimpleMemory and all of the
DRAM interfaces (it does not work for the NVM interfaces, though).

Change-Id: I6d60649215be324bdd2a104b1976752f936c960e
Signed-off-by: Jason Lowe-Power <ja...@lowepower.com>
---
M configs/common/MemConfig.py
1 file changed, 8 insertions(+), 1 deletion(-)



diff --git a/configs/common/MemConfig.py b/configs/common/MemConfig.py
index 941b381..224ddc7 100644
--- a/configs/common/MemConfig.py
+++ b/configs/common/MemConfig.py
@@ -177,6 +177,9 @@
     if opt_nvm_type:
         n_intf = ObjectList.mem_list.get(opt_nvm_type)

+    print(opt_mem_type)
+    ObjectList.mem_list.print()
+
     nvm_intfs = []
     mem_ctrls = []

@@ -227,11 +230,15 @@
mem_ctrl = m5.objects.MemCtrl(min_writes_per_switch = 8, static_backend_latency = '4ns', static_frontend_latency = '4ns')
+                elif opt_mem_type == "SimpleMemory":
+                    mem_ctrl = m5.objects.SimpleMemory()
                 else:
                     mem_ctrl = m5.objects.MemCtrl()

# Hookup the controller to the interface and add to the list
-                mem_ctrl.dram = dram_intf
+                if opt_mem_type != "SimpleMemory":
+                    mem_ctrl.dram = dram_intf
+
                 mem_ctrls.append(mem_ctrl)

elif opt_nvm_type and (not opt_mem_type or range_iter % 2 == 0):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/34595
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v20.1.0.0
Gerrit-Change-Id: I6d60649215be324bdd2a104b1976752f936c960e
Gerrit-Change-Number: 34595
Gerrit-PatchSet: 1
Gerrit-Owner: Jason Lowe-Power <power...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to