gem5-dev@gem5.org

The gem5 Developer List

View all threads

[XS] Change in gem5/gem5[develop]: stdlib: Add a function returning non-current switchable cores

HN
Hoa Nguyen (Gerrit)
Fri, Apr 14, 2023 10:59 PM

Hoa Nguyen has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/69838?usp=email )

Change subject: stdlib: Add a function returning non-current switchable
cores
......................................................................

stdlib: Add a function returning non-current switchable cores

Change-Id: I8c670ae4a8dcd5b4de504c182c477e998c82c75c
Signed-off-by: Hoa Nguyen hoanguyen@ucdavis.edu

M src/python/gem5/components/processors/switchable_processor.py
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/python/gem5/components/processors/switchable_processor.py
b/src/python/gem5/components/processors/switchable_processor.py
index 036e391..bd04a73 100644
--- a/src/python/gem5/components/processors/switchable_processor.py
+++ b/src/python/gem5/components/processors/switchable_processor.py
@@ -117,6 +117,12 @@
def get_cores(self) -> List[AbstractCore]:
return self._current_cores

  • def get_switch_to_cores(self) -> List[AbstractCore]:
  •    for name, core_list in self._switchable_cores.items():
    
  •        for core in core_list:
    
  •            if not core in self._current_cores:
    
  •                yield core
    
  • def _all_cores(self):
        for core_list in self._switchable_cores.values():
            for core in core_list:
    

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

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I8c670ae4a8dcd5b4de504c182c477e998c82c75c
Gerrit-Change-Number: 69838
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen hoanguyen@ucdavis.edu
Gerrit-MessageType: newchange

Hoa Nguyen has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/69838?usp=email ) Change subject: stdlib: Add a function returning non-current switchable cores ...................................................................... stdlib: Add a function returning non-current switchable cores Change-Id: I8c670ae4a8dcd5b4de504c182c477e998c82c75c Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu> --- M src/python/gem5/components/processors/switchable_processor.py 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/src/python/gem5/components/processors/switchable_processor.py b/src/python/gem5/components/processors/switchable_processor.py index 036e391..bd04a73 100644 --- a/src/python/gem5/components/processors/switchable_processor.py +++ b/src/python/gem5/components/processors/switchable_processor.py @@ -117,6 +117,12 @@ def get_cores(self) -> List[AbstractCore]: return self._current_cores + def get_switch_to_cores(self) -> List[AbstractCore]: + for name, core_list in self._switchable_cores.items(): + for core in core_list: + if not core in self._current_cores: + yield core + def _all_cores(self): for core_list in self._switchable_cores.values(): for core in core_list: -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69838?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I8c670ae4a8dcd5b4de504c182c477e998c82c75c Gerrit-Change-Number: 69838 Gerrit-PatchSet: 1 Gerrit-Owner: Hoa Nguyen <hoanguyen@ucdavis.edu> Gerrit-MessageType: newchange