From dcc14ba94887558f28b92e57cc63fc17031a190e Mon Sep 17 00:00:00 2001 From: Richard Cooper Date: Tue, 21 Mar 2023 23:26:00 +0000 Subject: [PATCH] configs: Update Arm starter_se.py for new CpuCluster abstraction Changeset [1] introduced a new CpuCluster abstraction. This requires some changes to the Arm `starter_se.py` and `devices.py` configurations to accommodate the new structure. [1] https://gem5-review.googlesource.com/c/public/gem5/+/65891 Change-Id: I55fdd383c96286d179724e0f50771e2b5daaa6d7 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69679 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini Tested-by: kokoro --- configs/example/arm/starter_se.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/example/arm/starter_se.py b/configs/example/arm/starter_se.py index ccdbe4f847..6b4dce9d64 100644 --- a/configs/example/arm/starter_se.py +++ b/configs/example/arm/starter_se.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2017 ARM Limited +# Copyright (c) 2016-2017, 2023 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -95,7 +95,7 @@ class SimpleSeSystem(System): # Add CPUs to the system. A cluster of CPUs typically have # private L1 caches and a shared L2 cache. - self.cpu_cluster = devices.CpuCluster( + self.cpu_cluster = devices.ArmCpuCluster( self, args.num_cores, args.cpu_freq, "1.2V", *cpu_types[args.cpu] ) @@ -114,11 +114,11 @@ class SimpleSeSystem(System): def numCpuClusters(self): return len(self._clusters) - def addCpuCluster(self, cpu_cluster, num_cpus): + def addCpuCluster(self, cpu_cluster): assert cpu_cluster not in self._clusters - assert num_cpus > 0 + assert len(cpu_cluster) > 0 self._clusters.append(cpu_cluster) - self._num_cpus += num_cpus + self._num_cpus += len(cpu_cluster) def numCpus(self): return self._num_cpus