From a8480fe1c34db25ae8acb5f79d571bc924e0daeb Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 19 Aug 2013 03:52:27 -0400 Subject: config: Move the memory instantiation outside FSConfig This patch moves the instantiation of the memory controller outside FSConfig and instead relies on the mem_ranges to pass the information to the caller (e.g. fs.py or one of the regression scripts). The main motivation for this change is to expose the structural composition of the memory system and allow more tuning and configuration without adding a large number of options to the makeSystem functions. The patch updates the relevant example scripts to maintain the current functionality. As the order that ports are connected to the memory bus changes (in certain regresisons), some bus stats are shuffled around. For example, what used to be layer 0 is now layer 1. Going forward, options will be added to support the addition of multi-channel memory controllers. --- configs/ruby/MOESI_CMP_token.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'configs/ruby/MOESI_CMP_token.py') diff --git a/configs/ruby/MOESI_CMP_token.py b/configs/ruby/MOESI_CMP_token.py index 4ede788a8..43b9f97e8 100644 --- a/configs/ruby/MOESI_CMP_token.py +++ b/configs/ruby/MOESI_CMP_token.py @@ -156,8 +156,7 @@ def create_system(options, system, piobus, dma_ports, ruby_system): cntrl_count += 1 - phys_mem_size = sum(map(lambda mem: mem.range.size(), - system.memories.unproxy(system))) + phys_mem_size = sum(map(lambda r: r.size(), system.mem_ranges)) assert(phys_mem_size % options.num_dirs == 0) mem_module_size = phys_mem_size / options.num_dirs -- cgit v1.2.3