Bobby R. Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/52223 )

Change subject: python: Remove 'exit_on_work_items' from boards' constructor
......................................................................

python: Remove 'exit_on_work_items' from boards' constructor

This has been moved to the `set_kernel_disk_workload` function, and is
set to True by default.

Change-Id: I9df2fa2946dd942b5011f05b948542097310352e
---
M src/python/gem5/components/boards/simple_board.py
M src/python/gem5/components/boards/riscv_board.py
M tests/gem5/configs/boot_kvm_fork_run.py
M tests/gem5/configs/parsec_disk_run.py
M tests/gem5/configs/boot_kvm_switch_exit.py
M src/python/gem5/components/boards/x86_board.py
M src/python/gem5/components/boards/kernel_disk_workload.py
M tests/gem5/configs/x86_boot_exit_run.py
M src/python/gem5/components/boards/abstract_board.py
9 files changed, 19 insertions(+), 18 deletions(-)



diff --git a/src/python/gem5/components/boards/abstract_board.py b/src/python/gem5/components/boards/abstract_board.py
index 858f8e2..de23231 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -67,7 +67,6 @@
         processor: "AbstractProcessor",
         memory: "AbstractMemory",
         cache_hierarchy: "AbstractCacheHierarchy",
-        exit_on_work_items: bool = False,
     ) -> None:
         super(AbstractBoard, self).__init__()
         """
@@ -75,8 +74,6 @@
         :param processor: The processor for this board.
         :param memory: The memory for this board.
         :param cache_hierarchy: The Cachie Hierarchy for this board.
-        :param exit_on_work_items: Whether the simulation should exit
-        on work items.
         """

         # Set up the clock domain and the voltage domain.
@@ -84,9 +81,6 @@
         self.clk_domain.clock = clk_freq
         self.clk_domain.voltage_domain = VoltageDomain()

-        # Set whether to exit on work items.
-        self.exit_on_work_items = exit_on_work_items
-
         # Set the processor, memory, and cache hierarchy.
         self.processor = processor
         self.memory = memory
diff --git a/src/python/gem5/components/boards/kernel_disk_workload.py b/src/python/gem5/components/boards/kernel_disk_workload.py
index 424d839..031fc60 100644
--- a/src/python/gem5/components/boards/kernel_disk_workload.py
+++ b/src/python/gem5/components/boards/kernel_disk_workload.py
@@ -136,6 +136,7 @@
         readfile: Optional[str] = None,
         readfile_contents: Optional[str] = None,
         kernel_args: Optional[List[str]] = None,
+        exit_on_work_items: bool = True,
     ) -> None:
         """
         This function allows the setting of a full-system run with a Kernel
@@ -151,6 +152,8 @@
         be created with the value of `readfile_contents`.
:param kernel_args: An optional parameter for setting arguments to be passed to the kernel. By default set to `get_default_kernel_args()`. + :param exit_on_work_items: Whether the simulation should exit on work
+        items. True by default.
         """

         # Set the kernel to use.
@@ -176,3 +179,6 @@
             file.close()

         self._add_disk_to_board(disk_image=disk_image)
+
+        # Set whether to exit on work items.
+        self.exit_on_work_items = exit_on_work_items
\ No newline at end of file
diff --git a/src/python/gem5/components/boards/riscv_board.py b/src/python/gem5/components/boards/riscv_board.py
index ac8440d..f64640c 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -85,11 +85,8 @@
         processor: AbstractProcessor,
         memory: AbstractMemorySystem,
         cache_hierarchy: AbstractCacheHierarchy,
-        exit_on_work_items: bool = False,
     ) -> None:
-        super().__init__(
- clk_freq, processor, memory, cache_hierarchy, exit_on_work_items
-        )
+        super().__init__(clk_freq, processor, memory, cache_hierarchy)
         requires(isa_required=ISA.RISCV)

     @overrides(AbstractBoard)
diff --git a/src/python/gem5/components/boards/simple_board.py b/src/python/gem5/components/boards/simple_board.py
index bbb3218..b3a4067 100644
--- a/src/python/gem5/components/boards/simple_board.py
+++ b/src/python/gem5/components/boards/simple_board.py
@@ -59,14 +59,12 @@
         processor: AbstractProcessor,
         memory: AbstractMemorySystem,
         cache_hierarchy: AbstractCacheHierarchy,
-        exit_on_work_items: bool = False,
     ) -> None:
         super(SimpleBoard, self).__init__(
             clk_freq=clk_freq,
             processor=processor,
             memory=memory,
             cache_hierarchy=cache_hierarchy,
-            exit_on_work_items=exit_on_work_items,
         )

     @overrides(AbstractBoard)
diff --git a/src/python/gem5/components/boards/x86_board.py b/src/python/gem5/components/boards/x86_board.py
index 53a577b..a673cbe 100644
--- a/src/python/gem5/components/boards/x86_board.py
+++ b/src/python/gem5/components/boards/x86_board.py
@@ -77,14 +77,12 @@
         processor: AbstractProcessor,
         memory: AbstractMemorySystem,
         cache_hierarchy: AbstractCacheHierarchy,
-        exit_on_work_items: bool = False,
     ) -> None:
         super(X86Board, self).__init__(
             clk_freq=clk_freq,
             processor=processor,
             memory=memory,
             cache_hierarchy=cache_hierarchy,
-            exit_on_work_items=exit_on_work_items,
         )

         requires(isa_required=ISA.X86)
diff --git a/tests/gem5/configs/boot_kvm_fork_run.py b/tests/gem5/configs/boot_kvm_fork_run.py
index 862235e..10c198d 100644
--- a/tests/gem5/configs/boot_kvm_fork_run.py
+++ b/tests/gem5/configs/boot_kvm_fork_run.py
@@ -192,7 +192,6 @@
     processor=processor,
     memory=memory,
     cache_hierarchy=cache_hierarchy,
-    exit_on_work_items=True,
 )

 # Set the Full System workload.
diff --git a/tests/gem5/configs/boot_kvm_switch_exit.py b/tests/gem5/configs/boot_kvm_switch_exit.py
index 53b04b2..68651eb 100644
--- a/tests/gem5/configs/boot_kvm_switch_exit.py
+++ b/tests/gem5/configs/boot_kvm_switch_exit.py
@@ -175,7 +175,6 @@
     processor=processor,
     memory=memory,
     cache_hierarchy=cache_hierarchy,
-    exit_on_work_items=True,
 )

 kernal_args = motherboard.get_default_kernel_args() + [args.kernel_args]
diff --git a/tests/gem5/configs/parsec_disk_run.py b/tests/gem5/configs/parsec_disk_run.py
index 6e75974..c65be10 100644
--- a/tests/gem5/configs/parsec_disk_run.py
+++ b/tests/gem5/configs/parsec_disk_run.py
@@ -211,7 +211,6 @@
     processor=processor,
     memory=memory,
     cache_hierarchy=cache_hierarchy,
-    exit_on_work_items=True,
 )

 # The command to run.
diff --git a/tests/gem5/configs/x86_boot_exit_run.py b/tests/gem5/configs/x86_boot_exit_run.py
index 74349e8..238136b 100644
--- a/tests/gem5/configs/x86_boot_exit_run.py
+++ b/tests/gem5/configs/x86_boot_exit_run.py
@@ -182,7 +182,6 @@
     processor=processor,
     memory=memory,
     cache_hierarchy=cache_hierarchy,
-    exit_on_work_items=True,
 )

 kernal_args = motherboard.get_default_kernel_args()

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52223
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: I9df2fa2946dd942b5011f05b948542097310352e
Gerrit-Change-Number: 52223
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce <bbr...@ucdavis.edu>
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