diff --git a/src/cpu/CpuCluster.py b/src/cpu/CpuCluster.py index 31fdc4977d..42a71122a3 100644 --- a/src/cpu/CpuCluster.py +++ b/src/cpu/CpuCluster.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Arm Limited +# Copyright (c) 2022-2023 Arm Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -51,6 +51,9 @@ class CpuCluster(SubSystem): def __iter__(self): return iter(self.cpus) + def __len__(self): + return len(self.cpus) + def generate_cpus(self, cpu_type: "BaseCPU", num_cpus: int): """ Instantiates the cpus within the cluster provided